Can't switch kernel image in A_kernel partition

I’m using JP5.1.3.
I configured and built a kernel image and backed it up (I copied the Linux_for_Tegra/kernel/Image to a separate folder)

Now I wish to flash my A_kernel partition with that Image backup.
I used the following command:

sudo ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=1 ./ -c ./bootloader/t186ref/cfg/flash_t234_qspi_sdmmc_rootfs_ab.xml -k A_kernel -K /home/bsp/Desktop/Images/Image_A jetson-agx-orin-devkit mmcblk0p1

During the flash process I see it prints for generating a new boot.img and from the I know the boot.img contains the kernel image.

When booting up my target I see that for some reason its not using that kernel image (I removed some modules to be able to check the differences between two distinct kernel images)

What am I doing wrong?
From my understanding I can configure and create two separate kernel images , flash each of them into the appropriate partition (A_kernel and B_kernel) and then use them seperatly accroding to the active slot.

L4T by default loads kernel image from rootfs, as specified in /boot/extlinux/extlinux.conf, not the dedicated partition.
Refer to the document to make it boot from parititions:

Thank you for your answer.
Can you please briefly elaborate on the following questions:

  1. If I choose to use GRUB, then UEFI will load GRUB and it will load kernel?
  2. You said L4T loads kernel. L4T is bootloader? I thought UEFI loads the kernel.
  3. why I need 3 kernel images? (filesystem + partition + recovery) is there any specific good reason for that?
  4. Is there a specific scenario in which the system automatically loads the recovery kernel?


  1. YES
  2. I just mean the whole L4T BSP. You are right that it’s UEFI that loads the kernel.
  3. By default it uses the rootfs file, and fall backs to partition in case the former one does not work. The recovery kernel is used in scenarios like OTA and when your rootfs is dead and cannot boot.
  4. If you don’t have ROOTFS AB enabled, and the device fails to boot for three consecutive times, it will switch to the recovery kernel.

I encounter the following problem:

If I copy my custom kernel image to:

  1. L4T/kernel/Image
  2. L4T/rootfs/boot/Image

and than use one of the following commands to flash:

sudo ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=1 ./ -c ./bootloader/t186ref/cfg/flash_t234_qspi_sdmmc_rootfs_ab.xml -k APP jetson-agx-orin-devkit mmcblk0p1


sudo ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=1 ./ -c ./bootloader/t186ref/cfg/flash_t234_qspi_sdmmc_rootfs_ab.xml -k APP_b jetson-agx-orin-devkit mmcblk0p1

then for some reason I don’t see the custom kernel image in any of the slots (the system use other image)


If I copy the custom kernel image into the target and manually change it with /boot/Image I can see the difference after reboot.

Any idea why this happens?

(I didn’t modified the L4T options so it loads the kernel from the rootfs as you stated)

Then does it work if you don’t enable ROOTFS_AB or you don’t specify the APP/APP_b partition?

I didn’t tried since my goal is to use different kernel image on each slot.

you want me to try some steps and post here?

YES. Let’s do some experiment and see how it goes.
Please also check /boot/extlinux/extlinux.conf in each slot.

What exactly you want me to do and which logs to post?

This one.

I don’t think this is possible in the flashing stage.
You can only achieve this by manual replacing the kernel image after flashing.

So the solution is:

  1. Flash with A/B Enabled
  2. Manually replace kernel in whatever partition I want
  3. Backup A/B RootFS into system.img
  4. Reuse the backup system.img in future flash and it will contain the replaced kernel?

Sure, and you need to note that you don’t generate the image again when flashing, so the backup one is not replaced.

I’ll try and update here that everything works as expected

I confirm it works. I couldn’t modify the APP APP_b partitions sizes but I try to do it in the following thread:

I’ll update there.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.