Jetson Nano's U disk boots and burns image eMMC and installs dependent components (Jetbotmini)

The burning method of the eMMC (embedded Multi Media Card) version, eMMC is simply an SD card, but it is welded on the motherboard.

Burning on a clean board generally involves the following three steps. After completion, it is the same as using a USB flash drive to start the system on a computer. Of course, it is more like Windows To Go.

Burning three steps: burning the core board system, burning eMMC boot, burning U disk image

1. The system version of the core board of Jetson Nano should correspond to the system version of the USB flash drive (for example, if the USB flash drive has burned V4.5.1, then the system version of the Jetson Nano core board must also be V4.5.1, otherwise it cannot be booted from the USB. )
2. The idea of ​​USB startup is to start the system on the core board first, and then guide the system on the core board to start on the U disk.
3. The system in the core board needs to use SDKManager to burn the system, and the system in the U disk needs to use Win32DiskImager to burn.

Before burning, if you are using a Windows system, you can install a virtual machine to load the Linux image to do the following operations, VMware16pro virtual machine installation

1. The system for burning the core board

Ubuntu operating system, I use the system loaded by the virtual machine here, we open the browser and enter https://developer.nvidia.com/zh-cn/embedded/jetpack , come to the "NVIDIA SDK Manager mode" , click "If You are using JETSON ORIN or XAVIER developer kit>" , click "Download NVIDIA SDK Manager"

Will jump to https://developer.nvidia.com/drive/sdk-manager This page, I am an Ubuntu system, so I choose the .deb format, https://developer.nvidia.com/sdkmanager_deb

After downloading, come to this directory and install SDK Manager (note the name you downloaded, the version number will change with the update)

sudo dpkg -i sdkmanager_1.9.1-10844_amd64.deb

If an error is reported that the dependent file cannot be found, enter the following command:

sudo apt --fix-broken install

Open the SDKManager, connect the Jetson Nano to the virtual machine Ubuntu18.04. At this time, you need to let Jetson Nano enter the REC flashing mode (connect the jumper cap [100 free shipping for a certain treasure is only more than 2 yuan] to the two pins of FC REC and GND , that is, to the carrier board under the core board The second and third pins) [The jumper cap is a built-in wire that short-circuits these two pins, so it is also called a short-circuit cap] These two pins mean Recovery recovery and Ground grounding.

将HDMI显示屏、鼠标、键盘和microUSB数据线连接到Jetson Nano上,最后再接入电源。由于上一步已经将跳线帽连接到FC REC和GND引脚,所以上电开机后会自动进入REC刷机模式。

在SDKManager软件选择Target Hardware为Jetson Nano modules,Linux JetPack。其中DeepStream可选,这个看自己需要是否勾选

如果在Target Hardware显示未连接状态,请确认设备是否进入REC刷机模式并连接上虚拟机,然后刷新。这里注意一下使用虚拟机需要把设备设置为连接到虚拟机上。

如果没弹出提示,可以在虚拟机的右下角手动连接:找到NVIDIA APX后点击连接到虚拟机。颜色亮了表示已连接到虚拟机。

默认会勾选Jetson OS和Jetson SDK Components,表示刷入系统和SDK,可以单独选系统OS或者软件SDK,但是单独刷入软件SDK前需要保证已经刷入系统OS(由于Jetson Nano自带的eMMC容量只有16G,所以安装不了SDK,只能选择刷入OS系统)

文件下载路径保持默认就好,勾选协议,点击下一步。输入虚拟机的密码。此时SDKManager会先下载需要烧录的文件,等待烧录文件下载完成即可开始烧录系统。

等待系统OS烧录完成后,Jetson Nano会自动重启进入系统,此时需要根据系统提示设置系统的基本功能,比如用户名与密码等!

最后需要注意:烧录完系统后,请将FC REC和GND之间的跳线帽拔掉。

2、烧录eMMC引导

这个烧录同样是在Ubuntu系统完成!

Jetson Nano连接虚拟机,准备好Jetson nano主板,跳线帽,显示屏,鼠标键盘等。

让Jetson Nano进入系统REC刷机模式(将跳线帽连接到FC REC和GND引脚,也就是连接到核心板下方载板的第二和第三个引脚)

将HDMI显示屏、鼠标、键盘连接到Jetson Nano上,再接入电源,最后插入microUSB数据线。

