The ubuntu system must be bionic LTS
for the host.
Install jetpack 4.6.5 on the nano via the sdkmanager.
Download the pinmux spreadsheet v1.01 from: https://developer.nvidia.com/embedded/downloads#?search=Pinmux
Fire up Excel under Windows, make your desired changes and generate:
tegra210-jetson_nano_module_okdo-pinmux.dtsi
Install the device tree compiler
sudo apt-get install -y device-tree-compiler
ssh into the jetson nano
Find out the name of the device tree binary:
cat /proc/device-tree/nvidia,dtsfilename gives: arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
exit the nano
Find the .dtb
file in the kernel source tree:
cd JetPack_4.6.5_Linux/JetPack_4.6.5_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/
find . -name "tegra210-p3448-0002-p3449-0000-b00.dtb"
Make a backup of the dtb just in case:
cd Linux_for_Tegra/kernel/dtb/
cp tegra210-p3448-0002-p3449-0000-b00.dtb /tmp
Create the environment to build the kernel:
apt install build-essential bc
Install the recommended aarch64 cross compiler:
cd /usr/local/
wget http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
tar xJvf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
Create /etc/profile.d/aarch64.sh
to set the environment variable CROSS_COMPILE:
# Not bash or zsh?
[ -n "$BASH_VERSION" -o -n "$ZSH_VERSION" ] || return 0
# Not an interactive shell?
[[ $- == *i* ]] || return 0
export CROSS_COMPILE=/usr/local/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
Follow now the instructions here: https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3275/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/adaptation_and_bringup_nano.html#wwpID0E0QQ0HA
Download the matching kernel sources:
cd JetPack_4.6.5_Linux/JetPack_4.6.5_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/
./source_sync.sh
Unearth tegra210-jetson_nano_module_okdo-pinmux.dtsi
generated by excel.
Copy it into the kernel source tree:
cp tegra210-jetson_nano_module_okdo-pinmux.dtsi sources/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-b00.dtsi
Compile the device tree binary:
cd sources/kernel
make ARCH=arm64 tegra_defconfig
make ARCH=arm64 dtbs
Flash the new device tree to the device tree partition:
cd ~/nvidia/nvidia_sdk/JetPack_4.6.5_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra
sudo ./flash.sh -r -k DTB jetson-nano-emmc mmcblk0p1