From 085c97363ed6477c64b61263a59d7e9642e05cda Mon Sep 17 00:00:00 2001 From: Maximilian Brune Date: Sat, 27 Jan 2024 12:14:39 +0100 Subject: [PATCH] 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 Change-Id: If775e0846f9a5631da3fc103bdd9e6aea0be879a Reviewed-on: https://review.coreboot.org/c/coreboot/+/80191 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- payloads/Kconfig | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/payloads/Kconfig b/payloads/Kconfig index dc11310829..d18c1b027f 100644 --- a/payloads/Kconfig +++ b/payloads/Kconfig @@ -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"