Attention is currently required from: Raul Rangel, Reka Norman, Tim Wawrzynczak, Nick Vaccaro. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/57772 )
Change subject: mb/google/zork: Migrate zork to use SPD files under spd/ ......................................................................
Patch Set 9:
(1 comment)
File src/mainboard/google/zork/spd/Makefile.inc:
PS1:
The filename parts of the SPD file paths are used as the target names for the APCB sources. E.g. spd-1.hex -> $(obj)/APCB_spd-1.gen. So I still need to extract the filename part, then recombine it with the directory in the recipe.
Correct. That is required for APCB_SOURCES. But, you don't need to extract out SPD_SOURCES_DIR is what I meant.
I guess it doesn't have to be done this way. E.g. instead of the wildcard target `$(obj)/APCB_%.gen`, we could have a single target which loops through SPD_SOURCES. I can have a go at doing this, I'm just worried it will have a lot of knock-on effects, e.g. in src/soc/amd/picasso/Makefile.inc.
Yeah, I think it would be best to keep the changes in zork/.../Makefile.inc for now to avoid any regressions.
I was thinking this could be something like:
```
APCB_SOURCES=$(foreach f, $(basename $(notdir $(SPD_SOURCES))), $(obj)/APCB_$(f).gen)
# APCB binary with magic numbers to be replaced by apcb_edit tool APCB_MAGIC_BLOB:=$(FIRMWARE_LOCATION)/APCB_magic.bin
$(obj)/APCB_%.gen: $(SPD_SOURCES) \ $(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) ```