地址:https://developer.nvidia.com/embedded/jetson-linux-archive
下载需要版本即可,此次编译采用32.4.2版本
需要下载的文件如下:
mkdir xavier_nx_prj
将上诉文件拷贝到此文件夹下
tar -xjf public_sources.tbz2
cd /Linux_for_Tegra/source/public
tar -xjf kernel_src.tbz2
sudo tar -xf Tegra186_Linux_R32.4.2_aarch64.tbz2
cd Linux_for_Tegra/rootfs/
sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R32.4.2_aarch64.tbz2
sudo apt install build-essential bc
cd kernel-4.9/
export TEGRA_KERNEL_OUT=/home/kevin/nvidia/xs_xavier_nx_prj/Linux_for_Tegra/source/public/kernel/output
export CROSS_COMPILE=/home/kevin/nvidia/xavier_linux_package/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export LOCALVERSION=-tegra
cd kernel-4.9/
mkdir -p $TEGRA_KERNEL_OUT
make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
scripts/rt-patch.sh apply-patches
make mrproper //注:首先清除所有的.o文件和依赖关系
make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8 //编译
编译完成如下:
make ARCH=arm64 O=$TEGRA_KERNEL_OUT dtbs
cd linux_for_Tegra
sudo ./apply_binaries.sh
进入 Linux_for_Tegra
cd linux_for_Tegra
sudo ./flash.sh jetson-xavier mEC[mcblk0p1]