Closed dwalkes closed 10 months ago
I believe I've addressed all the comments here. I've also re-tested on jetson-xavier-nx-devkit-emmc
in the default configuration with USE_REDUNDANT_FLASH_LAYOUT = "0"
and the branch of tegra-demo-distro at https://github.com/OE4T/tegra-demo-distro/pull/284 which sets USE_REDUNDANT_FLASH_LAYOUT_DEFAULT = "1"
.
Tomorrow I'll try with jetson-xavier-nx-devkit-emmc
and NVMe boot as well as Orin Nano with/without NVMe.
Tested with jetson-xavier-nx-devkit-emmc
Tested with jetson-orin-nano-devkit
Tested with jetson-orin-nano-devkit-nvme
In each of the redundant cases I ran capsule update and verified the slots changed accordingly.
I think this is ready to merge but let me know if you'd like me to try something else.
I'd like to backport this to kirkstone next as well, let me know if you'd like a PR for this.
Thanks @dwalkes ! Once we've got a passing build on master (with your PR merged there), I'll cherry-pick these to the other branches.
I've backported these changes to nanbield, mickledore, and kirkstone branches.
@dwalkes @madisongh with my orin nano on kirkstone with the tegra-demo-distro I don't see the redundant flash layout as being 1
/yocto/tegra-demo-distro-nvme/build$ bitbake -e demo-image-egl | grep ^USE_REDUNDANT_FLASH_LAYOUT
USE_REDUNDANT_FLASH_LAYOUT="0"
USE_REDUNDANT_FLASH_LAYOUT_DEFAULT="0"
I have these in my local.conf FWIW
IMAGE_INSTALL:append = " tegra-uefi-capsules"
TNSPEC_BOOTDEV = "nvme0n1p1"
@arrow53 I think https://github.com/OE4T/tegra-demo-distro/pull/284 was never backported to kirkstone. @madisongh would you prefer not to change tegra-demo-distro branches to avoid swapping partition layouts on stable branches? I should probably just clarify wording in https://github.com/OE4T/meta-tegra/wiki/Redundant-Rootfs-A-B-Partition-Support#setting-up-a-custom-machine in that case.
@dwalkes Yes, that's right - https://github.com/OE4T/tegra-demo-distro/pull/284 would have been a big surprise to folks already using kirkstone if it had been backported.
Add BSP support for enabling A/B redundancy and managing redundant and non-redundant A/B partition layouts, using the Nvidia provided BSP layouts.
See details in the wiki page at https://github.com/OE4T/meta-tegra/wiki/Redundant-Rootfs-A-B-Partition-Support
When combined with https://github.com/OE4T/meta-tegra/pull/1285 , this logic provides a base for supporting A/B slot switching using uefi variables and capsule updates which is independent of a specific update tool used to write parititions.
Control for supporting A/B rootfs partition layout is supported through
USE_REDUNDANT_FLASH_LAYOUT
which is set to 0 by default in the BSP layer, but set to 1 in tegra-demo-distro.Custom MACHINEs which already define their own
ROOTFSPART_SIZE
,PARTITION_LAYOUT_TEMPLATE
, andROOTFSPART_SIZE
shouldn't be impacted by this change, although anyone who has done their own overlay implementation for Rootfs A/B may want to remove it in favor of this implementation.I've initially tested this on
jetson-xavier-nx-devkit-emmc
anddemo-image-base
with this sequence:In local.conf:
After building/booting, I see slots enabled and slot A selected
After performing capsule update:
and rebooting, I see:
And rootfs changed to partition 2:
If/when this looks ready to merge I'll test on a few other platforms and try some non-redundant configs.
Closes https://github.com/OE4T/meta-tegra/issues/1389