payloads/Kconfig: Add flat binary as payload option
This add another choice option for adding a flat binary instead of an
ELF or some other payload. It keeps the IS_PAYLOAD_FLAT_BINARY hidden in
the menuconfig because it is generally not configurable but dependent on
the payload you selected.
CONFIG_PAYLOAD_OPTIONS has been exposed to be configurable in commit
f0055e4a81 (payloads/Kconfig: Add flat binary as payload option) as part
trying to enable flat binary payloads. CONFIG_PAYLOAD_OPTIONS do not
need to be configurable though unless you have a flat binary. The patch
therefore takes a different appraoch by adding a new payload type
besides PAYLOAD_ELF and PAYLOAD_FIT.
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: If775e0846f9a5631da3fc103bdd9e6aea0be879a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/payloads/Kconfig b/payloads/Kconfig
index dc11310..d18c1b0 100644
--- a/payloads/Kconfig
+++ b/payloads/Kconfig
@@ -40,6 +40,17 @@
You will be able to specify the location and file name of the
payload image later.
+config PAYLOAD_FLAT_BINARY
+ bool "A flat binary"
+ select PAYLOAD_IS_FLAT_BINARY
+ help
+ Select this option if you have a flat binary without any
+ executable format surrounding it which coreboot should run
+ as soon as the basic hardware initialization is completed.
+
+ You will be able to specify the location and file name of the
+ payload image later.
+
source "payloads/external/*/Kconfig.name"
endchoice
@@ -82,17 +93,15 @@
endchoice
config PAYLOAD_OPTIONS
- string "Additional cbfstool options"
+ string "Additional cbfstool options" if PAYLOAD_FLAT_BINARY
default ""
+ depends on PAYLOAD_IS_FLAT_BINARY
help
Additional cbfstool options for the payload
config PAYLOAD_IS_FLAT_BINARY
- bool "Payload is a flat binary"
+ bool
default n
- help
- Add the payload to cbfs as a flat binary type instead of as an
- elf payload
config PAYLOAD_FIT_SUPPORT
bool "FIT support"