Last active
April 28, 2024 21:43
-
-
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 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/ | |
# 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 vi ./Linux_for_Tegra/source/kernel/Makefile | |
29gg | |
... defconfig | |
$(MAKE) \ | |
ARCH=arm64 \ | |
-C $(kernel_source_dir) \ | |
LOCALVERSION=$(version) \ | |
nconfig | |
... Image | |
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_CFS_BANDWIDTH=y | |
# CONFIG_IP_NF_TARGET_REDIRECT=m | |
# 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_VXLAN=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 | |
# Turing Pi 2 does not have the onboard EEPROM | |
sed -i 's/cvb_eeprom_read_size = <0x100>/cvb_eeprom_read_size = <0x0>/g' 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 | |
sudo vi ./tools/kernel_flash/initrd_flash/nv_enable_remote.sh | |
222gg | |
... | |
echo "${cfg_str:1}" > "${cfg}/strings/0x409/configuration" | |
echo on > /sys/bus/usb/devices/usb2/power/control # <---- new entry | |
echo "${udc_dev}" > UDC | |
... | |
# Connect shit-box to turing-pi via usb | |
# From turing-pi | |
tpi power off | |
tpi usb -n 4 flash | |
tpi power -n 4 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 jetson-orin-nano-devkit internal | |
ssh ubuntu@xxx.xx.x.x | |
# From jetson1 | |
sudo apt update | |
sudo apt -y upgrade | |
sudo shutdown -h now | |
# From turing-pi | |
tpi power -n 4 off | |
tpi usb -n 4 device | |
tpi power -n 4 on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow-ups
NVIDIA Container Runtime
We're not actually installing Docker, but we still need to ensure the container runtime is available.
jtop
NVIDIA CUDA