Creating and Deploying OTA Update Package for Jetson Orin Nano Boards
Issue Overview
Users are experiencing difficulties when attempting to create and deploy an Over-The-Air (OTA) update package for Jetson Orin Nano boards. The specific issue arises when trying to generate an update payload package containing a new rootfs image while maintaining the same L4T version. The problem occurs during the package generation process, resulting in an error related to partition sizes.
Key points of the issue include:
- The boards are set up with A/B partitions enabled (30GiB for each partition, plus a 50.6GiB UDA partition)
- Users are attempting to push an update with a new rootfs image but the same L4T version
- The process involves creating a custom rootfs image, compressing it, and generating an update payload package
- An error occurs during the package generation, specifically related to the APP_b partition size
Possible Causes
-
Partition Size Mismatch: The error message suggests a discrepancy in the expected and actual end sector for the APP_b partition. This could be due to incorrect partition sizing or configuration.
-
Incompatible Partitioning Layout: The use of a custom board for Orin Nano might lead to differences in the partitioning layout, causing issues during the update package generation.
-
Incorrect Partition Format: The error might be caused by not passing the correct partition format to the OTA package generation script.
-
Inconsistent Flashing and OTA Generation Parameters: Using different partitioning files for flashing the board and generating the OTA package could lead to compatibility issues.
-
Software Version Incompatibility: The specific Jetpack version (5.1.2) might have known issues or limitations with OTA updates for custom boards.
Troubleshooting Steps, Solutions & Fixes
-
Verify Partition Layout:
- Ensure that the partition layout used for flashing the board matches the one used for generating the OTA package.
- Review the current partition layout:
sudo fdisk -l /dev/nvme0n1
- Compare this with the expected layout for your custom board.
-
Use Correct Partitioning File:
- Identify the partitioning file used during the initial board flashing.
- Use the same file when generating the OTA package:
sudo -E ROOTFS_AB=1 ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh --external-device nvme0n1 -S30GiB -f rootfs_sparse.img jetson-orin-nano-devkit R35-4 --partition-layout /path/to/your/partition_layout.xml
Replace
/path/to/your/partition_layout.xml
with the actual path to your partition layout file. -
Simplify OTA Package Generation:
- Try generating the OTA package without the
-sr
parameter and without specifying a custom rootfs image:sudo -E ROOTFS_AB=1 ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh --external-device nvme0n1 -S30GiB jetson-orin-nano-devkit R35-4
This approach has been reported to work successfully.
- Try generating the OTA package without the
-
Verify Environment Variables:
- Ensure that the
BASE_BSP
andTARGET_BSP
environment variables are correctly set to the same L4T directory. - Verify with:
echo $BASE_BSP echo $TARGET_BSP
- Ensure that the
-
Check Jetpack Compatibility:
- Confirm that Jetpack 5.1.2 supports OTA updates for your specific custom board configuration.
- Consider updating to the latest Jetpack version if available, as it may include fixes for OTA-related issues.
-
Validate Rootfs Image:
- If using a custom rootfs image, ensure it’s properly created and compatible with your board:
sudo dd if=/dev/nvme0n1p1 of=/mnt/uda/rootfs.img bs=1M status=progress
- Verify the image integrity after compression:
mksparse -v --fillpattern=0 /path/to/rootfs.img /path/to/rootfs_sparse.img
- If using a custom rootfs image, ensure it’s properly created and compatible with your board:
-
Review OTA Package Generation Logs:
- Analyze the full output of the
l4t_generate_ota_package.sh
script for any additional error messages or warnings. - Pay special attention to any mentions of partition sizes or layout discrepancies.
- Analyze the full output of the
-
Consult NVIDIA Documentation:
- Review the official NVIDIA documentation for Jetson Orin Nano OTA updates to ensure all prerequisites and steps are correctly followed.
By following these troubleshooting steps and applying the suggested fixes, users should be able to successfully create and deploy OTA update packages for their Jetson Orin Nano boards with custom configurations.