I was trying to minimize Ubuntu installation footprint on Nvidia Orin board. I ran across this post from Nvidia on how to do that. Unfortunately, I had a specific Connect Tech board, which required some specific drivers from the vendor itself.

Note, that some instructions are taken from Nvidia’s documentation linked above. To combine Nvidia’s storage optimization instructions with Connect Tech’s specific flashing instructions, I ended up doing this:

First, get Jetson Linux and sample root filesystem from Nvidia and decompress them:

dude@build:~/custom_fs$ curl -fsSLO https://developer.nvidia.com/embedded/l4t/r35_release_v1.0/release/jetson_linux_r35.1.0_aarch64.tbz2
dude@build:~/custom_fs$ curl -fsSLO https://developer.nvidia.com/embedded/l4t/r35_release_v1.0/release/tegra_linux_sample-root-filesystem_r35.1.0_aarch64.tbz2
dude@build:~/custom_fs$ L4T_RELEASE_PACKAGE=jetson_linux_r35.1.0_aarch64.tbz2
dude@build:~/custom_fs$ SAMPLE_FS_PACKAGE=tegra_linux_sample-root-filesystem_r35.1.0_aarch64.tbz2
dude@build:~/custom_fs$ tar xf ${L4T_RELEASE_PACKAGE}
dude@build:~/custom_fs$ cd Linux_for_Tegra/rootfs/
dude@build:~/custom_fs/Linux_for_Tegra/rootfs$ sudo tar xpf ../../${SAMPLE_FS_PACKAGE}
dude@build:~/custom_fs/Linux_for_Tegra/rootfs$ cd ..

At this point, if you want to bake additional .deb packages into the filesystem, add them to ~/custom_fs/Linux_for_Tegra/nv_tegra/l4t_deb_packages. These are the packages not found in Ubuntu repos. Note: it seems, you have to handle dependencies manually. Now, apply the binaries:

dude@build:~/custom_fs/Linux_for_Tegra$ sudo ./apply_binaries.sh

Next, get drivers and vendor bits from Connect Tech:

dude@build:~/custom_fs$ cd Linux_for_Tegra/
dude@build:~/custom_fs/Linux_for_Tegra$ curl -fsSLO https://connecttech.com/ftp/Drivers/CTI-L4T-ORIN-AGX-35.1.0-V005.tgz
dude@build:~/custom_fs/Linux_for_Tegra$ sudo tar -xzf CTI-L4T-ORIN-AGX-35.1.0-V005.tgz
dude@build:~/custom_fs/Linux_for_Tegra$ cd CTI-L4T/
dude@build:~/custom_fs/Linux_for_Tegra/CTI-L4T$ sudo ./install.sh
dude@build:~/custom_fs/Linux_for_Tegra/CTI-L4T$ cd ../tools/

Next, create OEM user and assign the device a new hostname:

dude@build:~/custom_fs/Linux_for_Tegra/tools$ sudo ./l4t_create_default_user.sh -u admin -p Password123 -n devbox --accept-license

Finally, build the filesystem. The next command will create minimal Ubuntu installation. If you want additional packages from Ubuntu repos baked in, you have to add them to nvubuntu-focal-minimal-aarch64-packages file, as the following command will create minimal flavor installation. Additionally, make sure network-manager is listed as one of the packages to be installed.

dude@build:~/custom_fs/Linux_for_Tegra/tools$ cd samplefs/
dude@build:~/custom_fs/Linux_for_Tegra/tools/samplefs$ sudo ./nv_build_samplefs.sh --abi aarch64 --distro ubuntu --flavor minimal --version focal

The new filesystem will be created in ~/custom_fs/Linux_for_Tegra/tools/samplefs/sample_fs.tbz2.

dude@build:~/custom_fs/Linux_for_Tegra/tools/samplefs$ cd ../../
dude@build:~/custom_fs/Linux_for_Tegra$ ./flash.sh cti/orin-agx/forge/base mmcblk0p1