1、在emmc上创建Ubuntu系统
#1 sudo apt-get install qemu-user-static #2 sudo apt-get install python #3 mkdir 32.4.5&cd 32.4.5 #4 tar -xf Tegra186_Linux_R32.4.5_aarch64.tbz2 #5 cd Linux_for_Tegra/rootfs #6 sudo tar -xpf ../../ Tegra_Linux_Sample-Root-Filesystem_R32.4.5_aarch64.tbz2 #7 cd Linux_for_Tegra #8 sudo ./apply_binaries.sh
在装有 Ubuntu 系统的电脑主机上,通过 USB 线连接到需要烧写系统的 Jetson
设备上的 OTG 接口,并使 Jetson 设备进入 recovery 模式。
#9 cd Linux_for_Tegra #10 sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1
*2、添加SD卡扩展驱动
#11 cp tegra194-p3668-all-p3509-0000-ncb.dtb ~/nvidia/nvidia_sdk/JetPack_4.5_Linux_JETSON_XAVIER_NX/Linux_for_Tegra/kernel/dtb/tegra194-p3668-all-p3509-0000.dtb #12 cd Linux_for_Tegra #13 sudo ./flash.sh -r -k kernel-dtb p3449-0000+p3668-0001-qspi-emmc mmcblk0p1
3、NX端安装SD卡驱动
#14 cp extlinux.conf /boot/extlinux/ #15 reboot
4、安装balena复制母卡
https://www.balena.io/etcher/
5、修改SD卡引导驱动
1、插上已克隆好系统的SD卡; 2、查询SD卡和EMMC内存的挂载地址:mount指令; 3、修改根目录文件夹下的启动文件(sudo gedit /boot/extlinux/extlinux.conf);
原文件是
修改后
TIMEOUT 30
DEFAULT sdcard
MENU TITLE L4T boot options
LABEL sdcard
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs} quiet root=/dev/mmcblk1p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0
LABEL internalemmc
MENU LABEL internal EMMC
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0
重启reboot
6、4G模块拨号
lsmod Ifconfig -a sudo dhclient wwan0 at+cfun=0 at+cfun=1 at^ndisdup=1,0 at^ndisdup=1,1 at+cgcontrdp=1
7、NX端连接飞控
ls /dev/ttyACM* 查询NX是否与飞控连接良好
修改/opt/ros/melodic/share/mavros/launch/px4.launch文件中的服务器地址
gcs_url default=”tcp://192.168.29.97:20900”(根据服务器地址修改)
给ttyACM0串口权限:sudo chmod 777 /dev/ttyACM0
根目录运行:roslaunch mavros px4.launch
垃圾清理:rosclean purge



