Updating uboot boot args via an OTA update?

Is there a recommended way of updating the Linux boot args via an OTA update?

From what I understand, the bootargs are currently taken from uboot as uboot is what manages which partition should be booted into.

I’ve seen that it is possible to specify the ‘chosen bootargs’ via a device tree binary, however I imagine using this rather than the uboot bootargs would interfere with Mender’s ability to manage OTA updates.

Is there a recommended way of combining the bootargs from UBoot with the boot args from the device tree?

@samlewis depends on which platform. Some platforms offer to use boot script (boot.scr) which is set various variables and boot kernel (also this script is doing mender setup). But as said depends on which target you want to use it. Thanks.

1 Like

I would typically create something like my_custom_bootargs and then set the following in U-boot,

set bootargs $bootargs $my_custom_bootargs

This way you can modify the my_custom_bootargs to extend the existing logic instead of overwriting it

1 Like

You can also do something in MENDER_UBOOT_PRE_SETUP_COMMANDS which is already processed by the Mender logic. To modify that with an OTA update you could probably invoke fw_setenv from a post-install state script.

1 Like