summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-07-24 20:48:07 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-08-09 07:13:02 +0200
commit29a2e4e34c6c8f15010f0e5f98483309ecc6ec70 (patch)
tree9374fbd819e2966fcd34647da0f02ff964c292d7 /commands
parent206a4bc31fb518fadfd10e857cf7492442b54b59 (diff)
downloadbarebox-29a2e4e34c6c8f15010f0e5f98483309ecc6ec70.tar.gz
barebox-29a2e4e34c6c8f15010f0e5f98483309ecc6ec70.tar.xz
boot: allow booting by bootspec absolute path
When multiple bootloader spec files are available, the first match in lexical order will be the one to autoboot. Users can customize which one to use interactively via boot -m, but no means to select a different by default exists. Allow for this by having the boot command not only accept a directory to search for bootloader spec entries in, but also the path of a single bootloader spec file. This aligns it with what we have for bootscripts, where both directories containing boot scripts and the path to a specific boot script is understood. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220724184807.2123459-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/Kconfig1
-rw-r--r--commands/boot.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/commands/Kconfig b/commands/Kconfig
index 86e4714849..317c68c2ca 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -354,6 +354,7 @@ config CMD_BOOT
BOOTSRC can be:
- a filename under /env/boot/
- a full path to a boot script
+ - a full path to a bootspec entry
- a device name
- a partition name under /dev/
- a full path to a directory which
diff --git a/commands/boot.c b/commands/boot.c
index 485559bc46..5fd59f8642 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -133,6 +133,7 @@ BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("BOOTSRC can be:")
BAREBOX_CMD_HELP_TEXT("- a filename under /env/boot/")
BAREBOX_CMD_HELP_TEXT("- a full path to a boot script")
+BAREBOX_CMD_HELP_TEXT("- a full path to a bootspec entry")
BAREBOX_CMD_HELP_TEXT("- a device name")
BAREBOX_CMD_HELP_TEXT("- a partition name under /dev/")
BAREBOX_CMD_HELP_TEXT("- a full path to a directory which")