sudo apt-get install screen fastboot minicom exfat-fuse
其实官方手册中的screen,应该和minicon串口工具类似;
2、然后查看一下是否安装成功
screen --version
Screen version 4.03.01 (GNU) 28-Jun-15
fastboot --version
fastboot version debian
3、因为需要对新的开发板TPU进行一次刷机操作,所以首先需要在宿主机安装驱动程序;
sudo sh -c "echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0525", MODE="0664",GROUP="plugdev", TAG+="uaccess"' >> /etc/udev/rules.d/65-edgetpu-board.rules"
4、然后创建新的链接,使其生效
sudo udevadm control --reload-rules && udevadm trigger
5、然后设置新的开发板TPU进行一次刷机操作,所以需要预先设置刷机的方式(类似zedboard刷机)
设置完硬件的刷机方式之后,然后就可以串口读取信息了;
6、然后连接串口线,打开串口监控程序即可;(注 先不要插电,因为,稍后插电,就可以打印的启动过程uboot读取硬件的信息)
7、查看宿主机连接的USB接口名称
dmesg | grep ttyUSB
[534605.535179] usb 1-3: cp210x converter now attached to ttyUSB0
[534605.536907] usb 1-3: cp210x converter now attached to ttyUSB1
[534734.937608] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[534734.938263] cp210x ttyUSB1: cp210x converter now disconnected from ttyUSB1
[537639.540031] usb 1-3: cp210x converter now attached to ttyUSB0
[537639.542614] usb 1-3: cp210x converter now attached to ttyUSB1
[537757.868380] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[537757.869118] cp210x ttyUSB1: cp210x converter now disconnected from ttyUSB1
[546225.024362] usb 1-3: cp210x converter now attached to ttyUSB0
[546225.026140] usb 1-3: cp210x converter now attached to ttyUSB1
8、查看到[534734.937608] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
然后输入 下面命令进行串口监控或者使用mincom监控
sudo screen /dev/ttyUSB0 115200
或者使用minicom,这是本人开机启动后,minicom的信息;(minicom配置很简单,可以参考:Ubuntu串口工具minicom的安装与使用-百度经验),本人使用minicom,
只需把port配置成/dev/ttyUSB0 即可;
Hardware Flow Contorl选项改成No;
相比而言,minicom 比较好用,因为每次监听串口 只需一条命令即可,然而screen 还需记住设备名和波特率~~~
sudo minicom
9、连接电源之后,(不要使用计算机给开发板供电,会供电不足 )在屏幕显示信息如下;
Welcome to minicom 2.7
OPTIONS: I18n
Compiled on Nov 15 2018, 20:18:47.
Port /dev/ttyUSB0, 18:42:48
Press CTRL-A Z for help on special keys
U-Boot SPL 2017.03 (Dec 06 2018 - 19:26:58)
power_bd71837_init
pmic debug: name=BD71837
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
Normal Boot
Trying to boot from MMC1
U-Boot 2017.03 (Dec 06 2018 - 19:26:58 +0000)
CPU: Freescale i.MX8MQ rev2.0 1500 MHz (running at 1000 MHz)
CPU: Com at 32C
Reset cause: POR
Model: Freescale i.MX8MQ Phanbell
DRAM: 1 GiB
Board id: 6
Baseboard id: 1
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
BuildInfo:
- ATF
- U-Boot 2017.03
flash target is MMC:0
Warning: ethernet@30be0000 using MAC address from ROM
eth0: ethernet@30be0000
Fastboot: Normal
Hit any key to stop autoboot: 2 sh the latest firmware.
Please follow the instructions at g.co/coral/setup.
u-boot=>
10、然后插上白色的数据线(otg)
11、输入:(本人的好卡,我也不知为啥,输入好多次都错误,还是复制一步到位~~~)
fastboot 0
12、打开一个新终端界面(宿主机)
fastboot devices
提示如下表示成功,如果不提示,就是fastboot 版本太低 链接:https://pan.baidu.com/s/1EHe-2vvuxWTq6bn5gBNL8w 密码:u57y
mkdir -p ~/.local/bin
sudo mv ~/platform-tools/fastboot ~/.local/bin/
ubuntu@ubuntu:~$ fastboot --version
fastboot version 28.0.2-5303910
Installed as /home/ubuntu/.local/bin/fastboot
ubuntu@ubuntu:~$ fastboot devices
170349d6ef944da7 fastboot
ubuntu@ubuntu:~$
13、然后下载百度云的 mendel-enterprise-chef-13.zip 然后进行刷机~~
ubuntu@ubuntu:~/mendel-enterprise-chef-13$ bash flash.sh
Sending 'bootloader0' (1006 KB) OKAY [ 0.051s]
Writing 'bootloader0' OKAY [ 0.191s]
Finished. Total time: 0.261s
Rebooting into bootloader OKAY [ 0.024s]
Finished. Total time: 0.125s
Sending 'gpt' (33 KB) OKAY [ 0.017s]
Writing 'gpt' OKAY [ 0.308s]
Finished. Total time: 0.344s
Rebooting into bootloader OKAY [ 0.022s]
Finished. Total time: 0.122s
Erasing 'misc' OKAY [ 0.072s]
Finished. Total time: 0.082s
Sending 'boot' (131072 KB) OKAY [ 4.474s]
Writing 'boot' OKAY [ 3.628s]
Finished. Total time: 8.178s
Sending sparse 'rootfs' 1/3 (397265 KB) OKAY [ 13.622s]
Writing 'rootfs' OKAY [ 24.925s]
Sending sparse 'rootfs' 2/3 (408325 KB) OKAY [ 14.008s]
Writing 'rootfs' OKAY [ 46.386s]
Sending sparse 'rootfs' 3/3 (352960 KB) OKAY [ 12.192s]
Writing 'rootfs' OKAY [ 85.402s]
Finished. Total time: 196.586s
Rebooting OKAY [ 0.005s]
Finished. Total time: 0.105s
ubuntu@ubuntu:~/mendel-enterprise-chef-13$
然后刷完了。哈哈哈 然后屏幕有画面了~~~
然后就出来图形化界面了~~~~
14、然后插上网线,就可以愉快的访问TPU了,但是,突然发现ssh链接不上去,提示
Permission denied (publickey).
因为Google TPU默认禁用了ssh密码登录权限,此时你需要在串口中设置一下TPU配置即可;
打开 /etc/ssh/sshd_config
修改PasswordAuthentication no 为:
PasswordAuthentication yes
/etc/init.d/sshd restart
这样就好了,小组其它成员都可以通过网口命令ssh远程联接TPU设备了。
依次为TPU串口终端和ssh连接的命令行终端(都一样)
15、测试一下demo,进入TPU终端;
wget https://dl.google.com/coral/canned_models/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite
wget https://dl.google.com/coral/canned_models/inat_bird_labels.txt
wget https://www.mrtbc.com/wp-content/uploads/2019/05/parrot.jpg
然后执行命令;
mendel@tuned-ibis:~$ python3 /usr/lib/python3/dist-packages/edgetpu/demo/classify_image.py --model ~/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --label ~/inat_bird_labels.txt --image ~/parrot.jpg
---------------------------
Ara macao (Scarlet Macaw)
Score : 0.761719
mendel@tuned-ibis:~$
mendel@tuned-ibis:/etc/apt/sources.list.d$ ls
00-mdt-services.list multistrap-bsp.list
coral-cloud.list multistrap-main.list
需要更新一下源,否则哎~~China vs Google
deb http://mirrors.aliyun.com/debian stretch main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free
deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
deb http://ftp.cn.debian.org/debian/ stretch main contrib non-free
deb http://ftp.cn.debian.org/debian/ stretch-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
deb http://ftp.cn.debian.org/debian/ stretch-backports main contrib non-free
deb http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security main restricted
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security main restricted
deb http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security multiverse
进行源更新
sudo apt-get update
如果出现问题:如
Reading package lists... Done
W: GPG error: http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: The repository 'http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
需要执行下面的命令:
sudo apt-get install debian-archive-keyring debian-keyring dirmngr//安上公钥
然后执行:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
重新更新数据源就可以了~~
在把TPU作为PC端时,突然发现其无法通过串口调试其它设备,即TPU不支持lsusb的使用~~
~~~然后发现这是debain系统的问题~~~
sudo apt-get install usbutils
ubuntu@ubuntu:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 105: ID 1a2c:2124 China Resource Semico Co., Ltd
Bus 001 Device 104: ID 413c:301a Dell Computer Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
然后取得其串口的控制权限~~~
cd /etc/udev/rules.d/
sudo touch 51-android.rules
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
sudo chmod a+x 51-android.rules
拔掉usb重新插上就可以了,如:
ubuntu@ubuntu:~$ adb devices
List of devices attached
AB100607 device
这样就解决了识别(控制)串口USB的问题。
在TPU上执行apt-get install命令时,报如下warning
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "zh_CN:zh", LC_ALL = (unset), LC_TIME = "zh_CN", LC_MONETARY = "zh_CN", LC_ADDRESS = "zh_CN", LC_TELEPHONE = "zh_CN", LC_NAME = "zh_CN", LC_MEASUREMENT = "zh_CN", LC_IDENTIFICATION = "zh_CN", LC_NUMERIC = "zh_CN", LC_PAPER = "zh_CN", LANG = "zh_CN.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory |
sudo vim ~/.bashrc
#add the command in bottom line
export LC_ALL=C
source ~/.bashrc
新智元报道编辑:LRS【导读】性能比TPUv3提高2.23倍,价格只涨61%谷歌如今能保持人工智能领域霸主地位,很大程度上依赖于自主研发的TPU。自去年开始,谷歌就开始不断放风TPUv4,在论文中描述新一代TPU的架构设计,从前几代TPU设计中不断吸取经验。5月19日,谷歌正式推出新一代人工智能ASIC芯片TPUv4,运算效能是上一代产品的2倍以上,由4096个TPUv4单芯片组成的pod...
AI科技大本营消息,北京时间周一(2月12日)晚间,Google 宣布,在 Google Cloud Platform(GCP)上正式推出Cloud TPUs 测试版服务,帮助研究人员更快地训练和运行机器学习模型 。目前的收费标准为 6.5 美元/Cloud TPU/小时,而且供应有限,需要提前申请。TPU(Tensor Processing Unit)的全名为张量处理单元 ,是 Google 专...
买了一个无线通信模块,在windows下还要装驱动才能读。在windows下测试无线模块没问题后,在ubantu14.2中测试怎么读串口。步骤如下:1.查看看系统信息dmesg | tail -f 输出如下:[12812.940613] usb 1-9: New USB device found, idVendor=10c4, idProduct=ea60
[12812.940621] usb 1
今天调试imx6ull的开发板,通过USB连接主机时,发现每次插好后过一会就会自动断开。
我尝试了多个USB接口,都出现相同的情况,先排除硬件问题。
接着,我保持USB线插入状态,检查系统驱动是否安装正常:
$ lsmod|grep -i cp210x
cp210x 36864 1
usbserial 57344 3 cp210x
$ lsusb|grep -i cp210x
Bus 001 Device 004: ID 10c4:ea60
Edge TPU显然是在边缘(edge)运行的,但边缘是什么呢?为什么我们不选择在云上运行所有东西呢?
在云中运行代码意味着使用的CPU、GPU和TPU都是通过浏览器提供的。边缘与云相反,即在本地运行代码。在边缘运行代码的主要优点是没有网络延迟,由于物联网设备通常要频繁地生成数据,因此运行在边缘上的代码非常适合基
明敏 发自 凹非寺 量子位 报道 | 公众号 QbitAI一个TPU v4 pod就能达到1 exaflop级的算力,实现每秒10的18次方浮点运算。缺席一年后的谷歌I/O大会,真的不负众...
(作者原创,未经允许不得转载。)
最近在研究人工智能芯片架构,反复分析了谷歌公开的TPU ( Tensor Processing Unit) 专利,从中获得些许感悟,记录下来,以备之后查看,也方便广大知友查阅。
特此感谢谷歌的分享。
其实人工智能从06年深度学习的出现,就踏上了再次崛起之路。如果说,IMGNET的举办是快速推进深度学习的发展,让深度学习在图像识别领域大火特火。那...
目录一、安装wps二、截图工具flameshot三、必备中文输入法fcitx-googlepinyin安装四、python3环境五、解决ssh环境恢复遇到问题搜索wps linux版本,下载到最新版本,进入到deb包下载目录,执行安装命令。WPS Office 2019 for Linux-支持多版本下载_WPS官方网站WPS Office For Linux,支持不同格式多版本WPS For Linux版下载,实现多人在线协同办公。https://linux.wps.cn/sudo dpkg -i xxx
本篇文章的文件系统是瘦身版的,不健全的。但这恰恰是学习内核的好方法,系统运行时会提示缺少什么,或者异常。当你解决这些问题的时候,就会了解到文件系统为什么有这些文件,这些目录。
网上有很多关于nanopi m3的烧写开机启动教程。大多数都是根据友善之臂公司给出的官方教程,这里我也把官方教程链接贴出来:http://www.arm9.net/nanopi-m3.asp。
今天我要记录的nanopi...