I have been running some OTA tests on Jetson AGX Xavier Devkit and JetPack 5.1.1 trying to get a modified partition layout after running the OTA update, however, the partitions were not modified.
I was following the Partition customization guide and I modified the xml files, the flash.idx files had the modified values but after OTA the partitions remained the same size.
I tried with and without ROOTFS_AB flag:
without ROOTFS_AB, the initial rootfs size is 28GB → tried to reduce the partition size to 20GB by modifying the xml files, setting the APP partition size to 20GB but the final size did not change
with ROOTFS_AB, the initial rootfs size is 14GB → tried to reduce the partition size to 10GB by modifying the xml files, setting the APP and APP_b partitions size to 10GB but the final sizes did not change
I am generating and applying the OTA from JetPack 5.1.1 to JetPack 5.1.1. From the documentation it seems to be possible to generate layout customization with OTA.
Can someone explain an example about how to generate partitions layout modifications with OTA from Jetpack5 to Jetpack5?
The OTA seems to work, the partition content is updated but the size remains the same.
I modified the xml files for Jetson AGX Xavier devkit layout (flash_t194_sdmmc_rootfs_ab.xml and flash_t194_sdmmc_rootfs_ab_R35A_R35i.xml), set the size as follow to implement a smaller size for APP and APP_b partitions:
<partition name="APP" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 10737418240 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x8 </allocation_attribute>
<align_boundary> 4096 </align_boundary>
<percent_reserved> 0 </percent_reserved>
<unique_guid> APPUUID </unique_guid>
<filename> APPFILE </filename>
<description> **Required.** Contains the rootfs. This partition must be defined after
`primary_gpt` so it can be accessed as the fixed known special device
`/dev/mmcblk0p1`. </description>
</partition>
<partition name="APP_b" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 10737418240 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x8 </allocation_attribute>
<align_boundary> 4096 </align_boundary>
<percent_reserved> 0 </percent_reserved>
<unique_guid> APPUUID_b </unique_guid>
<filename> APPFILE_b </filename>
<description> **Required.** Contains the rootfs. This partition must be defined after
`primary_gpt` so it can be accessed as the fixed known special device
`/dev/mmcblk0p2`. </description>
</partition>
In the flash.idx file the APP partitions are updated as well:
However, the ‘layout_change’ file is set to 0 and the OTA generation tool shows a message that the package is an update without layout change SUCCESS: generate OTA package for update without layout change.
You got 14GB for rootfs because the default size for rootfs a/b enabled is 14GB.
You could find more details in p2972-0000.conf.common. (28GiB/2 = 14GiB)
ubuntu@tegra-ubuntu:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 16M 1 loop
mmcblk0 179:0 0 29.1G 0 disk
├─mmcblk0p1 179:1 0 14G 0 part
├─mmcblk0p2 179:2 0 14G 0 part /
├─mmcblk0p3 179:3 0 160K 0 part
├─mmcblk0p4 179:4 0 4M 0 part
├─mmcblk0p5 179:5 0 4M 0 part
├─mmcblk0p6 179:6 0 512K 0 part
├─mmcblk0p7 179:7 0 2.5M 0 part
├─mmcblk0p8 179:8 0 64K 0 part
├─mmcblk0p9 179:9 0 1.5M 0 part
├─mmcblk0p10 179:10 0 1M 0 part
├─mmcblk0p11 179:11 0 160K 0 part
├─mmcblk0p12 179:12 0 2M 0 part
├─mmcblk0p13 179:13 0 2M 0 part
├─mmcblk0p14 179:14 0 1M 0 part
├─mmcblk0p15 179:15 0 128K 0 part
├─mmcblk0p16 179:16 0 80M 0 part
├─mmcblk0p17 179:17 0 512K 0 part
├─mmcblk0p18 179:18 0 32M 0 part
├─mmcblk0p19 179:19 0 160K 0 part
├─mmcblk0p20 179:20 0 4M 0 part
├─mmcblk0p21 179:21 0 4M 0 part
├─mmcblk0p22 179:22 0 512K 0 part
├─mmcblk0p23 179:23 0 2.5M 0 part
├─mmcblk0p24 179:24 0 64K 0 part
├─mmcblk0p25 179:25 0 1.5M 0 part
├─mmcblk0p26 179:26 0 1M 0 part
├─mmcblk0p27 179:27 0 160K 0 part
├─mmcblk0p28 179:28 0 2M 0 part
├─mmcblk0p29 179:29 0 2M 0 part
├─mmcblk0p30 179:30 0 1M 0 part
├─mmcblk0p31 179:31 0 128K 0 part
├─mmcblk0p32 259:0 0 80M 0 part
├─mmcblk0p33 259:1 0 512K 0 part
├─mmcblk0p34 259:2 0 32.5M 0 part
├─mmcblk0p35 259:3 0 80M 0 part
├─mmcblk0p36 259:4 0 512K 0 part
├─mmcblk0p37 259:5 0 8M 0 part
├─mmcblk0p38 259:6 0 8M 0 part
├─mmcblk0p39 259:7 0 300M 0 part
├─mmcblk0p40 259:8 0 128K 0 part
├─mmcblk0p41 259:9 0 64M 0 part /opt/nvidia/esp
├─mmcblk0p42 259:10 0 80M 0 part
├─mmcblk0p43 259:11 0 512K 0 part
├─mmcblk0p44 259:12 0 64M 0 part
└─mmcblk0p45 259:13 0 282.9M 0 part
zram0 251:0 0 3.8G 0 disk [SWAP]
zram1 251:1 0 3.8G 0 disk [SWAP]
zram2 251:2 0 3.8G 0 disk [SWAP]
zram3 251:3 0 3.8G 0 disk [SWAP]
In the OTA generation log, the final message still says “SUCCESS: generate OTA package for update without layout change” even after using the -S flag. The flag is only for external devices according to the documentation.
Do we need to force the layout change?
Which are the steps to get the layout change with OTA in a JetPack5 to JetPack5 scenario?
Or have you tried to modify the size in p2972-0000.conf.common ?
- ROOTFSSIZE=28GiB;
+ ROOTFSSIZE=20GiB;
Do you mean that you want to perform image-based OTA from R35.3.1(rootfs a/b = 14GiB/each) to R35.3.1(rootfs a/b = 10GiB/each)?
If so, we don’t support this use case to do layout change for R35 → R35.
Do you mean that you want to perform image-based OTA from R35.3.1(rootfs a/b = 14GiB/each) to R35.3.1(rootfs a/b = 10GiB/each)?
If so, we don’t support this use case to do layout change for R35 → R35.
Yes this is exactly what I try to achieve.
Which use cases perform the partition layout changes using the image-based-OTA? A step by step partition customization example will be useful.
Is there a possibility to patch the OTA tools to enable this support?
Image-base OTA with layout change is only supported for R32 to R35.
For R35 to R35, the offset of APP partition could not be modified after update.
If you don’t enable rootfs A/B and you still have available space after APP partition, then you could enlarge it before performing OTA.
The limitation is about the offset of rootfs is fixed and the OTA would not modify the size of rootfs.
Thanks for the information.
So, in an R32 to R35 case, Is it possible to change the rootfs partition sizes with OTA and ROOTFS_AB enabled?
As example, If I flash a Jetson AGX Xavier with default JetPack 4.6.X and ROOTFS_AB enabled, this means both rootfs partitions with default size of 14GB
Is it possible to generate an OTA update to Jetpack 5.1.1 (R35) with ROOTFS_AB enabled to use 10GB? This R32 ->R35 is the supported case but can we change the rootfs partitions size? if so, can you please explain the steps.
In summary, can we pass from R32 (14GB rootfs partitions) to R35 (10GB rootfs partitions) using only OTA?
I’ve checked this with internal that the offset and the size of APP partition could not be modified through image-based OTA for any case. It is the criteria for image-based OTA.
The reason is that all content is inside APP partition so that it could not be moved/modified during update.
Thanks for the information.
In the OTA documentation there is a section for partition layout customization, if rootfs partition size cannot be modified, then which are the use cases for this section?
Which partitions can be remove/resize/add?
How was this tested?
Under which scenarios can be the layout customized?
Asking just to understand the layout customization section from the documentation.
Custom partition or the other partitions like bootloader/kernel…etc could be configured in the partition layout file.
For example, if you want the size for kernel-dtb larger then you could modify the size of *_kernel-dtb.
The reason for APP could not be modified is caused from the OTA package and related tools used for OTA are inside this partition so that its offset and size could not be updated.