bootstd: Add an implementation of script boot
Add a bootmeth driver which handles distro boot from a disk via a U-Boot
script, so we can boot a bootflow using this commonly used mechanism. This
is required by Armbian, for example.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/boot/Kconfig b/boot/Kconfig
index 373871c..64e16f3 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -377,6 +377,17 @@
This is a sandbox bootmeth driver used for testing. It always returns
-ENOTSUPP when attempting to boot.
+config BOOTMETH_SCRIPT
+ bool "Bootdev support for U-Boot scripts"
+ default y if BOOTSTD_FULL
+ help
+ Enables support for booting a distro via a U-Boot script. This makes
+ the bootdevs look for a 'boot/boot.scr' file which can be used to
+ boot the distro.
+
+ This provides a way to try out standard boot on an existing boot flow.
+ It is not enabled by default to save space.
+
endif
config LEGACY_IMAGE_FORMAT