This number must match the num_sectors value in your XML file.
Example Partition Layout (128 GB)
Partition
Size (Bytes)
Size (GB)
Purpose
A_kernel + DTB
134,217,728
0.13 GB
Slot A kernel
B_kernel + DTB
134,217,728
0.13 GB
Slot B kernel
ESP + ESP_alt
2 × 67,108,864
0.13 GB
EFI partitions
UDA
419,430,400
0.4 GB
Reserved by NV for OTA process. and, the UDA partition size to be a multiple of 512 Bytes
Reserved
502,792,192
0.5 GB
Reserve space in case there is any partition change
required in the future
APP (A)
48,318,382,080
48 GB
Rootfs slot A
APP_b (B)
48,318,382,080
48 GB
Rootfs slot B
GPT + misc
Remainder
Partition table + margin
✅ Sample device tag in XML
📌 If you use a different SSD, always use the actual value (num_sectors) returned by blockdev --getsz.
📌 Ensure the rootfs A/B partition size is divisible by 16384 (align_boundary).
3. Flashing Command
Use the following command to flash with A/B partitioning:
Parameter Explanation
Parameter
Description
ROOTFS_AB=1
Enables A/B rootfs partitioning
ROOTFS_RETRY_COUNT_MAX=3
Sets maximum retry count before marking a slot as bad
--external-device nvme0n1p1
Target device for rootfs (external NVMe SSD)
-c flash_l4t_nvme_rootfs_ab.xml
Custom partition layout XML file
-p "-c flash_t234_qspi.xml"
SPI QSPI config file for bootloader
--showlogs
Displays flashing log in real time
nru50p internal
Target board name and storage configuration
4. After Flashing
Once flashing completes successfully:
The system will boot from slot A (APP) by default.
Slot B (APP_b) will remain as the inactive partition.
You can verify the A/B slot status with nvbootctrl :
Example:
5. Switching Slots (Optional)
If you need to switch the boot slot manually:
The system will reboot into the B slot.
6. Troubleshooting
If partition table is not applied correctly
→ Double-check the total num_sectors in your XML matches your SSD capacity.
7. Useful Commands
Check partitions on target after boot:
✅ Summary:
By using ROOTFS_AB=1 and a custom XML layout, you can create a reliable dual-slot system suitable for OTA updates or production deployment. If slot A fails after an update, the system can safely fall back to slot B, ensuring service continuity.