Martin Roth (martinroth@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18271
-gerrit
commit f06f98f7a1d89ef849714701d86d062e3d8d4ac6 Author: Marshall Dawson marshalldawson3rd@gmail.com Date: Thu Dec 22 20:25:29 2016 -0500
payloads/depthcharge: Allow generic libpayload config
Change depthcharge to not require a board-specific config file for libpayload. If the Kconfig option is selected, use the settings in libpayload/configs/defconfig instead.
Change-Id: I4fd1a5915472f28e757c62f3f2415716f1fdfc71 Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- payloads/external/Makefile.inc | 3 ++- payloads/external/depthcharge/Kconfig | 8 ++++++++ payloads/external/depthcharge/Makefile | 13 ++++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index d159da9..1c0d38c 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -109,7 +109,8 @@ payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(D DEPTHCHARGE_MASTER=$(CONFIG_DEPTHCHARGE_MASTER) \ DEPTHCHARGE_STABLE=$(CONFIG_DEPTHCHARGE_STABLE) \ DEPTHCHARGE_REVISION=$(CONFIG_DEPTHCHARGE_REVISION) \ - DEPTHCHARGE_REVISION_ID=$(CONFIG_DEPTHCHARGE_REVISION_ID) + DEPTHCHARGE_REVISION_ID=$(CONFIG_DEPTHCHARGE_REVISION_ID) \ + OVERRIDE_DEFCONFIG=$(CONFIG_LP_DEFCONFIG_OVERRIDE)
# FILO
diff --git a/payloads/external/depthcharge/Kconfig b/payloads/external/depthcharge/Kconfig index d6ce538..a913c7e 100644 --- a/payloads/external/depthcharge/Kconfig +++ b/payloads/external/depthcharge/Kconfig @@ -35,4 +35,12 @@ config PAYLOAD_FILE string default "payloads/external/depthcharge/depthcharge/build/depthcharge.elf"
+config LP_DEFCONFIG_OVERRIDE + def_bool n + help + The Depthcharge makefile looks for a file config.<boardname> in the + libpayload/configs directory. Say Y here to use the file defconfig + instead. This is can be a convenience for development purposes, or + if the defaults in defconfig are sufficient for your system. + endif diff --git a/payloads/external/depthcharge/Makefile b/payloads/external/depthcharge/Makefile index 97d0950..f249a4a 100644 --- a/payloads/external/depthcharge/Makefile +++ b/payloads/external/depthcharge/Makefile @@ -30,6 +30,13 @@ unexport src srck obj objk
BOARD:=$(notdir $(CONFIG_MAINBOARD_DIR))
+ifeq ($(OVERRIDE_DEFCONFIG),y) +$(info Depthcharge: Using default defconfig for libpayload) +libpayload_config=$(libpayload_dir)/configs/defconfig +else +libpayload_config=$(libpayload_dir)/configs/config.$(BOARD) +endif + all: build
$(project_dir): @@ -47,10 +54,10 @@ checkout: fetch cd $(project_dir) ; git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
$(libpayload_install_dir): $(project_dir) - test -f $(libpayload_dir)/configs/config.$(BOARD) || \ - (echo "Error: $(libpayload_dir)/configs/config.$(BOARD) is not present" && \ + test -f $(libpayload_config)|| \ + (echo "Error: $(libpayload_config) is not present" && \ false) - cp $(libpayload_dir)/configs/config.$(BOARD) $(libpayload_dir)/.config + cp $(libpayload_config) $(libpayload_dir)/.config $(MAKE) -C $(libpayload_dir) olddefconfig $(MAKE) -C $(libpayload_dir) $(MAKE) -C $(libpayload_dir) install DESTDIR=$(libpayload_install_dir)