summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2020-09-09 13:19:09 -0600
committerAaron Durbin <adurbin@chromium.org>2020-09-10 20:26:03 +0000
commitb2545cc3c6388d0328ce24a81df104a6d069e952 (patch)
tree91e6b81202dc65bd9958f785b5dbc6575258a62b /src/mainboard
parent3992da034f9f8a52df87202f7caa7056388f97d2 (diff)
soc/amd/picasso: Move APCB generation out of picasso
Move APCB generation out of the picasso makefile and into the mainboard makefile. APCB generation tends to be mainboard specific and does not belong in the soc makefile. BUG=b:168099242 TEST=Build mandolin and check for APCB in coreboot binary Build and boot ezkinil Change-Id: Ib85ad94e515f2ffad58aafe06c1f1d4043e9303c Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45222 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/amd/mandolin/Makefile.inc3
-rw-r--r--src/mainboard/google/zork/spd/Makefile.inc20
2 files changed, 21 insertions, 2 deletions
diff --git a/src/mainboard/amd/mandolin/Makefile.inc b/src/mainboard/amd/mandolin/Makefile.inc
index 1865e74dd9..6d7bf3a8b9 100644
--- a/src/mainboard/amd/mandolin/Makefile.inc
+++ b/src/mainboard/amd/mandolin/Makefile.inc
@@ -10,8 +10,7 @@ ifneq ($(CONFIG_PICASSO_LPC_IOMUX),y)
ramstage-y += emmc_gpio.c
endif
-# APCB_mandolin.bin
-APCB_SOURCES = mandolin
+APCB_SOURCES = $(MAINBOARD_BLOBS_DIR)/APCB_mandolin.bin
PHONY+=add_mchp_fw
INTERMEDIATE+=add_mchp_fw
diff --git a/src/mainboard/google/zork/spd/Makefile.inc b/src/mainboard/google/zork/spd/Makefile.inc
index 66957d82c2..1042d9101d 100644
--- a/src/mainboard/google/zork/spd/Makefile.inc
+++ b/src/mainboard/google/zork/spd/Makefile.inc
@@ -2,3 +2,23 @@
# This directory
SPD_SOURCES_DIR := src/mainboard/$(MAINBOARDDIR)/spd
+
+APCB_SOURCES=$(foreach f, $(basename $(SPD_SOURCES)), $(obj)/APCB_$(f).gen)
+
+# APCB binary with magic numbers to be replaced by apcb_edit tool
+APCB_MAGIC_BLOB:=$(FIRMWARE_LOCATE)/APCB_magic.bin
+
+$(obj)/APCB_%.gen: $(SPD_SOURCES_DIR)/%.hex \
+ $(APCB_EDIT_TOOL) \
+ $(APCB_MAGIC_BLOB)
+ $(APCB_EDIT_TOOL) \
+ $(APCB_MAGIC_BLOB) \
+ $@ \
+ --hex \
+ --strip_manufacturer_information \
+ --spd_0_0 $< \
+ $(if $(APCB_POPULATE_2ND_CHANNEL), --spd_1_0 $<, ) \
+ --board_id_gpio0 $(APCB_BOARD_ID_GPIO0) \
+ --board_id_gpio1 $(APCB_BOARD_ID_GPIO1) \
+ --board_id_gpio2 $(APCB_BOARD_ID_GPIO2) \
+ --board_id_gpio3 $(APCB_BOARD_ID_GPIO3)