End sector for APP_ENC_b, expected at: 119537630, actual: 0

Jetson AGX Orin

BSP R36.4.3

We use a 1TB nvme. The num_sectors has been set under the layouts:
flash_l4t_t234_nvme_rootfs_ab.xml and flash_l4t_t234_nvme_rootfs_ab_enc.xml
like below:
<device type="external" instance="0" sector_size="512" num_sectors="2000409264" >

We have no issues with:
sudo ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=0 \
./tools/kernel_flash/l4t_initrd_flash.sh \
--external-devicenvme0n1 \
-ctools/kernel_flash/flash_l4t_t234_nvme_rootfs_ab.xml \
-p "-c bootloader/generic/cfg/flash_t234_qspi_industrial.xml" \
-S 40GiB \
jetson-agx-orin-devkit-industrial external

We have layout issues when using the 40GiB rootfs size with the encrypted layout:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --network usb0 
–showlogs -p “-c bootloader/generic/cfg/flash_t234_qspi_industrial.xml” 
–no-flash jetson-agx-orin-devkit-industrial internal

sudo ROOTFS_ENC=1 ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=0 
./tools/kernel_flash/l4t_initrd_flash.sh --network usb0 
–showlogs --no-flash --external-device nvme0n1 -S 40GiB
-c tools/kernel_flash/flash_l4t_t234_nvme_rootfs_ab_enc.xml 
–external-only --append -i ./sym2_t234.key 
jetson-agx-orin-devkit-industrial external

Error:
[ 2.2194 ] End sector for APP_ENC_b, expected at: 119537630, actual: 0
Error: Return value 4

Setting the rootfs size to 16 GiB ( -S 16GiB ), as mentioned in the documentation, doesn’t cause the issue above.
However, setting 16GiB is not a solution for us.
We are really looking at using -S 40GiB or even larger. Is there anything else we can adjust to get AB and encryption working with a rootfs size of 40GiB for each APP_ENC and APP_ENC_b partitions?

Kind regards,
Jack

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

Based on the provided context, it appears that you are experiencing issues with the layout when using a 40GiB rootfs size with the encrypted layout on the Jetson AGX Orin BSP R3643. The error occurs when trying to set up A/B redundancy with encryption on a 1TB NVMe drive.

The provided command for flashing the Jetson AGX Orin with NVMe as rootfs storage is:

$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -u <pkc_keyfile> [-v <sbk_keyfile>] --uefi-keys uefi_keys/uefi_keys.conf -p "-c ./bootloader/generic/cfg/flash_t234_qspi.xml" -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml --showlogs --network usb0 jetson-agx-orin-devkit external

The issue seems to be related to the numsectors setting in the flash_l4t_t234_nvme.xml file. You have already set the numsectors value correctly, but the problem persists when using a 40GiB rootfs size.

Comparing the provided information, it is clear that reducing the rootfs size to 16GiB, as mentioned in the documentation, resolves the issue. However, this is not a viable solution for your use case, as you require a larger rootfs size.

To resolve the issue, you can try adjusting the numsectors value in the flash_l4t_t234_nvme.xml file to accommodate the larger rootfs size. You may need to recalculate the numsectors value based on the desired rootfs size and the sector size of the NVMe drive.

Additionally, you can try modifying the flash_l4t_t234_nvme.xml file to use a different layout configuration that supports larger rootfs sizes. However, this may require a deeper understanding of the layout configuration and the specific requirements of your use case.

It is also worth noting that the Jetson Orin NX and Orin Nano series use a similar command for flashing with NVMe as rootfs storage:

$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -u <pkc_keyfile> [-v <sbk_keyfile>] --uefi-keys uefi_keys/uefi_keys.conf -p "-c ./bootloader/generic/cfg/flash_t234_qspi.xml" -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml --showlogs --network usb0 jetson-orin-nano-devkit external

However, the layout configuration and numsectors value may differ between the Jetson AGX Orin and the Jetson Orin NX/Nano series.

In summary, to resolve the issue, you can try adjusting the numsectors value in the flash_l4t_t234_nvme.xml file or modifying the layout configuration to support larger rootfs sizes. If you are still experiencing issues, it may be helpful to consult the documentation or seek further assistance from NVIDIA support.

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

False alarm, the UDA size was also changed to a much bigger value causing the miss-alignment.

This post can be closed.

Regards,
Jack