Customizing and Flashing Jetson Orin Nano Filesystem
Issue Overview
Users are experiencing challenges with customizing the filesystem for Jetson Orin Nano production SOM with custom carrier boards using NVME storage. The main concerns revolve around adding additional command support to the default image, such as minicom, jetson-utils, and various development libraries. Additionally, users are seeking methods to reuse customized builds across different PCs for flashing devices with NVME storage. The process of installing Jetpack and its components, which is crucial for CUDA support and camera streaming, is also a point of confusion, especially in a production environment where time efficiency is critical.
Possible Causes
- Lack of familiarity with Jetson filesystem customization process
- Complexity in transferring customized builds between different development environments
- Challenges in efficiently installing large packages like Jetpack (approximately 12GB) on multiple production devices
- Incompatibility issues between customized rootfs and Nvidia-specific packages
- Time constraints in production environments for setting up each device individually
Troubleshooting Steps, Solutions & Fixes
-
Customizing the Filesystem:
- Use the provided script for building a custom rootfs:
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/RootFileSystem.html
- Customize the package list in the script to include desired packages (e.g., minicom, libcurl4-openssl-dev, libssl-dev, uuid-dev, ca-certificates)
- The default flavor used is "desktop"
- Use the provided script for building a custom rootfs:
-
Applying Custom Rootfs:
- After creating the custom rootfs, follow these steps:
$ sudo tar xpf -C Linux_for_Tegra/rootfs $ cd Linux_for_Tegra/ $ sudo ./tools/l4t_flash_prerequisites.sh $ sudo ./apply_binaries.sh
- Running
apply_binaries.sh
is crucial to include Nvidia drivers in the rootfs
- After creating the custom rootfs, follow these steps:
-
Installing Jetpack and CUDA Support:
- Jetpack cannot be installed on a customized rootfs using the provided script due to dependency checks
- For production devices, manually install Jetpack on each device:
sudo apt update sudo apt install nvidia-jetpack
- Alternatively, set up one device, clone its image, and flash the image to other devices:
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/FlashingSupport.html#backing-up-and-restoring-a-jetson-device
-
Efficient Production Setup:
- Create a reference unit with all desired updates and content
- Clone the reference unit’s image
- Before flashing each device, place the cloned image as
Linux_for_Tegra/bootloader/system.img
- Use the
-r
option when flashing to reuse this image:sudo ./flash.sh -r jetson-orin-nano-devkit mmcblk0p1
-
Managing Jetpack Packages:
- Jetpack is a meta-package depending on multiple other packages
- Debian packages are saved in
/var/cache/apt/archives/
after installation - Consider setting up a local package repository for faster installation in production
-
Optimizing Build Transfer Between PCs:
- Create a tar archive of the entire build on PC1
- Transfer the tar archive to PC2
- Extract the archive on PC2 and use it for building and flashing
-
Additional Tips:
- Regularly update packages on your reference system before cloning
- Be cautious when cloning systems, as it includes all accounts and passwords
- Guard your cloned images carefully, as they are large and time-consuming to create
- For CUDA-specific support, you may need to install only specific components of Jetpack rather than the entire package
By following these steps and recommendations, users should be able to efficiently customize, transfer, and deploy Jetson Orin Nano filesystems in both development and production environments.