Nvbootctrl hardcoded to only handle AGX Xavier

Hi All,

We are running OTA updates on custom boards, our customer has Orin and AGX Xavier based boards. On Orin boards the OTA has been fully enabled, now we are running OTA on the AGX Xavier boards which is completing the process but nvbootctl is unable to switch the active boot slot, this error is also generated in a pristine JetPack 5 installation by changing the machine name in the file /etc/nv_boot_control.conf:

nvidia@nvidia-desktop:~$ nvbootctrl -t rootfs set-active-boot-slot 0
Error: open fail errno = 30 reason = Read-only file system
Error: write variable BootChainFwNext failed!

From the tests we have done, we have to manually set the machine name to jetson-agx-xavier-devkit in that nv_boot_control.conf file to be able to switch the active-boot-slot after running the OTA.

We are using custom machine names for the custom boards and it seems that nvbootctrl is hardcoded to only handle jetson-agx-xavier-devkit, any other name will handle the machine as Orin type (it will try to write to a RO partition but on Orin boards that partition is RW).

Just wondering if we can get a custom nvbootctrl binary to handle our case or get info about any other approach to handle custom AGX Xavier devices.

For the OTA process we modified the scripts to handle our custom machine names, on Orin based boards everything works as expected.

Regards.

Hi greivin.falls,

What’s your Jetpack version in use?

Do you mean all OTA processes work for your custom board if you modify the machine name in nv_boot_control.conf manually?

Please add sudo in this command, nvbootctrl must run with root permission.

Hi KevinFFF,

I am using Jetpack 5.1.1.

Using sudo the nvbootctrl fails with the same error.

Let’s see an example, using custom-agx as machine name:

  • We have a custom rootfs which has the nv_boot_control.conf file using custom-agx in the machine name, example:

TNSPEC 2888-400-0004-L.0-1-2-custom-agx-mmcblk0p1
COMPATIBLE_SPEC 2888-400-0004–1-2-custom-agx-
TEGRA_CHIPID 0x19
TEGRA_OTA_BOOT_DEVICE /dev/mmcblk0boot0
TEGRA_OTA_GPT_DEVICE /dev/mmcblk0boot1
COMPATIBLE_SPEC

  • We modified the OTA tools scripts to handle this custom-agx machine
  • When we run the OTA process, it works and applied the updates but doesn’t change the active-boot-slot so we have to run the command with nvbootctrl manually to set the new active-boot-slot.
  • Here nvbootctrl fails with the error because the custom-agx is not supported as AGX device

Error: open fail errno = 30 reason = Read-only file system
Error: write variable BootChainFwNext failed!

  • We had to manually modify /etc/nv_boot_control.conf with machine name jetson-agx-xavier-devkit to be able ti change the active-boot-slot because nvbootctrl is hardcoded to only support thisAGX machine

TNSPEC 2888-400-0004-L.0-1-2-jetson-agx-xavier-devkit-mmcblk0p1
COMPATIBLE_SPEC 2888-400-0004–1-2-jetson-agx-xavier-devkit-
TEGRA_CHIPID 0x19
TEGRA_OTA_BOOT_DEVICE /dev/mmcblk0boot0
TEGRA_OTA_GPT_DEVICE /dev/mmcblk0boot1
COMPATIBLE_SPEC

  • At this point (after we applied the OTA) we are able to switch the active-boot-slot

We have custom Orin boards and use the same approach but we don’t have to modify the nv_boot_control.con file, only the AGX variant needs that manual change. This means tha nvbootctrl is hardcoded to only handle AGX variants if the machine name is jetson-agx-xavier-devkit so we wonder if we can get a custom binari that handle our case or any other idea to overcome this hardcoded value in the nvbootctrl binary for AGX.

It seems if you change the board name in COMPATIBLE_SPEC or TNSPEC, the nvbootctrl will not mount esp and write the variable, will cause error.

There’s a workaround for this issue:

  1. change the board name in TNSPEC, such as TNSPEC 2888-xxxxxxx-custom-agx-
# cat /etc/nv_boot_control.conf
TNSPEC 2888-400-0004-L.0-1-2-custom-agx-
COMPATIBLE_SPEC 2888-400-0004–1-2-jetson-agx-xavier-devkit-
  1. change the background service script (/opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh) to unify the custom-agx to jetson-agx-xavier-devkit in COMPATIBLE_SPEC:
 jetson_agx_xavier_devkit=(
 	"unify_name=jetson-agx-xavier-devkit"
 	"orig_name=p2822-0000+p2888-0004"
 	"orig_name=p2822-0000+p2888-0001"
 	"orig_name=p2972"
 	"orig_name=jetson-xavier"
+ 	"orig_name=custom-agx"
 )

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