Nv_update_engine --verify error SM: S22

Hi,

I’m having issue with the bootloader payload update.

In an image I have a generated bootloader update payload put into /opt/ota_package/bl_update_payload.

The A/B bootloader is activated with

$ nv_update_engine --enable-ab
$ nvbootctrl dump-slots-info
magic:0x43424e00,             version: 3             features: 3             num_slots: 2
slot: 0,             priority: 15,             suffix: _a,             retry_count: 7,             boot_successful: 1
slot: 1,             priority: 14,             suffix: _b,             retry_count: 7,             boot_successful: 1

The payload installation succeeds

$ nv_update_engine --install
Nvidia A/B-Redundancy Update tool Version 1.2
current slot 0
Start updating slot 1
Tegra User Block Device: /dev/disk/by-partlabel
Tegra Boot Block Device: /dev/mmcblk0boot0
HEADER: MAGIC NVIDIA__BLOB__V2
HEX_VALUE 131072
BLOB_SIZE 13008176
HEADER_SIZE 40
NUMBER_OF_ELEMENTS 49
HEADER_TYPE 0
UNCOMP_SIZE 13008176
MB1_RATCHET_LV 98
MTS_RATCHET_LV 112
ROLLBACK_FUSE_LV 109
config COMPATIBLE_SPEC not found in /etc/nv_boot_control.conf
Device TN Spec: 3310-D01-1000-B.0-1-0-jetson-tx2-mmcblk0p1
config COMPATIBLE_SPEC not found in /etc/nv_boot_control.conf
Device TN Spec: 3310-D01-1000-B.0-1-0-jetson-tx2-mmcblk0p1
Device is fused board.
ENTRY_TABLE:
PART  POS  LEN  VER TNSPEC TYPE UPDATABLE
bpmp-fw  5920  533904  2    1  1
sce-fw  539824  125568  2    1  1
cpu-bootloader  665392  287232  2    1  1
mb2  952624  117568  2    0  1
spe-fw  1070192  95984  2    0  1
secure-os  1166176  366400  2    1  1
adsp-fw  1532576  108208  2    1  1
BMP  1640784  70988  2    1  1
mb1  1711772  99664  2    2  1
mts-bootpack  1811436  2082144  2    1  1
mts-preboot  3893580  63104  2    0  1
sc7  3956684  23632  2    1  1
bpmp-fw-dtb  3980316  605120  2  3310-B00-1000--1-0-jetson-tx2-mmcblk0p1  1  0
bpmp-fw-dtb  4585436  605120  2  3310-B02-1000--1-0-jetson-tx2-mmcblk0p1  1  0
bpmp-fw-dtb  5190556  605120  2  3310-C04-1000--1-0-jetson-tx2-mmcblk0p1  1  0
bpmp-fw-dtb  5795676  605120  2  3310-D00-1000--1-0-jetson-tx2-mmcblk0p1  1  0
bpmp-fw-dtb  6400796  605120  2  3310-D01-1000--1-0-jetson-tx2-mmcblk0p1  1  1
bpmp-fw-dtb  7005916  605120  2  3310-D02-1000--1-0-jetson-tx2-mmcblk0p1  1  0
bootloader-dtb  7611036  371808  2  3310-B00-1000--1-0-jetson-tx2-mmcblk0p1  1  0
bootloader-dtb  7982844  371808  2  3310-B02-1000--1-0-jetson-tx2-mmcblk0p1  1  0
bootloader-dtb  8354652  371808  2  3310-C04-1000--1-0-jetson-tx2-mmcblk0p1  1  0
bootloader-dtb  8726460  371808  2  3310-D00-1000--1-0-jetson-tx2-mmcblk0p1  1  0
bootloader-dtb  9098268  371808  2  3310-D01-1000--1-0-jetson-tx2-mmcblk0p1  1  1
bootloader-dtb  9470076  371808  2  3310-D02-1000--1-0-jetson-tx2-mmcblk0p1  1  0
VER  9841884  102  2  3310-B00-1000--1-0-jetson-tx2-mmcblk0p1  0  0
VER  9841986  102  2  3310-B02-1000--1-0-jetson-tx2-mmcblk0p1  0  0
VER  9842088  102  2  3310-C04-1000--1-0-jetson-tx2-mmcblk0p1  0  0
VER  9842190  102  2  3310-D00-1000--1-0-jetson-tx2-mmcblk0p1  0  0
VER  9842292  102  2  3310-D01-1000--1-0-jetson-tx2-mmcblk0p1  0  1
VER  9842394  102  2  3310-D02-1000--1-0-jetson-tx2-mmcblk0p1  0  0
BCT  9842496  3584  2  3310-B00-1000--1-0-jetson-tx2-mmcblk0p1  2  0
BCT  9846080  3584  2  3310-B02-1000--1-0-jetson-tx2-mmcblk0p1  2  0
BCT  9849664  3584  2  3310-C04-1000--1-0-jetson-tx2-mmcblk0p1  2  0
BCT  9853248  3584  2  3310-D00-1000--1-0-jetson-tx2-mmcblk0p1  2  0
BCT  9856832  3584  2  3310-D01-1000--1-0-jetson-tx2-mmcblk0p1  2  1
BCT  9860416  3584  2  3310-D02-1000--1-0-jetson-tx2-mmcblk0p1  2  0
MB1_BCT  9864000  50096  2  3310-B00-1000--1-0-jetson-tx2-mmcblk0p1  0  0
MB1_BCT  9914096  50096  2  3310-B02-1000--1-0-jetson-tx2-mmcblk0p1  0  0
MB1_BCT  9964192  50096  2  3310-C04-1000--1-0-jetson-tx2-mmcblk0p1  0  0
MB1_BCT  10014288  50096  2  3310-D00-1000--1-0-jetson-tx2-mmcblk0p1  0  0
MB1_BCT  10064384  50096  2  3310-D01-1000--1-0-jetson-tx2-mmcblk0p1  0  1
MB1_BCT  10114480  50096  2  3310-D02-1000--1-0-jetson-tx2-mmcblk0p1  0  0
kernel  10164576  612752  2    1  1
kernel-dtb  10777328  371808  2  3310-B00-1000--1-0-jetson-tx2-mmcblk0p1  1  0
kernel-dtb  11149136  371808  2  3310-B02-1000--1-0-jetson-tx2-mmcblk0p1  1  0
kernel-dtb  11520944  371808  2  3310-C04-1000--1-0-jetson-tx2-mmcblk0p1  1  0
kernel-dtb  11892752  371808  2  3310-D00-1000--1-0-jetson-tx2-mmcblk0p1  1  0
kernel-dtb  12264560  371808  2  3310-D01-1000--1-0-jetson-tx2-mmcblk0p1  1  1
kernel-dtb  12636368  371808  2  3310-D02-1000--1-0-jetson-tx2-mmcblk0p1  1  0
Saving Entry table to /opt/ota_package/entry_table
Writing 533904 bytes to /dev/disk/by-partlabel/bpmp-fw_b for bpmp-fw
Writing 125568 bytes to /dev/disk/by-partlabel/sce-fw_b for sce-fw
Writing 287232 bytes to /dev/disk/by-partlabel/cpu-bootloader_b for cpu-bootloader
mb2 write: slot = 1 offset = 1276928 bytes = 117568
spe-fw write: slot = 1 offset = 883712 bytes = 95984
Writing 366400 bytes to /dev/disk/by-partlabel/secure-os_b for secure-os
Writing 108208 bytes to /dev/disk/by-partlabel/adsp-fw_b for adsp-fw
Writing 70988 bytes to /dev/disk/by-partlabel/BMP_b for BMP
Writing 2082144 bytes to /dev/disk/by-partlabel/mts-bootpack_b for mts-bootpack
mts-preboot write: slot = 1 offset = 1801216 bytes = 63104
Writing 23632 bytes to /dev/disk/by-partlabel/sc7_b for sc7
Writing 605120 bytes to /dev/disk/by-partlabel/bpmp-fw-dtb_b for bpmp-fw-dtb
Writing 371808 bytes to /dev/disk/by-partlabel/bootloader-dtb_b for bootloader-dtb
VER write: slot = 1 offset = 8257536 bytes = 102
MB1_BCT write: slot = 1 offset = 622592 bytes = 50096
Writing 612752 bytes to /dev/disk/by-partlabel/kernel_b for kernel
Writing 371808 bytes to /dev/disk/by-partlabel/kernel-dtb_b for kernel-dtb
mb1 write: slot = 0 offset = 32768 bytes = 99664
BCT slot = 0 write: offset = 3584 bytes = 3584
BCT slot = 0 write: offset = 0 bytes = 3584
Update Rollback partitions
Writing 533904 bytes to /dev/disk/by-partlabel/bpmp-fw for bpmp-fw
Writing 125568 bytes to /dev/disk/by-partlabel/sce-fw for sce-fw
Writing 287232 bytes to /dev/disk/by-partlabel/cpu-bootloader for cpu-bootloader
mb2 write: slot = 0 offset = 1014784 bytes = 117568
spe-fw write: slot = 0 offset = 752640 bytes = 95984
Writing 366400 bytes to /dev/disk/by-partlabel/secure-os for secure-os
Writing 108208 bytes to /dev/disk/by-partlabel/adsp-fw for adsp-fw
Writing 70988 bytes to /dev/disk/by-partlabel/BMP for BMP
Writing 2082144 bytes to /dev/disk/by-partlabel/mts-bootpack for mts-bootpack
mts-preboot write: slot = 0 offset = 1539072 bytes = 63104
Writing 23632 bytes to /dev/disk/by-partlabel/sc7 for sc7
Writing 605120 bytes to /dev/disk/by-partlabel/bpmp-fw-dtb for bpmp-fw-dtb
Writing 371808 bytes to /dev/disk/by-partlabel/bootloader-dtb for bootloader-dtb
VER write: slot = 0 offset = 8323072 bytes = 102
MB1_BCT write: slot = 0 offset = 557056 bytes = 50096
Writing 612752 bytes to /dev/disk/by-partlabel/kernel for kernel
Writing 371808 bytes to /dev/disk/by-partlabel/kernel-dtb for kernel-dtb
Update successful
Setting slot 1 as active boot slot
Rebooting system....10.9.8.7.6.5.4.3.2.1

