Unable to use dd to flash updated cboot


I updated one of my Jetson AGX Xavier to JetPack 4.4.1 using apt update; apt upgrade method. As expected, it updated the cboot partition to the default.

We usually boot AGX Xavier over NFS for running our test suites every night. The system was setup (before upgrade) to boot over NFS. Looks like cbo.dtb was not upgraded because it still does “net” boot first.

However, since cpu-bootloader partition was upgraded, I have lost the changes made to the cboot to make it work over NFS. So, now I am trying to reflash the cpu-bootloader partition with the modified cboot_t194.bin file but it’s not taking the effect. Below are the steps I am following, please let me know if it’s correct or needs modification:

1. Copy modified cboot_t194.bin to bootloader/cboot_t194.bin
cp bootloader/cboot_t194.bin.NFS bootloader/cboot_t194.bin

2. Create a signed binary using flash.sh script with --no-flash option
sudo ./flash.sh --no-flash -r -k cpu-bootloader jetson-xavier mmcblk0p1

3. scp(1) over the bootloader/cboot_t194_sigheader.bin.encrypt to target system
scp /home/aaney/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/cboot_t194_sigheader.bin.encrypt root@<target>:/tmp

4. Verify `cpu-bootloader` partition number on the system
        # ls -l /dev/disk/by-partlabel/cpu-bootloader
        lrwxrwxrwx 1 root root 15 Oct 29 14:22 /dev/disk/by-partlabel/cpu-bootloader -> ../../mmcblk0p6

5. Use dd(1)  to flash `cpu-bootloader` partition
dd if=/tmp/cboot_t194_sigheader.bin.encrypt  of=/dev/mmcblk0p6

6. Reboot the system

The cboot_t194.bin has been updated to look the jetson.dtb file at cboot/01-MAC-Address-of-system/jetson.dtb on the TFTP server at the tftpboot directory. I have verified that the cboot_t194.bin has the updated jetson.dtb lookup path. I have also verified that bootloader/cboot_t194_sigheader.bin.encrypt is also up-to-date.

However, even after successfully dd(1)'ing to the cpu-bootloader partition the changes didn’t take effects. Please let me know if I am doing something wrong here.

Ohh, BTW, just out of curiosity I flashed cpu-bootloader_b(/dev/mmcblk0p7) partition with the modified CBoot, and that worked. So, looks like it’s using the B slot’s partitions. Is there a way to determine which slot is being used?

Found nvbootctrl tool to find everything.