Last active
March 18, 2025 10:56
-
-
Save dudo/4093b5d14f2b003cad507e4f4ac1aa83 to your computer and use it in GitHub Desktop.
Kubernetes-ready Nvidia Orin NX flashing for Jetson 36.3 on a turing-pi2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From shit-box | |
# Need to modify the host doing the flashing | |
sudo vi /etc/default/nfs-kernel-server | |
RPCMOUNTDOPTS="--manage-gids --no-nfs-version 4" | |
sudo reboot | |
sudo apt install -y qemu-user-static make git-core build-essential bc flex bison ncurses-dev libssl-dev gcc-aarch64-linux-gnu | |
export JETSON_VERSION=36.3 | |
mkdir ~/nvidia | |
cd ~/nvidia | |
wget -O bsp.tbz2 -L https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v3.0/release/jetson_linux_r$JETSON_VERSION.0_aarch64.tbz2 | |
wget -O rootfs.tbz2 -L https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v3.0/release/tegra_linux_sample-root-filesystem_r$JETSON_VERSION.0_aarch64.tbz2 | |
tar -xvpf bsp.tbz2 | |
sudo tar -xvpf rootfs.tbz2 -C Linux_for_Tegra/rootfs/ | |
# Turing Pi 2 does not have the onboard EEPROM | |
sed -i 's/cvb_eeprom_read_size = <0x100>/cvb_eeprom_read_size = <0x0>/g' ~/nvidia/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb2-bct-misc-p3767-0000.dts | |
cd ~/nvidia/Linux_for_Tegra | |
sudo ./apply_binaries.sh | |
sudo ./tools/l4t_flash_prerequisites.sh | |
sudo ./tools/l4t_create_default_user.sh --accept-license -u ubuntu -p password -a -n jetson1 | |
# Let's modify the kernel before we flash the board. | |
cd ~/nvidia/Linux_for_Tegra/source | |
./source_sync.sh -k -t jetson_$JETSON_VERSION | |
cd ~/nvidia/Linux_for_Tegra/source/kernel | |
sudo vim ~/nvidia/Linux_for_Tegra/source/kernel/Makefile | |
29gg | |
... defconfig | |
$(MAKE) \ | |
ARCH=arm64 \ | |
-C $(kernel_source_dir) $(O_OPT) \ | |
LOCALVERSION=$(version) \ | |
nconfig | |
... Image | |
# Probably smart to take a backup at this point | |
sudo cp -rp ~/nvidia/Linux_for_Tegra ~/nvidia/Linux_for_Tegra_SYNCED | |
export CROSS_COMPILE=aarch64-linux-gnu- | |
make kernel | |
# Dig through the configuration to enable the following features and modules. F8 to search. | |
# | |
# CONFIG_NET_CLS_BPF=m | |
# CONFIG_BLK_DEV_THROTTLING=y | |
# CONFIG_NET_CLS_CGROUP=m | |
# CONFIG_CGROUP_NET_PRIO=y | |
# CONFIG_IP_SET=m | |
# CONFIG_IP_VS_NFCT=y | |
# CONFIG_IP_VS_PROTO_TCP=y | |
# CONFIG_IP_VS_PROTO_UDP=y | |
# CONFIG_IP_VS_RR=m | |
# CONFIG_CRYPTO_SEQIV=m | |
# CONFIG_XFRM_USER=y | |
# CONFIG_INET_ESP=m | |
# CONFIG_NETFILTER_XT_TARGET_TPROXY=m | |
# CONFIG_NETFILTER_XT_MATCH_MARK=m | |
# CONFIG_NETFILTER_XT_MATCH_SOCKET=m | |
export INSTALL_MOD_PATH=~/nvidia/Linux_for_Tegra/rootfs/ | |
sudo -E make install | |
cp ~/nvidia/Linux_for_Tegra/source/kernel/kernel-jammy-src/arch/arm64/boot/Image ~/nvidia/Linux_for_Tegra/kernel/Image | |
# Install OOT modules | |
cd ~/nvidia/Linux_for_Tegra | |
sudo ./tools/l4t_update_initrd.sh | |
# Connect shit-box to turing-pi via usb | |
# From turing-pi | |
tpi power off | |
tpi usb flash --node 4 | |
tpi power on | |
# From shit-box | |
lsusb | |
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \ | |
-c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" \ | |
--showlogs --network usb0 --erase-all --flash-only --keep jetson-orin-nano-devkit internal | |
ssh-copy-id [email protected] | |
ssh [email protected] | |
# From jetson1 | |
sudo apt update | |
sudo apt -y upgrade | |
sudo shutdown -h now | |
# From turing-pi | |
tpi power off --node 4 | |
tpi usb device --node 4 | |
tpi power on --node 4 |
thanks for putting this all together. massive help with a few items I missed when configuring my own turingpi 2.5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Validate Kernel flags