I’m developing for the Xavier and I’m looking into enabling OTA updates using L4T’s built-in A/B redundancy functionality. While I can see how I would go about creating a BUP for updating the various bootloader partitions and the kernel partitions, I’m not seeing a way to go about enabling redundancy for the rootfs partition (i.e. the APP partition). I can hack something together where I can flash two partitions (APP and APP_b), then change the rootdev cmdline parameter of kernel-dtb: for _a, I can set rootdev to point to mmcblk0p1, and for _b, I can set rootdev to point to mmcblk0p2. However, I don’t see how this would work with BUPs given that the update engine doesn’t seem to allow for separate partition data for _a and _b on the same partition name.
Is there an officially supported way to get rootfs A/B updates using, e.g. the BUP?
according to Bootloader Update and Redundancy, it’s an update process for a safe bootloader update.
also, the file system redundancy is disabled by default.
may I know which JetPack release you’re working with.
thanks
I’ve successfully gotten the BUP working for kernel and bootloader updates, but like you said, the L4T documentation mentions that NVIDIA potentially has a method of getting rootfs OTA updates working as well.
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
Thanks very much for the info! I probably won’t have time to test this in depth this month, but I will report back in early October to see if I run into any issues. Based on my poking around the CBoot source code, that seems like the best approach.
Hello, I wonder if would be possible to have such A/B rootfs redundancy on Nvidia Xavier when using cboot_src_t19x_32.2.3
I wasn’t able to find the partition layout xml nor any reference to CONFIG_ENABLE_A_B_ROOTFS in CBoot.
Thank you
@JerryChang,
thank you for the prompt answer.
I wasn’t able to find the partition layout XML nor any reference to CONFIG_ENABLE_A_B_ROOTFS in CBoot.
Could you please clarify what did you mean?
Thank you
it’s because you will need to have implementation to enable A/B redundancy for root file system.
please add a define config in l4t.mk file; for example, CONFIG_ENABLE_A_B_ROOTFS .
thanks
because root file system A/B redundancy did not enabled by default,
you’ll need to create a define config and also have your own functional implementations.
for example, you may refer to add_boot_slot_suffix() function which add boot.slot_suffix=… to command line.
#if defined(CONFIG_ENABLE_A_B_SLOT)
static int add_boot_slot_suffix(char *cmdline, int len, char *param, void *priv){...}