正常情况下,插入microUSB数据线后会弹出窗口,选择连接到虚拟机。

Jetson_Boot_USB.tar.gz文件传入Ubuntu 18.04系统,并打开终端运行解压命令。

tar xzvf Jetson_Boot_USB.tar.gz

解压后进入到Jetson_Boot_USB文件夹:

cd Jetson_Boot_USB

ls查看目录里的文件列表

运行烧录eMMC引导文件的命令

sudo ./flash.sh -r jetson-nano-devkit-emmc mmcblk0p1

最后等待文件烧录进入eMMC上,成功会提示

The target t210ref has been flashed successfully. Reset the board to boot from internal eMMC

如果出现错误信息,请确认Jetson Nano是否正常连接,并且进入刷机模式,重新按照第一步进行连接。

烧录完成后,请拔掉Jetson Nnao的跳线帽,再插入U盘,重新上电开机。

3、烧录U盘镜像

这个直接就在Windows环境即可

烧录U盘系统的方式的与烧录TF卡系统的流程是一样的,准备的U盘建议大于32G,本次烧录U盘的步骤不需要Jetson Nano参与。

首先格式化U盘,使用SDFormatter这里注意一定不能选错Drive。如果U盘里已经有烧录过系统的,可能第一次格式化会出错,再执行一次就可以了。

解压下载的系统镜像压缩文件(Jetbot_mini_Jetson_20220822_IMG.rar),得到.img格式的镜像文件,将U盘插入电脑USB口,运行Win32DiskImager工具

选择上面解压的镜像文件Jetbot_mini.img和U盘,然后点击写入,就开始烧录系统了。

烧录结束后会弹出完成对话框,说明安装就完成了,如果不成功,请关闭防火墙一类的软件,重新插入U盘进行烧录。请注意安装完,Windows系统下看到U盘分成多个分区并且无法点击进入,这是正常现象,因为Linux下的磁盘分区Windows下是看不到的!

烧录成功后系统可能会因为无法识别分区而提示格式化分区,不要格式化!不要格式化!不要格式化!点击取消,然后弹出U盘,最后将U盘插入到Jetson Nano主板的USB口上。

至此就完成了对JetsonNano主板的系统安装,接下来我们安装一些无人车需要的组件。

安装jetbotmini组件

安装前一般更新源,在做AI项目前建议先做如下两个步骤的操作,避免安装一些库时会找不到安装地址,导致后面频繁出错。

sudo apt-get update
sudo apt-get full-upgrade
#安装nano编辑器
sudo apt-get install nano

1、安装pip

sudo apt-get install python3-pip python3-dev
python3 -m pip install --upgrade pip #升级pip

这里需要修改pip3文件:

sudo nano /usr/bin/pip3

将下面这段内容

from pip import main
   if __name__ == '__main__':
        sys.exit(main())

修改为

from pip import __main__
if __name__ == '__main__':
    sys.exit(__main__._main())

修改之后ctrl+s保存,然后ctrl+x退出即可

pip3 -V

这里我修改之后报错:AttributeError: module 'pip.__main__' has no attribute '_main'

所以我这里还是没有修改,查看版本号pip3 -V,是否升级成功

pip3 -V
'''
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 21.3.1 from /home/yahboom/.local/lib/python3.6/site-packages/pip (python 3.6)
'''
python3 -m pip --version
#pip 21.3.1 from /home/yahboom/.local/lib/python3.6/site-packages/pip (python 3.6)

2、安装Jetbotmini依赖包

下面是Jetbotmini正常运行是需要安装的包:

依赖包

版本

Adafruit-GPIO(本地安装)

1.0.4

Adafruit-MotorHAT(本地安装)

1.4.0

Adafruit-PureIO

0.2.3

Adafruit-SSD1306(本地安装)

1.6.2

Flask

1.1.2

Jetson.GPIO

1.0.0

numpy

1.16.4

traitlets(本地安装)

3.4

pillow

5.2.0

其中备注本地安装的包直接安装,速度可能会比较慢

sudo pip3 install 包名

或者安装上面下载的本地安装包【Jetbotmini依赖包】:

sudo python3 setup.py install

安装cmake

sudo apt-get install cmake

如果安装出现版本不兼容的问题,可以指定版本号来安装,比如pip install numpy==1.16.4

Guess you like

Origin blog.csdn.net/weixin_41896770/article/details/129517476