summaryrefslogtreecommitdiff
path: root/payloads/external
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>2017-01-08 06:43:01 +0100
committerMartin Roth <martinroth@google.com>2017-01-10 17:50:21 +0100
commit8fb72c9147d96c732c37bf87558963b38b78500d (patch)
tree4ecefcb8031272f1eb087746ab0bc5132399cb68 /payloads/external
parent74e0b2795f2ebddd171356cbd4cb1bcd3a2f1019 (diff)
downloadcoreboot-8fb72c9147d96c732c37bf87558963b38b78500d.tar.xz
payloads/GRUB2: Add Kconfig options for grub.cfg
Change-Id: I5480d6a5f2a6bbae4222e05bbe92eb717e1aff65 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Martin Roth <martinroth@google.com> Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/5109 Tested-by: build bot (Jenkins)
Diffstat (limited to 'payloads/external')
-rw-r--r--payloads/external/GRUB2/Kconfig26
-rw-r--r--payloads/external/Makefile.inc5
2 files changed, 31 insertions, 0 deletions
diff --git a/payloads/external/GRUB2/Kconfig b/payloads/external/GRUB2/Kconfig
index 04f0fa98af..c9f07d537c 100644
--- a/payloads/external/GRUB2/Kconfig
+++ b/payloads/external/GRUB2/Kconfig
@@ -24,4 +24,30 @@ config GRUB2_EXTRA_MODULES
config PAYLOAD_FILE
default "payloads/external/GRUB2/grub2/build/default_payload.elf"
+config GRUB2_INCLUDE_RUNTIME_CONFIG_FILE
+ bool "Include GRUB2 runtime config file into ROM image"
+ depends on PAYLOAD_GRUB2
+ default n
+ help
+ The GRUB2 payload reads its runtime configuration file from etc/grub.cfg
+ stored in the CBFS on the flash ROM chip. Without that, it’ll just drop
+ into a rescue shell.
+
+ This configuration may need to be coreboot specific.
+
+ Select this option, if you want to include the GRUB2 runtime
+ configuration file into CBFS as `etc/grub.cfg` automatically.
+
+ You will be able to specify the path of the configuration file later.
+
+ Without this option you would need to add this file manually with
+ build/cbfstool build/coreboot.rom add -f grub.cfg -n etc/grub.cfg -t raw
+
+config GRUB2_RUNTIME_CONFIG_FILE
+ string "Path of grub.cfg"
+ depends on GRUB2_INCLUDE_RUNTIME_CONFIG_FILE
+ default "grub.cfg"
+ help
+ The path of the GRUB2 runtime configuration file to be added to CBFS.
+
endif
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index e4d3e12431..29163d0161 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -60,6 +60,11 @@ cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_revision
payload_revision-file := $(PAYLOAD_VERSION)
payload_revision-type := raw
+cbfs-files-$(CONFIG_GRUB2_INCLUDE_RUNTIME_CONFIG_FILE) += etc/grub.cfg
+etc/grub.cfg-file := $(CONFIG_GRUB2_RUNTIME_CONFIG_FILE)
+etc/grub.cfg-type := raw
+etc/grub.cfg-required := the GRUB runtime configuration file ($(CONFIG_GRUB2_RUNTIME_CONFIG_FILE))
+
# SeaBIOS
SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1)