I am having some trouble understanding the l4t_generate_ota_package.sh script.
When using the script, how does it know which partition configuration file to use (for example flash_l4t_nvme_rootfs_ab.xml)?
When I do the initial flashing of my device using the l4t_initrd_flash.s script, I have to provide it. This seems to not be possible for the l4t_generate_ota_package.sh script.
When I did the initial flashing, I modified the NUM_SECTORS in the flash_l4t_nvme_rootfs_ab.xml file.
Furthermore, in the board configuration file i set the ROOTFSSIZE=60GiB.
When doing the initial flashing with the l4t_generate_ota_package.sh everything worked as expected.
Now, when I use the l4t_generate_ota_package.sh script with the mentioned adjustments (modified NUM_SECTORS and ROOTFSSIZE) it seems to fail with:
[ 2.9897 ] End sector for APP, expected at: 122159070, actual: 0
Error: Return value 4
However, if I dont do the mentioned changes it seems to generate the ota_package.
But then I am confused of how it will know the ROOTFSSIZE and the NUM_SECTORS that i used in the initial flashing.
I tried not configuring the ROOTFSSIZE in the boardconfig file but providing it to the l4t_generate_ota_package.sh script with the -S option, but i got the same error as above.
How can I specify it?
Currently I use: sudo ROOTFS_AB=1 ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh --external-device nvme0n1 jetson-orin-nano-devkit R35-4
Edit: I read your comment again, this means when specifying jetson-orin-nano-devkit and ROOTFS_AB=1
this will translate to the flash_l4t_nvme_rootfs_ab.xml, I think I understand that part now.
250GB
60GB for each APP partition
Base and Target are both 35.4.1
As mentioned, I generated the ota package using the command above without changing the ROOTFSIZE, thus I expected it to use 55GiB/2= 27.5GiB as this seems to be the default in the p3667.conf.common file.
Furthermore, I left num_sectors=“NUM_SECTORS” in the flash_l4t_nvme_rootfs_ab.xml without changing it to my num_sectors=“488397168” that I used for flashing.
However, when applying the ota package (nv_ota_start.sh), It still did make the App Partitions 60GiB.
I still get the same error: [ 2.9897 ] End sector for APP, expected at: 122159070, actual: 0 Error: Return value 4
Please note that if i dont specify the num_sectors and don’t provide the -S option to the script the generating of the ota image will work, and if i apply the package (doing the ota update), it will still have the 60GiB that i initially flashed.
What I mean is if I don’t modify the NUM_OF_SECTORS and dont provive the -S option, the result is what I want, but not what I expect. I expect the rootfs would be 55GiB/2 as described in the p3767.conf.common file:
ROOTFSSIZE=55GiB;
....
# Rootfs A/B:
if [ "${ROOTFS_AB}" == 1 ]; then
rootfs_ab=1
val=$(echo ${ROOTFSSIZE} | sed 's/GiB//g');
val=`expr ${val} / 2`;
ROOTFSSIZE="${val}GiB";
fi;
But as explained, when I do the OTA update it is 60GiB.
The APP partition in flash_l4t_t234_nvme_rootfs_ab.xml is put at the end of the disk.
However, The APP partition in flash_l4t_nvme_rootfs_ab.xml is put at the start of the disk.
You should use flash_l4t_t234_nvme_rootfs_ab.xml to flash the board of T234 series.
As my understanding, it should be 55GiB/2 as the default rootfs size.
How could it know 60GB if you never specify this size…?