Add GRUB2 payload to build system
Since a long time GRUB 2 is a viable payload alternative to SeaBIOS and FILO. So make it easy for coreboot users to use GRUB 2 as a payload by integrating it into coreboot’s build system, so it can be selected in Kconfig. As the last GRUB 2 release 2.00 is too old and has several bugs when used as a coreboot payload only allow to build GRUB 2 master until a new GRUB release is done. The downside is, that accidental breakage in GRUB’s upstream does not affect coreboot users. Currently the GRUB 2 payload is built with the default modules which results in an uncompressed size of around 730 kB. Compressed it has a size of 340 kB, so it should be useable with 512 kB flash ROMs. Tested with QEMU. Change-Id: Ie75d5a2cb230390cd5a063d5f6a5d5e3fab6b354 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/4058 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
committed by
Stefan Reinauer
parent
c37b05c413
commit
113a366848
@@ -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)
|
||||
|
Reference in New Issue
Block a user