OTA failed when rootfs is on NVME

Hi All,
I am testing the OTA update with rootfs on NVME and rootfs A/B is enabled.

The test process as below.

Flash r32.7.3

sudo ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1 -S 238GiB -c ./tools/kernel_flash/flash_l4t_nvme_rootfs_ab.xml jetson-xavier-nx-devkit-emmc external 

Generate OTA package.

export BASE_BSP=/home/frank/Work1/Xavier_NX/ota/L4T_r32-7-3/Linux_for_Tegra
export TARGET_BSP=/home/frank/Work1/Xavier_NX/ota/L4T_r35-2-1/Linux_for_Tegra

cd ${TARGET_BSP}/../
sudo tar xpf ota_tools_R35.2.1_aarch64.tbz2
cd ${TARGET_BSP}
sudo -E ROOTFS_AB=1 ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh --external-device nvme0n1 -S 238GiB jetson-xavier-nx-devkit-emmc R32-7

Do OTA on jestson xavier nx with rootfs mounting on NVME

mkdir ~/ota
cp ota_tools_R35.2.1_aarch64.tbz2 ~/ota
sudo mkdir /ota
cp ota_payload_package.tar.gz /ota
cd ~/ota
tar -xvpjf ota_tools_R35.2.1_aarch64.tbz2
cd Linux_for_Tegra/tools/ota_tools/version_upgrade
sudo ./nv_ota_start.sh /ota/ota_payload_package.tar.gz

After OTA was done, the system boot into internal eMMC(mmcblk0) not nvme. And it upgrade both slot A and slot B.

line[192]: # Write APP and APP_b if it exists
...
action=Write_APP item=44, 1:3:APP, 20480, 7516192768, , , fixed-<reserved>-1, 
Do write APP action
eval ROOTFS_PARTITION=/dev/mmcblk0p1
...
action=Write_APP_b item=45, 1:3:APP_b, 7516213248, 7516192768, , , fixed-<reserved>-2, 
Do write APP_b action
eval ROOTFS_PARTITION=/dev/mmcblk0p2
...
  1. How to upgrade NVME via OTA? Am I missing any command?
  2. How to let the OTA tool upgrade only one slot!?
    ota_log.txt (335.7 KB)

Hi All,
After setting the num_sectors with correct size in flash_l4t_nvme_rootfs_ab.xml, this issue has been fixed. But it still OTA upgrade both rootfs A and B slot at the same time. Is it a bug of OTA upgrade with rootfs A/B enable!?

What does that mean “But it still OTA upgrade both rootfs A and B slot at the same time”?

What is your expectation here?

Hi WayneWWW,
I mean I can OTA from r32.7.3 to r35.2.1 with rootfs on nvme. But the rootfs A and B slot are both upgraded to r35.2.1. Shouldn’t it only upgrade one slot!? For example, if the active rootfs slot is A, then OTA tool should upgrade rootfs slot B only.
ota_log.txt (8.7 KB)

Hi,

It is normal behavior when doing cross version (rel-32 → rel-35) OTA because the flash partition layout are totally different. Your “upgrade one rootfs only” will only happen in rel-32.x ->rel-32.x or rel-35.x → rel-35.x.

1 Like

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