From e7dd184e5f0949e042e2ae56787c0495ac85df48 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Sun, 12 Oct 2025 20:18:09 +0100 Subject: [PATCH] Makefile.mk: Add support for mainboard vendor common code Allow mainboard vendors to have common code, controlled by a new Kconfig option MB_COMMON_CODE. Change-Id: I5b97b26a70fbbe2e3f659f01aa00b16b76167f88 Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/89531 Reviewed-by: Matt DeVillier Reviewed-by: Martin L Roth Tested-by: build bot (Jenkins) --- Makefile.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.mk b/Makefile.mk index 1c5b8f05d5..e28e4f800d 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -35,8 +35,9 @@ COREBOOT_EXPORTS += KERNELVERSION # Basic component discovery MAINBOARDDIR=$(call strip_quotes,$(CONFIG_MAINBOARD_DIR)) VARIANT_DIR:=$(call strip_quotes,$(CONFIG_VARIANT_DIR)) +MB_COMMON_DIR := $(call strip_quotes,$(CONFIG_MB_COMMON_DIR)) CARRIER_DIR:=$(call strip_quotes,$(CONFIG_CARRIER_DIR)) -COREBOOT_EXPORTS += MAINBOARDDIR VARIANT_DIR CARRIER_DIR +COREBOOT_EXPORTS += MAINBOARDDIR VARIANT_DIR MB_COMMON_DIR CARRIER_DIR ## Final build results, which CBFSTOOL uses to create the final ## rom image file, are placed under $(objcbfs). @@ -119,6 +120,9 @@ subdirs-y += util/futility util/marvell util/bincfg util/supermicro util/qemu subdirs-y += util/ifdtool subdirs-y += $(wildcard src/arch/*) subdirs-y += src/mainboard/$(MAINBOARDDIR) +ifneq ($(MB_COMMON_DIR),) +subdirs-y += src/mainboard/$(MB_COMMON_DIR) +endif subdirs-y += src/security subdirs-y += payloads payloads/external subdirs-$(CONFIG_SBOM) += src/sbom