The entry table file is generated in /opt/ota_package/entry_table

$ cat /opt/ota_package/entry_table
bpmp-fw,5920,533904,2,,1,1
sce-fw,539824,125568,2,,1,1
cpu-bootloader,665392,287232,2,,1,1
mb2,952624,117568,2,,0,1
spe-fw,1070192,95984,2,,0,1
secure-os,1166176,366400,2,,1,1
adsp-fw,1532576,108208,2,,1,1
BMP,1640784,70988,2,,1,1
mb1,1711772,99664,2,,2,1
mts-bootpack,1811436,2082144,2,,1,1
mts-preboot,3893580,63104,2,,0,1
sc7,3956684,23632,2,,1,1
bpmp-fw-dtb,6400796,605120,2,3310-D01-1000--1-0-jetson-tx2-mmcblk0p1,1,1
bootloader-dtb,9098268,371808,2,3310-D01-1000--1-0-jetson-tx2-mmcblk0p1,1,1
VER,9842290,102,2,3310-D01-1000--1-0-jetson-tx2-mmcblk0p1,0,1
BCT,9856829,3584,2,3310-D01-1000--1-0-jetson-tx2-mmcblk0p1,2,1
MB1_BCT,10064381,50096,2,3310-D01-1000--1-0-jetson-tx2-mmcblk0p1,0,1
kernel,10164573,39633296,2,,1,1
kernel-dtb,51285101,371808,2,3310-D01-1000--1-0-jetson-tx2-mmcblk0p1,1,1

