Jetson AGX Orin Devkit SD card ROOTFS_AB enabled using same rootfs partition for both slots

I’m using eMMC and SD card on Jetson AGX Orin devkit. When ROOTFS_AB is enabled on eMMC and switching between slots, different eMMC partitions are used for rootfs. However for SD card when switching between slots, the same partition is used for rootfs.
Here is the console output for eMMC case:

# nvbootctrl -t rootfs dump-slots-info
Current rootfs slot: A
Active rootfs slot: A
num_slots: 2
slot: 0,             retry_count: 3,             status: normal
slot: 1,             retry_count: 3,             status: normal
# nvbootctrl dump-slots-info
Current version: 35.4.1
Capsule update status: 0
Current bootloader slot: A
Active bootloader slot: A
num_slots: 2
slot: 0,             status: normal
slot: 1,             status: normal
# nvbootctrl get-current-slot
0
# lsblk -l
NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0        7:0    0    16M  1 loop 
mmcblk0    179:0    0  59.3G  0 disk 
mmcblk0p1  179:1    0    27G  0 part /
mmcblk0p2  179:2    0    27G  0 part 
mmcblk0p3  179:3    0   128M  0 part 
mmcblk0p4  179:4    0   768K  0 part 
mmcblk0p5  179:5    0  31.6M  0 part 
mmcblk0p6  179:6    0   128M  0 part 
mmcblk0p7  179:7    0   768K  0 part 
mmcblk0p8  179:8    0  31.6M  0 part 
mmcblk0p9  179:9    0    80M  0 part 
mmcblk0p10 179:10   0   512K  0 part 
mmcblk0p11 179:11   0    64M  0 part 
mmcblk0p12 179:12   0    80M  0 part 
mmcblk0p13 179:13   0   512K  0 part 
mmcblk0p14 179:14   0    64M  0 part 
mmcblk0p15 179:15   0   400M  0 part 
mmcblk0p16 179:16   0 479.5M  0 part 

The rootfs for eMMC slot 0 is mounted from mmcblk0p1 partition.
After switching active slot to 1 and rebooting the devkit:

# nvbootctrl get-current-slot
1
root@jetsonDevkit2:~# lsblk -l
NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0        7:0    0    16M  1 loop 
mmcblk0    179:0    0  59.3G  0 disk 
mmcblk0p1  179:1    0    27G  0 part 
mmcblk0p2  179:2    0    27G  0 part /
mmcblk0p3  179:3    0   128M  0 part 
mmcblk0p4  179:4    0   768K  0 part 
mmcblk0p5  179:5    0  31.6M  0 part 
mmcblk0p6  179:6    0   128M  0 part 
mmcblk0p7  179:7    0   768K  0 part 
mmcblk0p8  179:8    0  31.6M  0 part 
mmcblk0p9  179:9    0    80M  0 part 
mmcblk0p10 179:10   0   512K  0 part 
mmcblk0p11 179:11   0    64M  0 part 
mmcblk0p12 179:12   0    80M  0 part 
mmcblk0p13 179:13   0   512K  0 part 
mmcblk0p14 179:14   0    64M  0 part 
mmcblk0p15 179:15   0   400M  0 part 
mmcblk0p16 179:16   0 479.5M  0 part 

The rootfs for eMMC slot 1 is mounted from mmcblk0p2 partition, different partition than slot 0.
Installed and formatted Micro SD card in Jetson agx orin devkit, which is recognized as as mmcblk1
SD card image is flashed using this command:

sudo ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk1p1 -c ./tools/kernel_flash/flash_l4t_external.xml --showlogs --network usb0 jetson-agx-orin-devkit internal

The boot order changed to boot from SD card. After reboot:

# nvbootctrl -t rootfs dump-slots-info
Current rootfs slot: B
Active rootfs slot: B
num_slots: 2
slot: 0,             retry_count: 3,             status: normal
slot: 1,             retry_count: 3,             status: normal
# nvbootctrl dump-slots-info
Current version: 35.4.1
Capsule update status: 0
Current bootloader slot: B
Active bootloader slot: B
num_slots: 2
slot: 0,             status: normal
slot: 1,             status: normal
# nvbootctrl get-current-slot
1
# lsblk -l
NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0        7:0    0    16M  1 loop 
mmcblk0    179:0    0  59.3G  0 disk 
mmcblk0p1  179:1    0    27G  0 part 
mmcblk0p2  179:2    0    27G  0 part 
mmcblk0p3  179:3    0   128M  0 part 
mmcblk0p4  179:4    0   768K  0 part 
mmcblk0p5  179:5    0  31.6M  0 part 
mmcblk0p6  179:6    0   128M  0 part 
mmcblk0p7  179:7    0   768K  0 part 
mmcblk0p8  179:8    0  31.6M  0 part 
mmcblk0p9  179:9    0    80M  0 part 
mmcblk0p10 179:10   0   512K  0 part 
mmcblk0p11 179:11   0    64M  0 part 
mmcblk0p12 179:12   0    80M  0 part 
mmcblk0p13 179:13   0   512K  0 part 
mmcblk0p14 179:14   0    64M  0 part 
mmcblk0p15 179:15   0   400M  0 part 
mmcblk0p16 179:16   0 479.5M  0 part 
mmcblk1    179:32   0 953.6G  0 disk 
mmcblk1p1  179:33   0    27G  0 part /
mmcblk1p2  179:34   0   128M  0 part 
mmcblk1p3  179:35   0   768K  0 part 
mmcblk1p4  179:36   0  31.6M  0 part 
mmcblk1p5  179:37   0   128M  0 part 
mmcblk1p6  179:38   0   768K  0 part 
mmcblk1p7  179:39   0  31.6M  0 part 
mmcblk1p8  179:40   0    80M  0 part 
mmcblk1p9  179:41   0   512K  0 part 
mmcblk1p10 179:42   0   300M  0 part 
mmcblk1p11 179:43   0    64M  0 part 
mmcblk1p12 179:44   0    80M  0 part 
mmcblk1p13 179:45   0   512K  0 part 
mmcblk1p14 179:46   0    64M  0 part 

