summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-01-24 19:38:33 -0700
committerMartin Roth <martinroth@google.com>2016-02-03 15:45:14 +0100
commitb09a5696a6292b14e5d6eaa00f6ed7f6c748368a (patch)
treeefdd37b1caf43f8452febc6226552bc5588a30f8
parente3f47eada383defcc31b41cc4931c3cf3234c37d (diff)
downloadcoreboot-b09a5696a6292b14e5d6eaa00f6ed7f6c748368a.tar.xz
build_system: Extend site-local
- Add a target at the end of the build that can be used to run additional scripts or additional targets after coreboot.rom is built. - Source a site-local Kconfig file to allow site-specific configuration. This eliminates the need to add a hook for a script at the end of the build because you can add one yourself in site-local. Example site-local/Makefile.inc: build_complete:: ifeq ($(CONFIG_SITE_LOCAL),y) echo "Running additional steps in site-local" # run some script here to make my build unreproducible. endif .phony: build_complete Example site-local/Kconfig: menu "site-local" config SITE_LOCAL bool "site-local enabled" help Enable my site-local configuration to do stuff. endmenu Change-Id: Id4d1e727c69b5cdb05e7d52731bbb1d1e201864a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13413 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
-rw-r--r--Makefile.inc11
-rw-r--r--src/Kconfig3
2 files changed, 12 insertions, 2 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 175b08bf68..3c4b899dc7 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -46,12 +46,19 @@ export objgenerated := $(obj)/generated
#######################################################################
# root rule to resolve if in build mode (ie. configuration exists)
-real-target: $(obj)/config.h coreboot
+real-target: $(obj)/config.h coreboot build_complete
coreboot: build-dirs $(obj)/coreboot.rom $(obj)/cbfstool $(obj)/rmodtool
+# This target can be used in site local to run scripts or additional
+# targets after the build completes by creating a Makefile.inc in the
+# site-local directory with a target named 'build_complete::'
+build_complete:: coreboot
+ printf "\nBuilt %s (%s)\n" $(CONFIG_MAINBOARD_DIR) \
+ $(CONFIG_MAINBOARD_PART_NUMBER)
+
#######################################################################
# our phony targets
-PHONY+= clean-abuild coreboot lint lint-stable build-dirs
+PHONY+= clean-abuild coreboot lint lint-stable build-dirs build_complete
#######################################################################
# root source directories of coreboot
diff --git a/src/Kconfig b/src/Kconfig
index 4df037be2a..3f02843f6f 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -407,6 +407,9 @@ config FMDFILE
endmenu
+# load site-local kconfig to allow user specific defaults and overrides
+source "site-local/Kconfig"
+
config SYSTEM_TYPE_LAPTOP
default n
bool