Jetpack 5.1 Bootloader update

Hey,

I’ve created the bootloader update package with the following command:

sudo BOARDID=3668 FAB=100 ./build_l4t_bup.sh jetson-xavier-nx-devkit mmcblk0p1

Trying to install it with the following command:

nv_update_engine --install bl --payload /bl_update_payload

This yields the following error:

Nvidia A/B-Redundancy Update tool Version 2.2
Info: install bootloader to non-current slot is not supported.

Slots info:

Current version: 0.0.1
Capsule update status: 0
Current bootloader slot: A
Active bootloader slot: A
num_slots: 2
slot: 0,             status: normal
slot: 1,             status: normal

What am I doing wrong?
Despite that I am not apptempting to update the non current slot, I am wondering how I should use it with an A/B redundancy? The idea would be to update the currently unused slot, and reboot to the updated slot after it.

Okay I’ve found out whats going wrong here.

From 5.0.2 to 5.0.2 or 5.0.2 to 5.1 I need to use the old method generated with build_l4t_bup.sh and apply it with

 nv_update_engine --payload /bl_update_payload -i 

When I try to update without -f i get the following message:

Error: unable to find kernel cmdline paramater **boot.ratchetvalues**
Fail to check rollback level
Writing to partitions failed.
OTA Blob update failed. Status: 3
/usr/sbin/nv_bootloader_payload_updater --no-dependent-partition failed.
Slot 0 update failed
Error: installing bootloader updates failed: 768

The boot.ratchetvalues commandline is actually missing in my kernel commandline. In which step of customizing my OS could I have lost it?

With -f it seems to work, but that updates to the current slot, I need it to be applied to the active slot due to A/B rootfs being updated after the bootloader.
I have a shellscript that installs the rootfs to the currently unused partition and afterwards will change the active boot slot. The nv_update_engine will update the current slot.

For the versions 5.1 the uefi capsule update will be required.

Hi seeky15,

Do you mean that you could update bootloader to current slot successfully?

It seems “install bootloader to non-current slot is not supported.”.

The issue was that the nv_update_engine still exists in 5.1 despite it not working anymore, as you guys locked the access to the QSPI Flash from userland. Thats why my initial try did not work.

When I am coming from 5.0.2 to 5.1 the nv_update_engine still works while in the old userland.

I have made tests and it seems that despite the updater is saying it is updating to slot 0 and failed, it is actually installing to slot 1 and doing what I need.

Not sure what the error about the boot.ratchetvalues should mean though?

So I’ve updated from 5.0.2 to 5.1 now with the build_l4t_bup.sh and nv_update_engine.

The update worked, it boots with the new bootloader now. Unfortunately nvbootctrl -t rootfs now tells me that A/B is not enabled anymore.

RootFS A/B is not enabled.

How do I need to generate the bup so that the A/B stays enabled?

Edit: That seems to be an error in the nvbootctl. Despite it telling me that A/B is not enabled I was able to switch back to my old installation with the old bootloader using “nvbootctl -t rootfs set-active-boot-slot 0”. Anyway, how to fix it?

Here is the log, it does not sound correct, even though it boots:

