How to modify ota file with customize partition layout?

Hi Nvidia,

We would like to upgrade jetson nx from 32.7.1 to 35.1 by ota payload package.
There is partition layout change already in our 32.7.1 : flash_l4t_t194_spi_emmc_p3668.xml add two partition between RECROOTFS and UDA as beneth:

        <partition name="RECROOTFS" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> RECROOTFSSIZE </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Optional.** Reserved for future use by the recovery filesystem;
              removable. </description>
        </partition>
        <partition name="ADRESERVE" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 12288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Optional.** Reserved for ADLINK use. </description>
        </partition>
        <partition name="ADRESERVE_b" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 12288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Optional.** Reserved for ADLINK use. </description>
        </partition>
        <partition name="UDA" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 18432 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x808 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Required.** Automatically takes all remaining space on the device except that
              occupied by the `secondary_gpt` partition. Allocation attribute must be set to 0x808.
              May be mounted and used to store user data. </description>
        </partition>

in 35.1, we also add these two partition in flash_l4t_t194_spi_emmc_p3668.xml

<partition name="RECROOTFS" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> RECROOTFSSIZE </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Optional.** Reserved for future use by the recovery filesystem;
              removable. </description>
        </partition>
        <partition name="esp" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 67108864 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> ESP_FILE </filename>
            <partition_type_guid> C12A7328-F81F-11D2-BA4B-00A0C93EC93B </partition_type_guid>
            <description> **Required.** EFI system partition with L4T Launcher. </description>
        </partition>
        <partition name="ADRESERVE" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 12288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Optional.** Reserved for ADLINK use. </description>
        </partition>
        <partition name="ADRESERVE_b" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 12288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Optional.** Reserved for ADLINK use. </description>
        </partition>
        <partition name="UDA" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 18432 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x808 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Required.** Automatically takes all remaining space on the device except that
              occupied by the `secondary_gpt` partition. Allocation attribute must be set to 0x808.
              May be mounted and used to store user data. </description>
        </partition>

for OTA package, we modify relation file as Image_based_OTA_Examples.txt example 1.
To build the payload, show error as beneth

[   1.2245 ] Concatenating BCT for chain B to bct_backup.img

[   1.2245 ] dd if=br_bct_b_BR.bct of=bct_backup.img bs=1 seek=16384 conv=notrunc
[   1.2254 ] 2888+0 records in
[   1.2292 ] 2888+0 records out
[   1.2292 ] 2888 bytes (2.9 kB, 2.8 KiB) copied, 0.00347462 s, 831 kB/s
[   1.2292 ] 
[   1.2292 ] Generating signatures
[   1.2320 ] tegrasign_v3.py --key None --list images_list.xml --pubkeyhash pub_key.key
[   1.2323 ] Assuming zero filled SBK key
[   1.3200 ] Warning: pub_key.key is not found
[   1.3193 ] Parsing dev params for multi chains
[   1.3193 ] Generating br-bct
[   1.3215 ] Performing cfg overlay
[   1.3215 ] ['/opt3_ssd_development/Nvidia_ORIN_AGX_NX_Project/OTA/NVIDIA_ORIN_AGX_NX_Linux.35.1_FlashEnv/deploy.evk/Linux_for_Tegra/bootloader/3195105/tmp537zc82n1.cfg']
[   1.3215 ] Updating dev and MSS params in BR BCT
[   1.3215 ] tegrabct_v2 --dev_param tegra194-br-bct-qspi-l4t.cfg --sdram /opt3_ssd_development/Nvidia_ORIN_AGX_NX_Project/OTA/NVIDIA_ORIN_AGX_NX_Linux.35.1_FlashEnv/deploy.evk/Linux_for_Tegra/bootloader/3195105/tmp537zc82n1.cfg --brbct br_bct.cfg --sfuse tegra194-mb1-soft-fuses-l4t.cfg --chip 0x19 0
[   1.3752 ] Updating bl info
[   1.3777 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x19 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   1.3807 ] Updating smd info
[   1.3828 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x19 --updatesmdinfo flash.xml.bin
[   1.3843 ] Start sector for MSI_EMMC_START, expected >= 30274608, actual 30274560
Error: Return value 4
Command tegrabct_v2 --brbct br_bct_BR.bct --chip 0x19 --updatesmdinfo flash.xml.bin
signed_dir=/opt3_ssd_development/Nvidia_ORIN_AGX_NX_Project/OTA/NVIDIA_ORIN_AGX_NX_Linux.35.1_FlashEnv/deploy.evk/Linux_for_Tegra/R32x_R35-ToT_OTA/images-R35A-R35i/3668-100--
grep: /opt3_ssd_development/Nvidia_ORIN_AGX_NX_Project/OTA/NVIDIA_ORIN_AGX_NX_Linux.35.1_FlashEnv/deploy.evk/Linux_for_Tegra/bootloader/signed/flash.idx: No such file or directory
grep: /opt3_ssd_development/Nvidia_ORIN_AGX_NX_Project/OTA/NVIDIA_ORIN_AGX_NX_Linux.35.1_FlashEnv/deploy.evk/Linux_for_Tegra/bootloader/signed/flash.idx: No such file or directory
Warning: the file written to partition BCT is not found
grep: /opt3_ssd_development/Nvidia_ORIN_AGX_NX_Project/OTA/NVIDIA_ORIN_AGX_NX_Linux.35.1_FlashEnv/deploy.evk/Linux_for_Tegra/bootloader/signed/flash.idx: No such file or directory
grep: /opt3_ssd_development/Nvidia_ORIN_AGX_NX_Project/OTA/NVIDIA_ORIN_AGX_NX_Linux.35.1_FlashEnv/deploy.evk/Linux_for_Tegra/bootloader/signed/flash.idx: No such file or directory
Warning: the file written to partition MB1_BCT is not found
grep: /opt3_ssd_development/Nvidia_ORIN_AGX_NX_Project/OTA/NVIDIA_ORIN_AGX_NX_Linux.35.1_FlashEnv/deploy.evk/Linux_for_Tegra/bootloader/signed/flash.idx: No such file or directory

For error , we can not figure out what’s wrong.
would nvidia kindly show us how to modify ota package file for our customized partition layout??

hello yi-chia.lan,

please refer to developer guide for this session, Update with Partition Layout Changes.

Hi JerryChang,
I don’t think most of user can modify the file by reference to the online document. There is less information and guidance there.

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

Hi kayccc,

no, still failed on generate payload image.