The new slot is marked as successful, but yet the verification fails

$ nv_update_engine --verify
Nvidia A/B-Redundancy Update tool Version 1.2
verifying update
The current slot 1 is marked as boot successful
SM: S22
Previous update on slot 0 failed

and the first slot is invalidated

$ nvbootctrl dump-slots-info
magic:0x43424e00,             version: 3             features: 3             num_slots: 2
slot: 0,             priority: 0,             suffix: _a,             retry_count: 0,             boot_successful: 0
slot: 1,             priority: 15,             suffix: _b,             retry_count: 7,             boot_successful: 1

The kernel cmd has the correct slot suffix info:

$ cat /proc/cmdline 
console=ttyS0,115200 console=tty0 fbcon=map:0 isolcpus=1-2 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix=_b boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000@0x275840000 sdhci_tegra.en_boot_part_access=1 

How can I get more debug information about the failure? I’ve tried to strace nv_update_engine but get nothing out of the traces

$ strace nv_update_engine -v
execve("/usr/sbin/nv_update_engine", ["nv_update_engine", "-v"], 0x7feffd0318 /* 16 vars */) = 0
brk(NULL)                               = 0x2dbeb000
brk(0x2dbebf60)                         = 0x2dbebf60
uname({sysname="Linux", nodename="localhost", ...}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/usr/sbin/nv_update_engine", 4096) = 26
brk(0x2dc0cf60)                         = 0x2dc0cf60
brk(0x2dc0d000)                         = 0x2dc0d000
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
write(1, "Nvidia A/B-Redundancy Update too"..., 46Nvidia A/B-Redundancy Update tool Version 1.2
) = 46
openat(AT_FDCWD, "/etc/nv_boot_control.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
read(3, "TNSPEC 3310-D01-1000-B.0-1-0-ast"..., 1024) = 146
close(3)                                = 0
openat(AT_FDCWD, "/etc/nv_boot_control.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
read(3, "TNSPEC 3310-D01-1000-B.0-1-0-ast"..., 1024) = 146
close(3)                                = 0
openat(AT_FDCWD, "/dev/mmcblk0boot0", O_RDWR) = 3
lseek(3, 1636, SEEK_SET)                = 1636
read(3, "\0\0\3\0\276\17\0\0\0\20\0\0", 12) = 12
close(3)                                = 0
write(1, "verifying update\n", 17verifying update
)      = 17
openat(AT_FDCWD, "/proc/cmdline", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "console=ttyS0,115200 console=tty"..., 1024) = 424
read(3, "", 1024)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/etc/nv_boot_control.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
read(3, "TNSPEC 3310-D01-1000-B.0-1-0-ast"..., 1024) = 146
close(3)                                = 0
openat(AT_FDCWD, "/dev/mmcblk0boot0", O_RDWR) = 3
lseek(3, 2063360, SEEK_SET)             = 2063360
lseek(3, 2063360, SEEK_SET)             = 2063360
read(3, "\0NBC\3\3\2\0\17_a\7\1\0_b\0\0\246\337\326\262", 22) = 22
close(3)                                = 0
write(1, "The current slot 0 is marked as "..., 48The current slot 0 is marked as boot successful
) = 48
openat(AT_FDCWD, "/etc/nv_boot_control.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
read(3, "TNSPEC 3310-D01-1000-B.0-1-0-ast"..., 1024) = 146
close(3)                                = 0
openat(AT_FDCWD, "/dev/mmcblk0boot0", O_RDWR) = 3
lseek(3, 2063360, SEEK_SET)             = 2063360
lseek(3, 2063360, SEEK_SET)             = 2063360
read(3, "\0NBC\3\3\2\0\17_a\7\1\0_b\0\0\246\337\326\262", 22) = 22
close(3)                                = 0
openat(AT_FDCWD, "/etc/nv_boot_control.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
read(3, "TNSPEC 3310-D01-1000-B.0-1-0-ast"..., 1024) = 146
close(3)                                = 0
openat(AT_FDCWD, "/dev/mmcblk0boot0", O_RDWR) = 3
lseek(3, 2063360, SEEK_SET)             = 2063360
lseek(3, 2063360, SEEK_SET)             = 2063360
read(3, "\0NBC\3\3\2\0\17_a\7\1\0_b\0\0\246\337\326\262", 22) = 22
close(3)                                = 0
openat(AT_FDCWD, "/etc/nv_boot_control.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
read(3, "TNSPEC 3310-D01-1000-B.0-1-0-ast"..., 1024) = 146
close(3)                                = 0
openat(AT_FDCWD, "/dev/mmcblk0boot0", O_RDWR) = 3
lseek(3, 2063360, SEEK_SET)             = 2063360
lseek(3, 2063360, SEEK_SET)             = 2063360
read(3, "\0NBC\3\3\2\0\17_a\7\1\0_b\0\0\246\337\326\262", 22) = 22
close(3)                                = 0
write(1, "SM: S22\n", 8SM: S22
)                = 8
openat(AT_FDCWD, "/etc/nv_boot_control.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
read(3, "TNSPEC 3310-D01-1000-B.0-1-0-ast"..., 1024) = 146
close(3)                                = 0
openat(AT_FDCWD, "/dev/mmcblk0boot0", O_RDWR) = 3
lseek(3, 2063360, SEEK_SET)             = 2063360
lseek(3, 2063360, SEEK_SET)             = 2063360
read(3, "\0NBC\3\3\2\0\17_a\7\1\0_b\0\0\246\337\326\262", 22) = 22
close(3)                                = 0
openat(AT_FDCWD, "/etc/nv_boot_control.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
read(3, "TNSPEC 3310-D01-1000-B.0-1-0-ast"..., 1024) = 146
close(3)                                = 0
openat(AT_FDCWD, "/dev/mmcblk0boot0", O_RDWR) = 3
lseek(3, 2063360, SEEK_SET)             = 2063360
faccessat(AT_FDCWD, "/sys/block/mmcblk0boot0/force_ro", F_OK) = 0
openat(AT_FDCWD, "/sys/block/mmcblk0boot0/force_ro", O_RDWR) = 4
write(4, "0", 1)                        = 1
close(4)                                = 0
write(3, "\0NBC\3\3\2\0\17_a\7\1\0_b\0\0\246\337\326\262", 22) = 22
lseek(3, 2067456, SEEK_SET)             = 2067456
write(3, "\0NBC\3\3\2\0\17_a\7\1\0_b\0\0\246\337\326\262", 22) = 22
faccessat(AT_FDCWD, "/sys/block/mmcblk0boot0/force_ro", F_OK) = 0
openat(AT_FDCWD, "/sys/block/mmcblk0boot0/force_ro", O_RDWR) = 4
write(4, "1", 1)                        = 1
close(4)                                = 0
lseek(3, 2063360, SEEK_SET)             = 2063360
read(3, "\0NBC\3\3\2\0\17_a\7\1\0_b\0\0\246\337\326\262", 22) = 22
close(3)                                = 0
write(1, "Previous update on slot 1 failed"..., 33Previous update on slot 1 failed
) = 33
exit_group(0)                           = ?
+++ exited with 0 +++

Something in /dev/mmcblk0boot0 doesn’t seem to match what nv_update_engine but what?

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Can you tell more detail about the environment and other detail about your issue?

For example, if I just have a TX2 devkit, how can I reproduce same issue as yours? What jetpack are you using?

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