summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2021-12-23 08:03:14 -0700
committerFelix Held <felix-coreboot@felixheld.de>2022-01-10 14:25:40 +0000
commit6a3ecc508a1946247e56d04413052ff4602cf12f (patch)
tree37166f129fe24138024000566e50e87c5b062fac
parentf26ce9f00e79a73631ec631ae89a5763284a3bb3 (diff)
downloadcoreboot-6a3ecc508a1946247e56d04413052ff4602cf12f.tar.gz
coreboot-6a3ecc508a1946247e56d04413052ff4602cf12f.tar.bz2
coreboot-6a3ecc508a1946247e56d04413052ff4602cf12f.zip
guybrush: Inject SPDs into APCB
Inject SPDs into APCB at coreboot build time. BUG=b:209486191 BRANCH=None TEST=Boot guybrush and nipperkin with injected APCB Change-Id: Ib21085855324e0d473dd5e258f35a52bed326901 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60775 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
-rw-r--r--Makefile.inc2
-rw-r--r--src/mainboard/google/guybrush/Makefile.inc18
2 files changed, 12 insertions, 8 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 090505e776dd..cc7317da40f7 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -591,6 +591,8 @@ AMDFWTOOL:=$(objutil)/amdfwtool/amdfwtool
APCB_EDIT_TOOL:=$(top)/util/apcb/apcb_edit.py
+APCB_V3_EDIT_TOOL:=$(top)/util/apcb/apcb_v3_edit.py
+
CBOOTIMAGE:=$(objutil)/cbootimage/cbootimage
FUTILITY?=$(objutil)/futility/futility
diff --git a/src/mainboard/google/guybrush/Makefile.inc b/src/mainboard/google/guybrush/Makefile.inc
index fa729feccf04..56ef2b38b2db 100644
--- a/src/mainboard/google/guybrush/Makefile.inc
+++ b/src/mainboard/google/guybrush/Makefile.inc
@@ -3,14 +3,6 @@
bootblock-y += bootblock.c
bootblock-$(CONFIG_CHROMEOS) += chromeos.c
-ifneq ($(wildcard $(MAINBOARD_BLOBS_DIR)/APCB_CZN_D4.bin),)
-$(info APCB sources present.)
-APCB_SOURCES = $(MAINBOARD_BLOBS_DIR)/APCB_CZN_D4.bin
-APCB_SOURCES_RECOVERY = $(MAINBOARD_BLOBS_DIR)/APCB_CZN_D4.bin
-else
-$(info APCB sources not found. Skipping APCB.)
-endif
-
romstage-y += port_descriptors.c
romstage-y += romstage.c
@@ -30,3 +22,13 @@ CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
LIB_SPD_DEPS = $(SPD_SOURCES)
+
+APCB_SOURCES = $(obj)/APCB_CZN_D4.gen
+APCB_SOURCES_RECOVERY = $(obj)/APCB_CZN_D4.gen
+
+$(obj)/APCB_CZN_D4.gen: $(SPD_SOURCES) \
+ $(APCB_V3_EDIT_TOOL) \
+ $(MAINBOARD_BLOBS_DIR)/APCB_CZN_D4.bin
+ $(APCB_V3_EDIT_TOOL) $(MAINBOARD_BLOBS_DIR)/APCB_CZN_D4.bin \
+ $(obj)/APCB_CZN_D4.gen \
+ --spd_sources $(SPD_SOURCES)