Orin NX L4T 35.5.0 not booting from APP_b when ROOTFS_ENC=1 ROOTFS_AB=1

Hello,

I’m currently having an issue with my Orin NX when trying to boot from Slot B.

I have flashed my Orin NX with MFI using the following commands;

sudo BOARDID=3767 BOARDSKU=0000 ./tools/kernel_flash/l4t_initrd_flash.sh \                                                                        
        --network usb0 -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
        -i ./ekb.key --no-flash --massflash 5 \
        <custom_board> internal

sudo BOARDID=3767 BOARDSKU=0000 ROOTFS_ENC=1 ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh \                                             
        --network usb0 --showlogs  --no-flash --external-device nvme0n1p1 \
        -c ./tools/kernel_flash/<custom_a_b_enc_xml> \
        --external-only --append -i ./ekb.key ``-p "--generic-passphrase"`` \
        --massflash 5 <custom_board> external

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 1 

This works fine, no issues. I can boot my system and can see the partition layout is correct when I boot;

  • nvme0n1p1 is APP
  • nvme0n1p2 is APP_b
  • nvme0n1p3 is APP_ENC
  • nvme0n1p4 is APP_ENC_b
NAME                 MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
nvme0n1              259:0    0 149.1G  0 disk  
├─nvme0n1p1          259:1    0   400M  0 part  
├─nvme0n1p2          259:2    0   400M  0 part  
├─nvme0n1p3          259:3    0   7.6G  0 part  
│ └─crypt_root       252:0    0   7.6G  0 crypt /
├─nvme0n1p4          259:4    0   7.6G  0 part  
│ └─crypt_root_other 252:1    0   7.6G  0 crypt
├─nvme0n1p5          259:5    0   128M  0 part  
├─nvme0n1p6          259:6    0   768K  0 part  
├─nvme0n1p7          259:7    0  31.6M  0 part  
├─nvme0n1p8          259:8    0   128M  0 part  
├─nvme0n1p9          259:9    0   768K  0 part  
├─nvme0n1p10         259:10   0  31.6M  0 part  
├─nvme0n1p11         259:11   0    80M  0 part  
├─nvme0n1p12         259:12   0   512K  0 part  
├─nvme0n1p13         259:13   0    64M  0 part  
├─nvme0n1p14         259:14   0    80M  0 part  
├─nvme0n1p15         259:15   0   512K  0 part  
├─nvme0n1p16         259:16   0    64M  0 part  
├─nvme0n1p20         259:17   0   512K  0 part  /mnt/bootvars
├─nvme0n1p21         259:18   0     4G  0 part  /mnt/data
├─nvme0n1p22         259:19   0     1G  0 part  /var/log
├─nvme0n1p24         259:21   0    25G  0 part  /mnt/video
└─nvme0n1p25         259:22   0 101.5G  0 part  
  └─crypt_UDA        252:2    0 101.4G  0 crypt /storage

As a test I mounted APP and APP_b and modified the kernel cmdline args in extlinux.conf such that;

  • APP has mminit_loglevel=1
  • APP_b has mminit_loglevel=8

If I run the following commands;

sudo nvbootctrl -t rootfs set-active-boot-slot 1
sudo nvbootctrl -t bootloader set-active-boot-slot 1

and then reboot I can see that slot B is booting for all other partitions. However, in slot B UEFI seems to still load APP instead of APP_b boot partition and so my /proc/cmdline contains mminit_loglevel=1 (APP).

I also did a hexdump on some of the efivars, I was expecting BootChainOsCurrent to contain “6 1” but I can see “6 0” when on slot B.

hexdump -n 8 -e '2/4 " %u"' /sys/firmware/efi/efivars/BootChainFwCurrent-781e084c-a330-417c-b678-38e696380cb9
6 1
 
hexdump -n 8 -e '2/4 " %u"' /sys/firmware/efi/efivars/BootChainOsCurrent-781e084c-a330-417c-b678-38e696380cb9 
6 0
 
hexdump -n 8 -e '2/4 " %u"' /sys/firmware/efi/efivars/BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c 
6 1

Is there something else I need to set so UEFI knows to use APP_b for the boot chain?

Fixed my issue, needed to also add ROOTFS_AB=1 to the internal qspi flash command. Otherwise, UEFI does not see slot B.

sudo BOARDID=3767 BOARDSKU=0000 ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh \                                                                        
        --network usb0 -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
        -i ./ekb.key --no-flash --massflash 5 \
        <custom_board> internal

Adding in case anyone else has the same issue.

1 Like

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