Jetson Xavier NX 简单介绍: NX通过外形小巧的模组系统将超级计算机的性能带到了边缘端。 高达21 TOPS的加速计算能力可并行运行现代神经网络并处理来自多个高分辨率传感器的数据,这是完整AI系统的要求。NVIDIA Jetson Xavier NX 16GB EMMC ,8GB DDR
1、下载代码L4T R32.5.1为例
1)、kernel
L4T R32.5.1 Release Page | NVIDIA Developer
L4T Driver Package (BSP) Sources
对应文件:“Tegra186_Linux_R32.5.1_aarch64.tbz2”
2)、root filesystem
L4T R32.5.1 Release Page | NVIDIA Developer
Sample Root Filesystem Sources
对应文件:“Tegra_Linux_Sample-Root-Filesystem_R32.5.1_aarch64.tbz2"
3)、cboot
L4T R32.5.1 Release Page | NVIDIA Developer
Cboot Sources T194
对应文件:“cboot_src_t19x.tbz2"
2、解压代码
$ tar -xvjf Tegra186_Linux_R32.5.1_aarch64.tbz2
$ cd Linux_for_Tegra/rootfs
$ sudo tar -jxpf ../../Tegra_Linux_Sample-Root-Filesystem_R32.5.1_aarch64.tbz2
$ cd ..
$ sudo ./apply_binaries.sh
Selecting previously unselected package nvidia-l4t-core.
....
.....
~/workspace/waveshare/jetson5.1/xa_nx/source5/Linux_for_Tegra
Removing QEMU binary from rootfs
Removing stashed Debian packages from rootfs
L4T BSP package installation completed!
Rename ubuntu.desktop --> ux-ubuntu.desktop
Disabling NetworkManager-wait-online.service
Disable the ondemand service by changing the runlevels to 'K'
Success!
3 、交叉编译环境配置
GCC 7.3.1 for 64 bit BSP and Kernel (gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz)
$ cd /opt
$ tar xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
4、编译kernel
1)、解压内核
$ tar -xvjf public_sources.tbz2
$ cd Linux_for_Tegra/source/public
$ tar -xvjf kernel_src.tbz2
2)、编译内核
备注:在此之前已经安装编译依赖工具 sudo apt install build-essential bc
$cd /Linux_for_Tegra/source
$ mkdir out
$ export TEGRA_KERNEL_OUT=~/workspace/Linux_for_Tegra/source/out/
$ export CROSS_COMPILE=/opt/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
$ export LOCALVERSION=-tegra
$ mkdir -p $TEGRA_KERNEL_OUT
进入kernel源码下
$ cd public/kernel/kernel-4.9
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8(这个是CPU核数)
3)、生成Image和dtb,替换并安装
Linux_for_Tegra/source/out/arch/arm64/boot$ cp Image ~/workspace/Linux_for_Tegra/kernel/Image
Linux_for_Tegra/source/out/arch/arm64/boot$ cp dts/*
$/workspace/Linux_for_Tegra/kernel/dtb/ -rf
安装内核模块 sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=<top>/Linux_for_Tegra/rootfs/
4)、(可选)在rootfs路径下
$ cd <modules_install_path>
$ tar --owner root --group root -cjf kernel_supplements.tbz2 \
lib/modules
将 “kernel_supplements.tbz2”替换到Linux_for_Tegra/kernel$路径下 执行 apply_binaries.sh 脚本
5)、烧录
进入recovery模式,sudo ./flash.sh p3449-0000+p3668-0001-qspi-emmc mmcblk0p1