[coreboot-gerrit] New patch to review for coreboot: 42c5e4e Add Kconfig options for Linux as payload

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Sat Aug 31 08:27:52 CEST 2013


Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3893

-gerrit

commit 42c5e4ed5f20f2ce8ee74b135e875551d2a58677
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Sat Aug 31 08:26:52 2013 +0200

    Add Kconfig options for Linux as payload
    
    These allow to define a kernel image, initrd and command line.
    
    Change-Id: I40155b812728a176b6d15871e1e6c96e4ad693c8
    Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
---
 src/Kconfig               | 31 +++++++++++++++++++++++++++++++
 src/arch/x86/Makefile.inc | 14 ++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/src/Kconfig b/src/Kconfig
index f714cb2..be2cb24 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -539,6 +539,16 @@ config PAYLOAD_ELF
 	  You will be able to specify the location and file name of the
 	  payload image later.
 
+config PAYLOAD_LINUX
+	bool "A Linux payload"
+	help
+	  Select this option if you have a Linux bzImage 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.
+
 config PAYLOAD_SEABIOS
 	bool "SeaBIOS"
 	depends on ARCH_X86
@@ -617,6 +627,13 @@ config PAYLOAD_FILE
 	  The path and filename of the ELF executable file to use as payload.
 
 config PAYLOAD_FILE
+	string "Linux path and filename"
+	depends on PAYLOAD_LINUX
+	default "bzImage"
+	help
+	  The path and filename of the bzImage kernel to use as payload.
+
+config PAYLOAD_FILE
 	depends on PAYLOAD_SEABIOS
 	default "$(obj)/seabios/out/bios.bin.elf"
 
@@ -640,6 +657,20 @@ config COMPRESSED_PAYLOAD_LZMA
 	  In order to reduce the size payloads take up in the ROM chip
 	  coreboot can compress them using the LZMA algorithm.
 
+config LINUX_COMMAND_LINE
+	string "Linux command line"
+	depends on PAYLOAD_LINUX
+	default ""
+	help
+	  A command line to add to the Linux kernel.
+
+config LINUX_INITRD
+	string "Linux initrd"
+	depends on PAYLOAD_LINUX
+	default ""
+	help
+	  An initrd image to add to the Linux kernel.
+
 endmenu
 
 menu "Debugging"
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 5c28676..b3b82b9 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -74,6 +74,16 @@ $(obj)/coreboot.pre1: $(CBFSTOOL)
 	mv $(obj)/coreboot.rom $@
 endif
 
+ifeq ($(CONFIG_PAYLOAD_LINUX),y)
+LINUX_ADDITIONAL_CONFIG:=
+ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_COMMAND_LINE))),)
+  LINUX_ADDITIONAL_CONFIG+=-C $(CONFIG_LINUX_COMMAND_LINE)
+endif
+ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_INITRD))),)
+  LINUX_ADDITIONAL_CONFIG+=-I $(CONFIG_LINUX_INITRD)
+endif
+endif
+
 $(obj)/coreboot.rom: $(obj)/coreboot.pre $(objcbfs)/coreboot_ram.elf $(CBFSTOOL) $(call strip_quotes,$(COREBOOT_ROM_DEPENDENCIES)) $$(INTERMEDIATE) $$(VBOOT_STUB_ELF)
 	@printf "    CBFS       $(subst $(obj)/,,$(@))\n"
 	cp $(obj)/coreboot.pre $@.tmp
@@ -85,6 +95,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_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)
+endif
 ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
 	@printf "    PAYLOAD    SeaBIOS (internal, compression: $(CBFS_PAYLOAD_COMPRESS_FLAG))\n"
 	$(CBFSTOOL) $@.tmp add-payload -f $(CONFIG_PAYLOAD_FILE) -n $(CONFIG_CBFS_PREFIX)/payload -c $(CBFS_PAYLOAD_COMPRESS_FLAG)



More information about the coreboot-gerrit mailing list