Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5716
-gerrit
commit d3f440dd9b2963a0019e0e0f346616e62c946f0d Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Sun May 11 08:45:39 2014 +1000
util/cbfstool: Make flat-binary Kconfig menu driven
Make adding flat (non-segmented) binary payloads more user friendly. We have cbfstool support for this file type however do not expose it yet in the menu interface.
Change-Id: I8c2994555fc80235848c46287df468d8725c5366 Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- Makefile.inc | 14 ++++++++++++++ src/Kconfig | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/Makefile.inc b/Makefile.inc index 3205a10..03b107a 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -481,6 +481,16 @@ $(obj)/coreboot.pre1: $(CBFSTOOL) mv $(obj)/coreboot.rom $@ endif
+ifeq ($(CONFIG_PAYLOAD_FLATBIN),y) +FLATBIN_ADDITIONAL_CONFIG:= +ifneq ($(strip $(call strip_quotes,$(CONFIG_FLATBIN_LOAD_ADDR))),) + FLATBIN_ADDITIONAL_CONFIG+=-l $(CONFIG_FLATBIN_LOAD_ADDR) +endif +ifneq ($(strip $(call strip_quotes,$(CONFIG_FLATBIN_ENTRY_POINT))),) + FLATBIN_ADDITIONAL_CONFIG+=-e $(CONFIG_FLATBIN_ENTRY_POINT) +endif +endif + ifeq ($(CONFIG_PAYLOAD_LINUX),y) LINUX_ADDITIONAL_CONFIG:= ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_COMMAND_LINE))),) @@ -508,6 +518,10 @@ ifeq ($(CONFIG_PAYLOAD_ELF),y) @printf " PAYLOAD $(CONFIG_PAYLOAD_FILE) (compression: $(CBFS_PAYLOAD_COMPRESS_FLAG))\n" $(CBFSTOOL) $@.tmp add-payload -f $(CONFIG_PAYLOAD_FILE) -n $(CONFIG_CBFS_PREFIX)/payload -c $(CBFS_PAYLOAD_COMPRESS_FLAG) endif +ifeq ($(CONFIG_PAYLOAD_FLATBIN),y) + @printf " PAYLOAD $(CONFIG_PAYLOAD_FILE) (compression: $(CBFS_PAYLOAD_COMPRESS_FLAG))\n" + $(CBFSTOOL) $@.tmp add-flat-binary -f $(CONFIG_PAYLOAD_FILE) -n $(CONFIG_CBFS_PREFIX)/payload -c $(CBFS_PAYLOAD_COMPRESS_FLAG) $(FLATBIN_ADDITIONAL_CONFIG) +endif ifeq ($(CONFIG_PAYLOAD_LINUX),y) @printf " PAYLOAD $(CONFIG_PAYLOAD_FILE) (compression: $(CBFS_PAYLOAD_COMPRESS_FLAG))\n" $(CBFSTOOL) $@.tmp add-payload -f $(CONFIG_PAYLOAD_FILE) -n $(CONFIG_CBFS_PREFIX)/payload -c $(CBFS_PAYLOAD_COMPRESS_FLAG) $(LINUX_ADDITIONAL_CONFIG) diff --git a/src/Kconfig b/src/Kconfig index 30f996d..02dc77b 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -567,6 +567,16 @@ config PAYLOAD_ELF You will be able to specify the location and file name of the payload image later.
+config PAYLOAD_FLATBIN + bool "A FLAT BIN executable payload" + help + Select this option if you have a payload image (a .bin file) + which coreboot should run as soon as the basic hardware + initialization is completed. + + You will be able to specify the load address, entry point address and + full file path of the payload image later. + config PAYLOAD_LINUX bool "A Linux payload" help @@ -686,6 +696,13 @@ config PAYLOAD_FILE The path and filename of the ELF executable file to use as payload.
config PAYLOAD_FILE + string "Payload path and filename" + depends on PAYLOAD_FLATBIN + default "payload.bin" + help + The path and filename of the .bin executable file to use as payload. + +config PAYLOAD_FILE string "Linux path and filename" depends on PAYLOAD_LINUX default "bzImage" @@ -715,11 +732,25 @@ config PAYLOAD_FILE config COMPRESSED_PAYLOAD_LZMA bool "Use LZMA compression for payloads" default y - depends on PAYLOAD_ELF || PAYLOAD_SEABIOS || PAYLOAD_FILO || PAYLOAD_TIANOCORE || PAYLOAD_GRUB2 + depends on PAYLOAD_ELF || PAYLOAD_FLATBIN || PAYLOAD_SEABIOS || PAYLOAD_FILO || PAYLOAD_TIANOCORE || PAYLOAD_GRUB2 help In order to reduce the size payloads take up in the ROM chip coreboot can compress them using the LZMA algorithm.
+config FLATBIN_LOAD_ADDR + string "Flat .bin Load Address" + depends on PAYLOAD_FLATBIN + default "" + help + The load address of the flat .bin binary + +config FLATBIN_ENTRY_POINT + string "Flat .bin Entry Point" + depends on PAYLOAD_FLATBIN + default "" + help + The entry point address of the flat .bin binary + config LINUX_COMMAND_LINE string "Linux command line" depends on PAYLOAD_LINUX