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>
This commit is contained in:
Maximilian Brune 2024-01-27 12:14:39 +01:00 committed by Felix Held
parent 564ef09ad6
commit 085c97363e

View File

@ -40,6 +40,17 @@ config PAYLOAD_FIT
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 @@ config COMPRESSED_PAYLOAD_LZ4
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"