I was experiencing some disk space issues with the TX2 so I decided to make a custom rootfs without a desktop environment and other software which I didn’t need. The official NVIDIA documentation is located here:
docs.nvidia. com/jetson/l4t/index.html#page/Tegra Linux Driver Package Development Guide/rootfs_custom.html
I decided against using nv_build_samplefs.sh and instead started from scratch. I’ve attached two small scripts I wrote for this. One is for the TX2 with the official devboard, the other is for the Elroy carrier board from Connect Tech. It’s possible to use these scripts for other Jetsons/carrier boards too but you’d have to modify the script to use the correct apt sources.
The script requirements are:
debootstrap qemu-static-user binfmt-support
You’ll also need to run the script as root (you should check the contents of the script first!). Then place the resulting “rootfs” directory in the JetPack SDK. After that, you’ll need to copy over the extlinux.conf file:
install -Dm644 bootloader/extlinux.conf rootfs/boot/extlinux/extlinux.conf
Then you can go straight to flashing. I couldn’t get the apply_binaries.sh script to work since the .deb files that it installs require dependencies which aren’t present in the rootfs. Instead, the script itself downloads the most current versions of the relevant packages with apt.
Take note that I’ve set the distribution to focal. This isn’t officially supported by NVIDIA but I got it to work by disabling the make recovery script. flash.sh will try to generate a recovery.img file otherwise. If you want the recovery.img, you’ll need to change the distribution to bionic, and install additional packages like wpa_supplicant and parted. You can also patch the SDK to use focal file paths (see attachment 3).
A full list of required files for the recovery partition are in
I was also able to avoid this by using version 32.4.4 of the SDK since it doesn’t include the make recovery script.
rootfs-tx2-devkit.sh (7.0 KB)
rootfs-tx2-cti-elroy.sh (4.9 KB)
sdk.patch (9.4 KB)