When and how does B_kernel partition take effect

  • 1 BSP environment:
    jetpack 5.1.1
    R35 (release), REVISION: 3.1

  • 2 Problems:
    Is it necessary to update the B_kernel and B_kernel-dtb partitions during an OTA update on the AGX Orin, on condition that AB rootfs redundancy are not enabled? Since the B_kernel and B_kernel-dtb partitions are always present, I’m unclear about when and how these partitions are applied.

  • 3 Background:
    Extlinux and AB rootfs redundancy are not enabled on our device.
    According to UEFI DTB support and DTB support, by default, UEFI loads the kernel from the root filesystem (/boot/Image). We have commented out the /boot/extlinux/extlinux.conf file to force the device to boot from the kernel partition…
    accoring to rootfsredundancy,

The kernel and kernel-dtb partitions belong to the userspace. When rootfs redundancy is in use, they belong to the rootfs slots and are selected by their rootfs slots.

Furthermore, according to the rootfs redundancy configuration, the B_kernel is part of rootfs slot B, and rootfs slot B is bound to bootloader slot B. If rootfs slot B does not exist, then the B_kernel will never be loaded, since there is no corresponding rootfs slot B. Is that correct?

Hi,
If the device cannot be flashed/booted, please refer to the page to get uart log from the device:
Jetson/General debug - eLinux.org
And get logs of host PC and Jetson device for reference. If you are using custom board, you can compare uart log of developer kit and custom board to get more information.
Also please check FAQs:
Jetson AGX Orin FAQ
If possible, we would suggest follow quick start in developer guide to re-flash the system:
Quick Start — NVIDIA Jetson Linux Developer Guide 1 documentation
And see if the issue still persists on a clean-flashed system.
Thanks!

hi @carolyuu
We are not beginners.
Your previous response was not helpful at all.
Could you provide a proper answer to the question?
we mean answer questions directly first.

Hi Henry.Lou,

Are you using the devkit or custom board for AGX Orin?

We would suggest you perform image-based OTA twice to update both slots.
Slot B will be loaded when it boots failed in slot A in case it can’t boot at all.

Even if you don’t enable rootfs a/b, the boot chain A/B is enabled by default.
You can refer to the partition layout or Update and Redundancy — Jetson Linux Developer Guide documentation for details.

No, you can also switch boot slot through nvbootctrl command when you have only one rootfs.

Hi @KevinFFF
using custom board.
In our view, the boot slots (A and B) and the rootfs slots (A and B) are two separate entities.


The explanation above illustrates how to switch between bootloader slots A and B. However, since the bootloader does not include the AB_kernel partition, switching to bootloader slot B will not result in the application of the B_kernel partition. Is this correct?
please refer to this rootfsredundancy

and

BTW
nvbootctrl can only switch boot slot, can not switch rootfs slot when AB rootfs redundancy are not enabled.

root@tegra:/usr/sbin# nvbootctrl is-rootfs-ab-enabled
is-rootfs-ab-enabled is not implemented.
root@tegra:/usr/sbin# nvbootctrl -h
nvbootctrl: invalid option -- 'h'
nvbootctrl - command-line wrapper for the boot_control HAL.

Usage:
  nvbootctrl [Options] Command

Options:
  -t <target>                    - target available: bootloader or rootfs. Default: bootloader.

Commands:
  get-number-slots               - Prints number of slots.
  get-current-slot               - Prints currently running SLOT.
  set-active-boot-slot SLOT      - On next boot, load and execute SLOT.
  dump-slots-info                - Prints info for slots.
  verify                         - Verify the bootloader and rootfs boot.
  set-SR-BR SLOT                 - On next warm reset, load and execute SLOT. (T194 bootloader only)
  is-rootfs-ab-enabled           - Rootfs only. Return 0 if rootfs A/B is disabled;
                                 - Return 1 if rootfs A/B is enabled, current slot is A;
                                 - Return 2 if rootfs A/B is enabled, current slot is B;

SLOT parameter is the zero-based slot-number.

No. bootloader A will load kernel A, bootloader B will load kernel B.
They are boot “chain” so that there’s not the case for bootloader A loads kernel B.

When rootfs A/B is disabled, both boot chain will load current APP partition as rootfs.
You can also run $ sudo nvbootctrl -t rootfs dump-slots-info to check and it should report if rootfs a/b is enabled.

Hi @KevinFFF
What does “boot chain B” contain? please list all fo them.
Does it include mb1_b, mb2_b, B_xusb-fw, and B_psc_bl1?

We assume that the B_kernel is not part of the bootloader slot B, since the capsule update payload does not include the kernel image. is it correct?
refer to
https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/Bootloader/UpdateAndRedundancy.html#generating-a-single-spec-bup

Could you provide more details on how the bootloader in slot B selects the B_kernel partition? Specifically, how does it interact with the bootloader and UEFI and load the B_kernel , etc?

Yes, with all partitions in layout file labeled with _b.

It depends on which capsule are you generating. (<partition>_only_payload)

May I know what’s your use case or the issue you hit currently?

kernel is loaded by bootloader(UEFI) and it is determined by UEFI variable.

Hi @KevinFFF

we mean the bl_only_payload.
(refer to generating-a-specified-partition-bup)

Could you provide more details on how the Jetson device determines which partition(A/B_kernel) to boot from? For instance, does it involve setting a specific register?
I would also appreciate an explanation of the red rectangle in the picture. (or maybe the bootchain you called)

Yes, it is determined by the UEFI variable.
Please run $ sudo nvbootctrl dump-slots-info to check current boot slot.

It just shows that if the kernel is loaded from partiton, then it would also load DTB from partition.

Could you provide more details on how the Jetson device determines which partition(A/B_kernel) to boot from? For instance, does it involve setting a specific register?

Please let us know what’s your use case for this.
As my understanding, A_cpu-bootloader will load A_kernel, B_cpu-bootloader will load B_kernel.