OTA package creation

Hi,

I am using jetson orin nx customized board, i need some guidance to creating OTA package.

Flash with ROOFTS AB support and UDA disk encryption.

My exception are listed below:

  • OTA package will update only boot loader, kernel and roots of B in case device using A partition via.
  • How to get the OTA update status.
  • How to update particular partition or file.
  • How to make backup of files in roots or any other.

*** Please note that this reply is generated by LLM automatically ***

To create an OTA package for your Jetson Orin NX customized board with ROOFTS AB support and UDA disk encryption, you can follow these steps:

  1. Prepare the OTA payload package: Use the l4t_generate_ota_package.sh script to generate the OTA payload package. This script is part of the OTA tool package, which can be downloaded from the Jetson Linux page.

  2. Specify the options for ROOFTS AB support and UDA disk encryption: When running the l4t_generate_ota_package.sh script, you need to specify the options for ROOFTS AB support and UDA disk encryption. For ROOFTS AB support, you can use the -S option to specify the partition layout. For UDA disk encryption, you need to set ROOTFS_ENC=1 and specify the key file for disk encryption using the -i option.

  3. Update only the bootloader, kernel, and rootfs: To update only the bootloader, kernel, and rootfs, you can use the -b option to specify the bootloader image, the -k option to specify the kernel image, and the -r option to specify the rootfs image.

  4. Get the OTA update status: To get the OTA update status, you can use the nv_ota_status.sh script, which is part of the OTA tool package. This script can provide information about the current OTA update status, including whether the update is in progress, completed, or failed.

  5. Update a particular partition or file: To update a particular partition or file, you can use the -p option to specify the partition or file to be updated. For example, to update the bootloader partition, you can use the -p bootloader option.

  6. Make a backup of files in rootfs or any other partition: To make a backup of files in rootfs or any other partition, you can use the nv_ota_preserve_data.sh script, which is part of the OTA tool package. This script can pack the listed files into a .tar.gz archive, which can be used to restore the files later.

Here is an example of how to create an OTA package for your Jetson Orin NX customized board with ROOFTS AB support and UDA disk encryption:

./l4t_generate_ota_package.sh -S <partition_layout> -b <bootloader_image> -k <kernel_image> -r <rootfs_image> -i <key_file> -p <partition_to_update> ROOTFS_ENC=1

Note: Replace <partition_layout>, <bootloader_image>, <kernel_image>, <rootfs_image>, <key_file>, and <partition_to_update> with the actual values for your system.

In comparison to other methods, the image-based OTA update method is a failsafe way to update the BSP on a Jetson device by writing pre-generated images to its partitions. This method supports updates between versions with different partition layouts that require layout changes during the update. Additionally, this method can be used to update the bootloader, kernel, and rootfs, and it supports ROOFTS AB and UDA disk encryption.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

hello muralikrishnan.t,

it’s suggest to update l4t_generate_ota_package.sh and ota_board_specs.conf for customize board to create OTA payloads.
please see-also Topic 332980 for an example.

besides.. you’ll need to generate OTA payload with ROOTFS_AB=1 and ROOTFS_ENC=1 since you’ve enable root file system redundancy and disk encryption.
here’s an example for OTA payload creation.
$ export BASE_BSP=~/nvidia_sdk/JetPack_6.0_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra
$ export TARGET_BSP=~/nvidia_sdk/JetPack_6.2_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra
$ sudo ROOTFS_AB=1 ROOTFS_ENC=1 -E ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh --external-device nvme0n1 -i ./sym2_t234.key --uefi-keys ./uefi_keys/uefi_keys.conf --rootfs-uuid 2ff299c5-0b33-46ce-8ba7-136ecf882384 --rootfs-b-uuid 7da5fc07-9ca4-4cd3-94b9-e08b2c479ada --uda-uuid 8e109028-09f6-4c37-abee-af196dbea12a jetson-orin-nano-devkit R36-4

Hi,

My expectation is only need to update roofts, bootloader and kernel, other partition no change, then to update rootfs B partion.

hello muralikrishnan.t,

please follow above to create customize OTA payloads.

Hi,

i am using mash flash technique with generic key approach on my production, so any thing i need to take care for preparing OTA package.

hello muralikrishnan.t,

as mentioned earlier in post #5.
you’ll need to update l4t_generate_ota_package.sh and ota_board_specs.conf for customize board to create OTA payloads.

Okay thanks

Hi,

sudo ROOTFS_AB=1 ROOTFS_ENC=1 -E ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh --external-device nvme0n1 -i ./sym2_t234.key --uefi-keys ./uefi_keys/uefi_keys.conf --rootfs-uuid 2ff299c5-0b33-46ce-8ba7-136ecf882384 --rootfs-b-uuid 7da5fc07-9ca4-4cd3-94b9-e08b2c479ada --uda-uuid 8e109028-09f6-4c37-abee-af196dbea12a jetson-orin-nano-devkit R36-4

In this command use mentioned UUID whether it is mandatory, with one image i need to update many device. so the UUID is difficult to get.

hello muralikrishnan.t,

it’s just for demonstration, you may skip the settings actually.
please refer to readme file for more details.
for instance, $OUT/Linux_for_Tegra/tools/ota_tools/version_upgrade/Image_based_OTA_Examples.txt

Hi,

I have some doubt about ROOTFS_AB = 1 and ROOTFS_ENC = 1

In this the dual roofts will update or any one?

My case no need to update the encrypted disk, only boot loader, kernel and rootfs on device side

So this flag is required and any specific reason is there.

The generated image can be used to many device right? like field devices.

hello muralikrishnan.t,

you may create OTA payload to update only the bootloader or rootfs.
for instance,

Usage: sudo ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh [options] <target board> <bsp version>

                -b      Update bootloader only. Only valid if <bsp version> is R36.
                -r      Update rootfs only. Only valid if <bsp version> is R36.

it’s the single partition layout, i.e. flash_l4t_t234_nvme_rootfs_ab_enc.xml, you cannot have OTA update to exclude APP_ENC.