hello mattbow,
please have implementation to enable A/B redundancy for rootfs.
you’ll also access the cboot sources from L4T Sources package.
here are brief steps for your reference,
thanks
- Modify the partition layout xml, add APP_b immediately after APP partition. you should also set half of original APP size to both new partitions size.
- Add define config like CONFIG_ENABLE_A_B_ROOTFS=1 as below
$l4t-r32.2/public_sources/bootloader/partner/t18x/cboot/platform/t194/l4t.mk - Add a function similar to “add_boot_slot_suffix()” (that adds “boot.slot_suffix=…” to command line). Retrieve current command line settings, and change rootfs to active rootfs if necessary.
for example,
the default is
root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
if active is B, change it to
root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4
3.1) you might call A/B API tegrabl_a_b_get_active_slot(NULL, uint32_t *active_slot) to get current active slot number.
3.2) please make sure new code are guarded by CONFIG_ENABLE_A_B_ROOTFS