diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Kconfig | 26 | ||||
-rw-r--r-- | src/arch/x86/Makefile.inc | 16 |
2 files changed, 41 insertions, 1 deletions
diff --git a/src/Kconfig b/src/Kconfig index 10f8c185fe..1c80b8c194 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -569,6 +569,15 @@ config PAYLOAD_FILO See http://coreboot.org/Payloads for more information. +config PAYLOAD_GRUB2 + bool "GRUB2" + help + Select this option if you want to build a coreboot image + with a GRUB2 payload. If you don't know what this is + about, just leave it enabled. + + See http://coreboot.org/Payloads for more information. + config PAYLOAD_TIANOCORE bool "Tiano Core" help @@ -606,6 +615,17 @@ config SEABIOS_PS2_TIMEOUT keyboard controller to become ready before giving up. choice + prompt "GRUB2 version" + default GRUB2_MASTER + depends on PAYLOAD_GRUB2 + +config GRUB2_MASTER + bool "HEAD" + help + Newest GRUB2 version +endchoice + +choice prompt "FILO version" default FILO_STABLE depends on PAYLOAD_FILO @@ -643,6 +663,10 @@ config PAYLOAD_FILE default "payloads/external/FILO/filo/build/filo.elf" config PAYLOAD_FILE + depends on PAYLOAD_GRUB2 + default "payloads/external/GRUB2/grub2/build/default_payload.elf" + +config PAYLOAD_FILE string "Tianocore firmware volume" depends on PAYLOAD_TIANOCORE default "COREBOOT.fd" @@ -653,7 +677,7 @@ 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 + depends on PAYLOAD_ELF || 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. diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index dee56c5345..b90bbe7670 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -48,6 +48,9 @@ endif ifeq ($(CONFIG_PAYLOAD_FILO),y) COREBOOT_ROM_DEPENDENCIES+=filo endif +ifeq ($(CONFIG_PAYLOAD_GRUB2),y) +COREBOOT_ROM_DEPENDENCIES+=grub2 +endif extract_nth=$(word $(1), $(subst |, ,$(2))) @@ -113,6 +116,12 @@ ifeq ($(CONFIG_PAYLOAD_FILO),y) @printf " PAYLOAD FILO (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) endif + +ifeq ($(CONFIG_PAYLOAD_GRUB2),y) + @printf " PAYLOAD GRUB2 (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) +endif + ifeq ($(CONFIG_PAYLOAD_TIANOCORE),y) @printf " PAYLOAD Tiano Core (compression: $(CBFS_PAYLOAD_COMPRESS_FLAG))\n" $(CBFSTOOL) $@.tmp add-payload -f $(CONFIG_PAYLOAD_FILE) -n $(CONFIG_CBFS_PREFIX)/payload -c $(CBFS_PAYLOAD_COMPRESS_FLAG) @@ -440,3 +449,10 @@ filo: CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \ CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE) + +grub2: + $(MAKE) -C payloads/external/GRUB2 -f Makefile.inc \ + HOSTCC="$(HOSTCC)" \ + CC="$(CC)" LD="$(LD)" OBJDUMP="$(OBJDUMP)" \ + OBJCOPY="$(OBJCOPY)" STRIP="$(STRIP)" \ + CONFIG_GRUB2_MASTER=$(CONFIG_GRUB2_MASTER) |