From 3809fd35a5dbdbd62043ba0a72c3f37f58e69f9d Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Wed, 9 Oct 2024 14:15:40 +0100 Subject: bootstd: Add command to enable setting of bootmeth specific properties We have previously added logic to allow a "fallback" option to be specified in the extlinux configuration. Provide a command that allows us to set this as the preferred default option when booting. Combined with the bootcount functionality, this allows the "altbootcmd" to provide a means of falling back to a previously known good state after a failed update. For example, if "bootcmd" is set to: bootflow scan -lb We would set "altbootcmd" to: bootmeth set extlinux fallback 1; bootflow scan -lb Causing the boot process to boot from the fallback option. Reviewed-by: Simon Glass Signed-off-by: Martyn Welch --- doc/develop/bootstd/overview.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'doc/develop/bootstd') diff --git a/doc/develop/bootstd/overview.rst b/doc/develop/bootstd/overview.rst index c6f003851b2..a2913cd47be 100644 --- a/doc/develop/bootstd/overview.rst +++ b/doc/develop/bootstd/overview.rst @@ -103,6 +103,12 @@ provide a `read_bootflow()` method which checks whatever bootdevs it likes, then returns the bootflow, if found. Some of these bootmeths may be very slow, if they scan a lot of devices. +The extlinux bootmeth also allows for bootmeth specific configuration to be +set. A bootmeth that wishes to support this provides the `set_property()` +method. This allows string properties and values to be passed to the bootmeth. +It is up to the bootmeth to determine what action to take when this method is +called. + Boot process ------------ @@ -459,8 +465,8 @@ Three commands are available: See :doc:`/usage/cmd/bootflow` `bootmeth` - Allow listing of available bootmethds and setting the order in which they - are tried. See :doc:`/usage/cmd/bootmeth` + Allow listing of available bootmethds, setting the order in which they are + tried and bootmeth specific configuration. See :doc:`/usage/cmd/bootmeth` .. _BootflowStates: -- cgit v1.2.3