How do I change the boot option runtime in R32.1?

Hi, I always modify the extlinux.conf to change the boot option like boot from the USB device.

And I need to boot from USB or mmcblk0p2 immediately. Next time need to change back from mmcblk0p1.

In R28.2.1, the file(extlinux.conf) can do that. if I want to boot from USB, just modify the content “root=/dev/mmcblk0p1” to that “root=/dev/sda1” or “root=/dev/mmcblk0p2”.

But the file doesn’t exist in R32.1.

So, how can I do? thx

The latest release does not use U-Boot, and it was U-Boot which reads extlinux.conf. The device tree “chosen/bootargs” entry might now be the way to do it.

The extlinux.conf file had a line which is sent to the kernel as an argument, “root=/dev/mmcblk0p1”. I can’t say for sure, but it may be that changing it to another device in that device tree entry would do the job…but only if the driver for that device is loaded in the CBoot stage (and I do not know if that driver exists or not). I have not personally tried to set up alternate boot on R32.1.

Someone from NVIDIA can probably answer which USB and SATA drivers are available within CBoot.

Hi linuxdev,

So, how can I modify the “chosen/bootargs” at runtime immediately??

It’s read-only.


I am confused about the runtime immediately. AFAIK, boot parameters can’t be updated while system is running. You need to reboot the system with new boot parameters.

But if you want to change it using the dtb file that’s being used then modify the dtb and in turn the “bootargs” value using following steps:

  1. Install apt package device-tree-compiler
  2. On the Xavier, cd into /sys/firmware/devicetree
  3. Run command:
dtc -I fs -O dts -o /tmp/hello.dts base
  1. Make the change that you want to the “bootargs” variable.
  2. Run command:
dtc -I dts -O dtb -o <some-name>.dtb /tmp/hello.dts

Copy newly created .dtb file to the host system and flash on the system. Or you can run below command and then dd the encrypted dtb file.

sudo ./ --no-flash -k kernel-dtb -d <dtb-file-created> jetson-xavier mmcblk0p1

Hope this helps.

This is part of the device tree. Some of this is used prior to boot, and then passed on to the kernel (even with just CBoot). So you basically just have to edit the device tree. You won’t be able to change this at runtime or in a regular file (this ends up as a signed binary tree in a partition). The kernel customization docs talk about device tree customization. Basically the source form can be edited by hand, turned into a binary format, copied into the correct spot within the host’s flash software, and the flash will sign this followed by flashing to a partition.