Hello,
i’m trying to create an OTA rootfs update on a AGX Xavier using A/B partition (JetPack 4.6.1 on a DevKit to start with).
Based on the docs
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/updating_jetson_and_host.html#
Creating the initial A/B image to flash works fine.
The UUIDs for the rootfs partitions in bootloader/l4t-rootfs-uuid.txt(_b) are
10d78fd3-d2fc-41e2-afff-4fea3cc38e92
956a7876-c537-4c1b-b450-711ae3401547
which matches the PARTUUIDS of the booted system
sudo blkid
...
/dev/mmcblk0p1: UUID="8afa047b-17b9-402e-8533-98a918516b85" TYPE="ext4" PARTLABEL="APP" PARTUUID="10d78fd3-d2fc-41e2-afff-4fea3cc38e92"
/dev/mmcblk0p2: UUID="a20c681f-e538-47dc-8c4f-32fd0a5a1b91" TYPE="ext4" PARTLABEL="APP_b" PARTUUID="956a7876-c537-4c1b-b450-711ae3401547"
...
which also matches the root option in /boot/extlinux/extlinux.conf
of both partitions:
APPEND ${cbootargs} quiet root=PARTUUID=10d78fd3-d2fc-41e2-afff-4fea3cc38e92 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 usbcore.usbfs_memory_mb=2048
APPEND ${cbootargs} quiet root=PARTUUID=956a7876-c537-4c1b-b450-711ae3401547 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 usbcore.usbfs_memory_mb=2048
and it matches also what the bootloader gives to the kernel at boot:
[0006.656] I> Continue to load from partition ...
[0006.656] I> A/B: bin_type (38) slot 0
[0006.657] I> Loading kernel-dtb from partition
[0006.657] I> Loading partition kernel-dtb at 0x91000000 from device(0x1)
[0006.670] I> Validate kernel-dtb ...
[0006.670] I> T19x: Authenticate kernel-dtb (bin_type: 38), max size 0x400000
[0006.675] I> Encryption fuse is not ON
[0006.677] I> removable_boot_load_kernel_and_dtb: force NVME bdev to close !!!
[0006.683] I> Kernel hdr @0xa0720000
[0006.686] I> Kernel dtb @0x90000000
[0006.689] I> decompressor handler not found
[0006.693] I> Copying kernel image (34484232 bytes) from 0xa0720800 to 0x80080000 ... [0006.706] I> Done
[0006.706] I> Move ramdisk (len: 7238344) from 0xa2804000 to 0x92000000
[0006.711] I> Updated bpmp info to DTB
[0006.713] I> Ramdisk: Base: 0x92000000; Size: 0x6e72c8
[0006.717] I> Updated initrd info to DTB
[0006.721] W> WARN: Fail to override "console=none" in commandline
[0006.727] I> Active rootfs suffix:
[0006.730] E> tegrabl_linuxboot_add_disp_param, du 0 failed to get display params
[0006.738] E> tegrabl_linuxboot_add_disp_param, du 0 failed to get display params
[0006.745] E> tegrabl_linuxboot_add_disp_param, du 0 failed to get display params
[0006.752] I> Active slot suffix:
[0006.755] I> add_boot_slot_suffix: slot_suffix =
[0006.760] I> Linux Cmdline: console=ttyTCU0,115200 root=PARTUUID=10d78fd3-d2fc-41e2-afff-4fea3cc38e92 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 usbcore.usbfs_memory_mb=2048 video=tegrafb earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt rootfs.slot_suffix= usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=8 boot.slot_suffix= boot.ratchetvalues=0.4.2 vpr_resize sdhci_tegra.en_boot_part_access=1
Up to this point everything is fine.
Also generating and installing the OTA rootfs update package works fine. The update doesn’t change the kernel or the jetpack version, just some files in the rootfs.
Both /boot/extlinux/extlinux.conf
are still correct
When rebooting on Slot 1 (B partition) something is wrong, it still mounts rootfs partition A. The bootloader gives /dev/mmcblk0p1
(partition A) instead of the UUID of partition B to the kernel as root option:
[0006.659] I> Continue to load from partition ...
[0006.659] I> A/B: bin_type (38) slot 1
[0006.659] I> Loading kernel-dtb_b from partition
[0006.660] I> Loading partition kernel-dtb_b at 0x91000000 from device(0x1)
[0006.673] I> Validate kernel-dtb ...
[0006.673] I> T19x: Authenticate kernel-dtb (bin_type: 38), max size 0x400000
[0006.678] I> Encryption fuse is not ON
[0006.680] I> removable_boot_load_kernel_and_dtb: force NVME bdev to close !!!
[0006.686] I> Kernel hdr @0xa0720000
[0006.689] I> Kernel dtb @0x90000000
[0006.692] I> decompressor handler not found
[0006.696] I> Copying kernel image (34484232 bytes) from 0xa0720800 to 0x80080000 ... [0006.709] I> Done
[0006.709] I> Move ramdisk (len: 7238344) from 0xa2804000 to 0x92000000
[0006.714] I> Updated bpmp info to DTB
[0006.717] I> Ramdisk: Base: 0x92000000; Size: 0x6e72c8
[0006.721] I> Updated initrd info to DTB
[0006.724] W> WARN: Fail to override "console=none" in commandline
[0006.730] I> Active rootfs suffix: _b
[0006.734] E> tegrabl_linuxboot_add_disp_param, du 0 failed to get display params
[0006.741] E> tegrabl_linuxboot_add_disp_param, du 0 failed to get display params
[0006.748] E> tegrabl_linuxboot_add_disp_param, du 0 failed to get display params
[0006.755] I> Active slot suffix: _b
[0006.759] I> add_boot_slot_suffix: slot_suffix = _b
[0006.764] I> Linux Cmdline: console=ttyTCU0,115200 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 video=tegrafb earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt rootfs.slot_suffix=_b usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=8 boot.slot_suffix=_b boot.ratchetvalues=0.4.2 vpr_resize sdhci_tegra.en_boot_part_access=1
So after booting the wrong (A) rootfs is mounted. The system still believes that the active slot is 1.
After rollback (setting active slot to 0 again) and rebooting the system boots fine again on slot 0 with the kernel being given the correct UUID as root option as after the initial flash.
So why does the kernel receive a device path instead of an uuid when booting from slot 1 ? And why is it mmcblk0p1 instead of mmcblk0p2 ?
Thanks and best regards