Zhuohao Lee has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56308 )
Change subject: mb/google/brya: add BASEBOARD_DIR to support different baseboard ......................................................................
mb/google/brya: add BASEBOARD_DIR to support different baseboard
In order to support different baseboard configuration, we add the BASEBOARD_DIR to switch the directory. The expected structure looks like:
mb ..|_ google .........|_ brya .............. |_ variants .....................|_ baseboard ..............................|_ brya ....................................|_ gpio.c ....................................|_ memory.c ....................................|_ devicetree ..............................|_ brask ....................................|_ gpio.c ....................................|_ memory.c ....................................|_ devicetree ......................|_ brya_variant1 ......................|_ brya_variant2 ......................|_ ... ......................|_ brask_variant1 ......................|_ brask_variant2 ......................|_ ... ...............|_ <all mb common code>
BUG=b:191472401 BRANCH=None TEST=build pass
Change-Id: Ic99e42dbbd27fa3e1f6cb3a1b5daee1c8c7b1083 Signed-off-by: Zhuohao Lee zhuohao@chromium.org --- M src/mainboard/google/brya/Kconfig M src/mainboard/google/brya/Makefile.inc R src/mainboard/google/brya/variants/baseboard/brya/Makefile.inc R src/mainboard/google/brya/variants/baseboard/brya/devicetree.cb R src/mainboard/google/brya/variants/baseboard/brya/gpio.c R src/mainboard/google/brya/variants/baseboard/brya/include/baseboard/ec.h R src/mainboard/google/brya/variants/baseboard/brya/include/baseboard/gpio.h R src/mainboard/google/brya/variants/baseboard/brya/include/baseboard/variants.h R src/mainboard/google/brya/variants/baseboard/brya/memory.c 9 files changed, 8 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/56308/1
diff --git a/src/mainboard/google/brya/Kconfig b/src/mainboard/google/brya/Kconfig index 58635e9..3973004 100644 --- a/src/mainboard/google/brya/Kconfig +++ b/src/mainboard/google/brya/Kconfig @@ -38,6 +38,10 @@ def_bool n select SYSTEM_TYPE_LAPTOP
+config BASEBOARD_DIR + string + default "brya" if BOARD_GOOGLE_BASEBOARD_BRYA + config CHROMEOS select CHROMEOS_DRAM_PART_NUMBER_IN_CBI select EC_GOOGLE_CHROMEEC_SWITCHES @@ -46,7 +50,7 @@
config DEVICETREE string - default "variants/baseboard/devicetree.cb" + default "variants/baseboard/$(CONFIG_BASEBOARD_DIR)/devicetree.cb"
config DRIVER_TPM_I2C_BUS hex diff --git a/src/mainboard/google/brya/Makefile.inc b/src/mainboard/google/brya/Makefile.inc index 0686a30..717cf5f 100644 --- a/src/mainboard/google/brya/Makefile.inc +++ b/src/mainboard/google/brya/Makefile.inc @@ -10,11 +10,12 @@ ramstage-y += ec.c
VARIANT_DIR:=$(call strip_quotes,$(CONFIG_VARIANT_DIR)) +BASEBOARD_DIR:=$(call strip_quotes,$(CONFIG_BASEBOARD_DIR))
-subdirs-y += variants/baseboard +subdirs-y += variants/baseboard/$(BASEBOARD_DIR) subdirs-y += variants/$(VARIANT_DIR) subdirs-y += variants/$(VARIANT_DIR)/memory subdirs-y += spd
-CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include +CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/$(BASEBOARD_DIR)/include CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include diff --git a/src/mainboard/google/brya/variants/baseboard/Makefile.inc b/src/mainboard/google/brya/variants/baseboard/brya/Makefile.inc similarity index 100% rename from src/mainboard/google/brya/variants/baseboard/Makefile.inc rename to src/mainboard/google/brya/variants/baseboard/brya/Makefile.inc diff --git a/src/mainboard/google/brya/variants/baseboard/devicetree.cb b/src/mainboard/google/brya/variants/baseboard/brya/devicetree.cb similarity index 100% rename from src/mainboard/google/brya/variants/baseboard/devicetree.cb rename to src/mainboard/google/brya/variants/baseboard/brya/devicetree.cb diff --git a/src/mainboard/google/brya/variants/baseboard/gpio.c b/src/mainboard/google/brya/variants/baseboard/brya/gpio.c similarity index 100% rename from src/mainboard/google/brya/variants/baseboard/gpio.c rename to src/mainboard/google/brya/variants/baseboard/brya/gpio.c diff --git a/src/mainboard/google/brya/variants/baseboard/include/baseboard/ec.h b/src/mainboard/google/brya/variants/baseboard/brya/include/baseboard/ec.h similarity index 100% rename from src/mainboard/google/brya/variants/baseboard/include/baseboard/ec.h rename to src/mainboard/google/brya/variants/baseboard/brya/include/baseboard/ec.h diff --git a/src/mainboard/google/brya/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/brya/variants/baseboard/brya/include/baseboard/gpio.h similarity index 100% rename from src/mainboard/google/brya/variants/baseboard/include/baseboard/gpio.h rename to src/mainboard/google/brya/variants/baseboard/brya/include/baseboard/gpio.h diff --git a/src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/brya/variants/baseboard/brya/include/baseboard/variants.h similarity index 100% rename from src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h rename to src/mainboard/google/brya/variants/baseboard/brya/include/baseboard/variants.h diff --git a/src/mainboard/google/brya/variants/baseboard/memory.c b/src/mainboard/google/brya/variants/baseboard/brya/memory.c similarity index 100% rename from src/mainboard/google/brya/variants/baseboard/memory.c rename to src/mainboard/google/brya/variants/baseboard/brya/memory.c