diff options
author | Furquan Shaikh <furquan@google.com> | 2018-06-21 18:50:48 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2018-06-25 17:40:28 +0000 |
commit | f2419983523e577688318dea523f6cb9ffb3d9b8 (patch) | |
tree | 7e297cc817b3ab4a1f7bae0e054be75dd217e119 | |
parent | 3ff98ca858db99511c1e6ab97be09c5e7f6b21d4 (diff) |
Kconfig: Add new config for OVERRIDE_DEVICETREE
This change adds a new config option OVERRIDE_DEVICETREE that allows
variants to provide an override devicetree file to override the
registers and/or add new devices on top of the ones provided by
baseboard devicetree using CONFIG_DEVICETREE.
BUG=b:80081934
Change-Id: Ica046b7e0d70d0f1e8d94da714d1e62032277916
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/26691
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | Makefile.inc | 12 | ||||
-rw-r--r-- | src/Kconfig | 11 |
2 files changed, 21 insertions, 2 deletions
diff --git a/Makefile.inc b/Makefile.inc index b7c490473d..446e321313 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -25,6 +25,7 @@ endif CONFIG_CBFS_PREFIX:=$(call strip_quotes,$(CONFIG_CBFS_PREFIX)) CONFIG_FMDFILE:=$(call strip_quotes,$(CONFIG_FMDFILE)) CONFIG_DEVICETREE:=$(call strip_quotes, $(CONFIG_DEVICETREE)) +CONFIG_OVERRIDE_DEVICETREE:=$(call strip_quotes, $(CONFIG_OVERRIDE_DEVICETREE)) ####################################################################### # misleadingly named, this is the coreboot version @@ -558,12 +559,19 @@ $(obj)/config.h: $(objutil)/kconfig/conf # needed objects that every mainboard uses # Creation of these is architecture and mainboard independent DEVICETREE_FILE := $(src)/mainboard/$(MAINBOARDDIR)/$(CONFIG_DEVICETREE) + +ifneq ($(CONFIG_OVERRIDE_DEVICETREE),) + +OVERRIDE_DEVICETREE_FILE := $(src)/mainboard/$(MAINBOARDDIR)/$(CONFIG_OVERRIDE_DEVICETREE) + +endif + DEVICETREE_STATIC_C := $(obj)/mainboard/$(MAINBOARDDIR)/static.c -$(DEVICETREE_STATIC_C): $(DEVICETREE_FILE) $(objutil)/sconfig/sconfig +$(DEVICETREE_STATIC_C): $(DEVICETREE_FILE) $(OVERRIDE_DEVICETREE_FILE) $(objutil)/sconfig/sconfig @printf " SCONFIG $(subst $(src)/,,$(<))\n" mkdir -p $(dir $(DEVICETREE_STATIC_C)) - $(objutil)/sconfig/sconfig $(DEVICETREE_FILE) $(DEVICETREE_STATIC_C) + $(objutil)/sconfig/sconfig $(DEVICETREE_FILE) $(DEVICETREE_STATIC_C) $(OVERRIDE_DEVICETREE_FILE) ramstage-y+=$(DEVICETREE_STATIC_C) romstage-y+=$(DEVICETREE_STATIC_C) diff --git a/src/Kconfig b/src/Kconfig index fd0a4eb9a6..875c9d0790 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -295,6 +295,17 @@ config DEVICETREE Examples: "devicetree.variant.cb" "variant/devicetree.cb" +config OVERRIDE_DEVICETREE + string + default "" + help + This symbol allows variants to provide an override devicetree file to + override the registers and/or add new devices on top of the ones + provided by baseboard devicetree using CONFIG_DEVICETREE. + + Examples: "devicetree.variant-override.cb" + "variant/devicetree-override.cb" + config CBFS_SIZE hex "Size of CBFS filesystem in ROM" # Default value set at the end of the file |