blob: 4c5f80db8bb9bf1454d66cc58b07af629b0302ad [file] [log] [blame]
Jon Murphya8590572023-02-23 13:42:52 -07001# SPDX-License-Identifier: GPL-2.0-or-later
2
3bootblock-y += bootblock.c
4
5romstage-y += port_descriptors.c
6
Jon Murphya4564582023-03-29 15:38:19 -06007ramstage-y += ec.c
Jon Murphya8590572023-02-23 13:42:52 -07008ramstage-y += mainboard.c
9ramstage-y += port_descriptors.c
Jon Murphy4c4e9fc2023-03-29 15:28:25 -060010ramstage-$(CONFIG_CHROMEOS) += chromeos.c
Jon Murphya8590572023-02-23 13:42:52 -070011
Karthikeyan Ramasubramanian5b5ee582023-06-01 15:33:50 -060012verstage-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += verstage.c
13
Jon Murphya8590572023-02-23 13:42:52 -070014subdirs-y += variants/baseboard
Jon Murphy3f348792023-03-29 15:36:01 -060015subdirs-y += variants/$(VARIANT_DIR)
Jon Murphya8590572023-02-23 13:42:52 -070016
17CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
Jon Murphy3f348792023-03-29 15:36:01 -060018CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
Karthikeyan Ramasubramanian8d3ca332023-04-25 16:52:54 -060019
20APCB_NAME=APCB_PHX_D5
21
22ifneq ($(wildcard $(MAINBOARD_BLOBS_DIR)/$(APCB_NAME).bin),)
23$(info APCB sources present.)
24
Martin Rothdd4fa8e2023-05-11 15:00:40 -060025APCB_SOURCES = $(MAINBOARD_BLOBS_DIR)/$(APCB_NAME).bin
Karthikeyan Ramasubramanian8d3ca332023-04-25 16:52:54 -060026
Martin Rothdd4fa8e2023-05-11 15:00:40 -060027# The SPD is currently built directly into the APCB.
28# Add the below section back in after the apcbtool is updated to handle the
29# Phoenix APCB SPD configuration.
Karthikeyan Ramasubramanian8d3ca332023-04-25 16:52:54 -060030
Rob Barnesd6b58d52023-06-14 11:19:53 -060031ifneq ($(wildcard $(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/memory/Makefile.inc),)
32
33LIB_SPD_DEPS = $(SPD_SOURCES)
34
35APCB_SOURCES = $(obj)/$(APCB_NAME).gen
36
37$(obj)/$(APCB_NAME).gen: $(SPD_SOURCES) \
38 $(APCB_V3A_EDIT_TOOL) \
39 $(MAINBOARD_BLOBS_DIR)/$(APCB_NAME).bin
40 $(APCB_V3A_EDIT_TOOL) $(MAINBOARD_BLOBS_DIR)/$(APCB_NAME).bin \
41 $(obj)/$(APCB_NAME).gen \
42 --spd_sources $(SPD_SOURCES)
43else
44$(info SPD sources not found. Skipping APCB.)
Martin Roth372503f2023-12-08 00:43:23 -070045show_notices:: die_no_apcb
Rob Barnesd6b58d52023-06-14 11:19:53 -060046endif
Karthikeyan Ramasubramanian8d3ca332023-04-25 16:52:54 -060047
Karthikeyan Ramasubramanian8d3ca332023-04-25 16:52:54 -060048else
49$(info APCB sources not found. Skipping APCB.)
Martin Roth372503f2023-12-08 00:43:23 -070050show_notices:: warn_no_apcb
Karthikeyan Ramasubramanian8d3ca332023-04-25 16:52:54 -060051endif