The rootfs for SD card slot 1 is mounted from mmcblk1p1 partition.
After changing the SD card slot from 1 to 0 and rebooting the devkit:

# nvbootctrl get-current-slot
0
# lsblk -l
NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0        7:0    0    16M  1 loop 
mmcblk0    179:0    0  59.3G  0 disk 
mmcblk0p1  179:1    0    27G  0 part 
mmcblk0p2  179:2    0    27G  0 part 
mmcblk0p3  179:3    0   128M  0 part 
mmcblk0p4  179:4    0   768K  0 part 
mmcblk0p5  179:5    0  31.6M  0 part 
mmcblk0p6  179:6    0   128M  0 part 
mmcblk0p7  179:7    0   768K  0 part 
mmcblk0p8  179:8    0  31.6M  0 part 
mmcblk0p9  179:9    0    80M  0 part 
mmcblk0p10 179:10   0   512K  0 part 
mmcblk0p11 179:11   0    64M  0 part 
mmcblk0p12 179:12   0    80M  0 part 
mmcblk0p13 179:13   0   512K  0 part 
mmcblk0p14 179:14   0    64M  0 part 
mmcblk0p15 179:15   0   400M  0 part 
mmcblk0p16 179:16   0 479.5M  0 part 
mmcblk1    179:32   0 953.6G  0 disk 
mmcblk1p1  179:33   0    27G  0 part /
mmcblk1p2  179:34   0   128M  0 part 
mmcblk1p3  179:35   0   768K  0 part 
mmcblk1p4  179:36   0  31.6M  0 part 
mmcblk1p5  179:37   0   128M  0 part 
mmcblk1p6  179:38   0   768K  0 part 
mmcblk1p7  179:39   0  31.6M  0 part 
mmcblk1p8  179:40   0    80M  0 part 
mmcblk1p9  179:41   0   512K  0 part 
mmcblk1p10 179:42   0   300M  0 part 
mmcblk1p11 179:43   0    64M  0 part 
mmcblk1p12 179:44   0    80M  0 part 
mmcblk1p13 179:45   0   512K  0 part 
mmcblk1p14 179:46   0    64M  0 part 

The rootfs for SD card slot 0 is using the same mmcblk1p1 partition as slot 1.

While eMMC slots are using different rootfs partitions, why the SD card with ROOTFS_AB enabled is using the same partition for both slots?

That’s because you used the wrong partition layout file.
flash_l4t_external.xml does not contain anything related to ROOTFS_AB.
Use flash_l4t_t234_nvme_rootfs_ab.xml instead.

Hi Dave,
Thank you for your response. Changing the partition layout file fixed the issue.
Just a follow up question. What is the purpose of internal command line parameter for flashing the SD card:

sudo ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk1p1 -c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_ab.xml --showlogs --network usb0 jetson-agx-orin-devkit internal

Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt

Initrd flash depends on --external-device options and the last parameter <rootdev>
to generate the correct images. The following combinations are supported:
+-------------------+-----------------+-------------------------------------------------------+
| --external-device |       <rootdev> | Results                                               |
+-------------------+-----------------+-------------------------------------------------------+
| nvme*n*p* / sda*  |        internal | External device contains full root filesystem with    |
|                   |                 | kernel commandline: rootfs=PARTUUID=<external-uuid>   |
|                   |                 |                                                       |
|                   |                 | Internal device contains full root filesystem with    |
|                   |                 | kernel commandline: rootfs=PARTUUID=<internal-uuid>   |
+-------------------+-----------------+-------------------------------------------------------+
| nvme*n*p* / sda*  | nvme0n*p* / sd* | External device  contains full root filesystem with   |
|                   |                 | with kernel commandline rootfs=/dev/nvme0n1p1         |
|                   |                 |                                                       |
|                   |                 | Internal device contains minimal filesystem with     |
|                   |                 | kernel command line rootfs=/dev/nvme0n1p1             |
+-------------------+-----------------+-------------------------------------------------------+
| nvme*n*p* / sda*  |       mmcblk0p1 | External device  contains full root filesystem with   |
|                   |                 | with kernel commandline rootfs=/dev/nvme0n1p1         |
|                   |                 |                                                       |
|                   |                 | Internal device contains full filesystem with     |
|                   |                 | kernel command line rootfs=/dev/mmcblk0p1             |
+-------------------+-----------------+-------------------------------------------------------+
| nvme*n*p* / sda*  |        external | External device contains full root filesystem with    |
|                   |                 | kernel commandline: rootfs=PARTUUID=<external-uuid>   |
|                   |                 |                                                       |
|                   |                 | Internal device contains minimal root filesystem with |
|                   |                 | kernel commandline: rootfs=PARTUUID=<external-uuid>   |
+-------------------+-----------------+-------------------------------------------------------+```

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