Nvidia A/B-Redundancy Update tool Version 2.0
Got payload file: /mnt/nextroot/bup/bootloader.payload
current slot 0
Warning: not support yet!
SM: S11
Set slot 1 as unbootable and start updating.
Start running: /opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh -c
3668-100---1--jetson-xavier-nx-devkit-
Got update payload: /mnt/nextroot/bup/bootloader.payload
Tegra User Block Device: /dev/disk/by-partlabel
Tegra Boot Block Device: /dev/mtdblock0
Tegra GPT Block Device: /dev/mtdblock0
HEADER: MAGIC NVIDIA__BLOB__V3
HEX_VALUE 16975394
BLOB_SIZE 51026377
HEADER_SIZE 48
NUMBER_OF_ELEMENTS 28
HEADER_TYPE 0
UNCOMP_SIZE 51026377
MB1_RATCHET_LV 0
MTS_RATCHET_LV 0
ROLLBACK_FUSE_LV 0
Device TN Spec: 3668-200-0000-H.0-1-2-jetson-xavier-nx-devkit-
Device Compatible Spec: 3668-100---1--jetson-xavier-nx-devkit-
Device TN Spec: 3668-200-0000-H.0-1-2-jetson-xavier-nx-devkit-
Device Compatible Spec: 3668-100---1--jetson-xavier-nx-devkit-
Device is fused board.
ENTRY_TABLE:
PART  POS  LEN  VER TNSPEC TYPE UPDATABLE
BCT  5200  2888  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  2  1
BCT_A  8088  2888  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  4  0
BCT_B  10976  2888  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  4  0
BCT-boot-chain_backup  13864  32768  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  0  1
mb1  46632  248944  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  2  1
mb1_b  295576  248944  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  2  1
MB1_BCT  544520  30416  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  0  1
MEM_BCT  574936  198656  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  0  1
spe-fw  773592  95232  13601    0  1
mb2  868824  207584  13601    0  1
mts-preboot  1076408  24016  13601    0  1
mts-mce  1100424  145184  13601    0  1
mts-proper  1245608  3430416  13601    0  1
VER  4676024  109  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  0  1
cpu-bootloader  4676133  3215360  13601    0  1
bootloader-dtb  7891493  338048  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  0  1
secure-os  8229541  914992  13601    0  1
eks  9144533  5136  13601    0  1
bpmp-fw  9149669  1007392  13601    0  1
bpmp-fw-dtb  10157061  36176  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  0  1
rce-fw  10193237  529776  13601    0  1
adsp-fw  10723013  396848  13601    0  1
sc7  11119861  55264  13601    0  1
xusb-fw  11175125  133120  13601    0  1
secondary_gpt  11308245  16896  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  3  1
secondary_gpt_backup  11325141  16896  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  0  1
kernel  11342037  39360512  13601    1  1
kernel-dtb  50702549  323828  13601  3668-100-0001--1-2-jetson-xavier-nx-devkit-  1  1
Saving Entry table to /opt/ota_package/entry_table
Skip updating BCT-boot-chain_backup: slot 1, offset -1
MB1_BCT write: slot = 1 offset = 21495808 bytes = 30416
MEM_BCT write: slot = 1 offset = 21561344 bytes = 198656
spe-fw write: slot = 1 offset = 21823488 bytes = 95232
mb2 write: slot = 1 offset = 22085632 bytes = 207584
mts-preboot write: slot = 1 offset = 22347776 bytes = 24016
mts-mce write: slot = 1 offset = 22413312 bytes = 145184
mts-proper write: slot = 1 offset = 22609920 bytes = 3430416
VER write: slot = 1 offset = 33357824 bytes = 109
cpu-bootloader write: slot = 1 offset = 27131904 bytes = 3215360
bootloader-dtb write: slot = 1 offset = 31326208 bytes = 338048
Skip updating secure-os: slot 1, offset -1
Skip updating eks: slot 1, offset -1
Skip updating bpmp-fw: slot 1, offset -1
Skip updating bpmp-fw-dtb: slot 1, offset -1
Skip updating rce-fw: slot 1, offset -1
Skip updating adsp-fw: slot 1, offset -1
sc7 write: slot = 1 offset = 26804224 bytes = 55264
xusb-fw write: slot = 1 offset = 26935296 bytes = 133120
Skip updating secondary_gpt_backup: slot 1, offset -1
Writing 39360512 bytes to /dev/disk/by-partlabel/kernel_b for kernel_b
Writing 323828 bytes to /dev/disk/by-partlabel/kernel-dtb_b for kernel-dtb_b
GetEntryTable failed for A_mb1
Skipping partition: A_mb1
mb1 write: slot = 0 offset = 131072 bytes = 248944
mb1_b write: slot = 0 offset = 393216 bytes = 248944
GetEntryTable failed for A_mb1
Skipping partition: A_mb1
Error: unable to find kernel cmdline paramater boot.ratchetvalues
Fail to check rollback level 
Writing to partitions failed.
OTA Blob update failed. Status: 3
/usr/sbin/nv_bootloader_payload_updater --no-dependent-partition failed.
Start running: /usr/sbin/nv_bootloader_payload_updater --no-dependent-partition /mnt/nextroot/bup/bootloader.payload
Slot 1 update failed
Error: installing bootloader updates failed: 768

Have you referred to the following thread for the instruction of bootloader update with r35.2.1?
Mark bootloader bootable - #7 by carolyuu
Please replace t234 with t194 for Xavier NX

Hey, I am updating from 5.0.2 to 5.1.

The capsule update is only implemented in 5.1, 5.0.2 does not have the required efivars.
I need the tools from 5.0.2 to update to 5.1
When you update the userland to 5.1 while keeping the old bootloader it won’t work properly anymore. So the bootloader update has to be performed before the rootfs update.

So, any idea how to keep A/B rootfs enabled after updating?

Please check Rootfs A/B redundancy fail-over mechanism in Jetpack5.1 - Jetson & Embedded Systems / Jetson Xavier NX - NVIDIA Developer Forums

Hey @kayccc unfortunately that has nothing to do with my issue.

I updated from 5.0.2 to 5.1 as described in the manual, but afterwards the system will not have the A/B enabled anymore…

Have you tried to update from JP5.0.2 or JP5.1 to JP5.1.1?

Or just use apt to update Jetpack release?
Software Packages and the Update Mechanism — Updating from the NVIDIA APT Server

5.0.2 to 5.1

Apt update is not an option as we customized the kernel and other stuff.

Anyway. It does not seem like we will have any 5.0.2 system we can not update with reflash. So we can leave it as it is. You might just want to find out what’s wrong for other customers.

Updating the bootloader from 5.1.1 to 5.1.1 did not work either. I need to do some further tests. I’ll open another topic for that though.

I am using 5.1.1,and I has this problem too. Do you have get the solution? Thank you

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