Karthikeyan Ramasubramanian | a84d4f23 | 2022-02-02 10:10:03 -0700 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | |
| 3 | bootblock-y += bootblock.c |
| 4 | |
| 5 | romstage-y += port_descriptors.c |
| 6 | |
| 7 | ramstage-y += mainboard.c |
Jon Murphy | cbf0f98 | 2022-02-16 06:47:46 -0700 | [diff] [blame] | 8 | ramstage-y += ec.c |
Robert Zieba | b3b27f7 | 2022-10-03 14:50:55 -0600 | [diff] [blame] | 9 | ramstage-y += port_descriptors.c |
Jon Murphy | af025d6 | 2022-02-16 06:44:53 -0700 | [diff] [blame] | 10 | ramstage-$(CONFIG_CHROMEOS) += chromeos.c |
Karthikeyan Ramasubramanian | a84d4f23 | 2022-02-02 10:10:03 -0700 | [diff] [blame] | 11 | |
Karthikeyan Ramasubramanian | 43f51a0 | 2022-04-19 14:34:59 -0600 | [diff] [blame] | 12 | verstage-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += verstage.c |
| 13 | |
Karthikeyan Ramasubramanian | aea60bc | 2022-10-04 10:08:15 -0600 | [diff] [blame] | 14 | all-y += spi_speeds.c |
| 15 | |
Karthikeyan Ramasubramanian | a84d4f23 | 2022-02-02 10:10:03 -0700 | [diff] [blame] | 16 | subdirs-y += variants/baseboard |
Jon Murphy | 9e00571 | 2022-02-17 14:48:55 -0700 | [diff] [blame] | 17 | subdirs-y += variants/$(VARIANT_DIR) |
Karthikeyan Ramasubramanian | a84d4f23 | 2022-02-02 10:10:03 -0700 | [diff] [blame] | 18 | |
| 19 | CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include |
Jon Murphy | 9e00571 | 2022-02-17 14:48:55 -0700 | [diff] [blame] | 20 | CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include |
Karthikeyan Ramasubramanian | 92dc7d2 | 2022-03-14 23:59:07 -0600 | [diff] [blame] | 21 | |
Matt DeVillier | 34de4d5 | 2023-12-15 16:03:41 -0600 | [diff] [blame] | 22 | APCB_NAME=data.apcb |
| 23 | APCB_PATH=$(src)/mainboard/$(MAINBOARDDIR) |
Martin Roth | 3d24275 | 2022-09-09 12:17:10 -0600 | [diff] [blame] | 24 | |
Matt DeVillier | 34de4d5 | 2023-12-15 16:03:41 -0600 | [diff] [blame] | 25 | ifneq ($(wildcard $(APCB_PATH)/$(APCB_NAME)),) |
Karthikeyan Ramasubramanian | 92dc7d2 | 2022-03-14 23:59:07 -0600 | [diff] [blame] | 26 | $(info APCB sources present.) |
Karthikeyan Ramasubramanian | 6f023ec | 2022-04-12 17:06:01 -0600 | [diff] [blame] | 27 | |
Martin Roth | 5d6d800 | 2024-01-18 16:10:01 -0700 | [diff] [blame] | 28 | ifneq ($(wildcard $(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/memory/Makefile.mk),) |
Isaac Lee | efade6d | 2022-08-23 08:49:51 -0700 | [diff] [blame] | 29 | |
Karthikeyan Ramasubramanian | 6f023ec | 2022-04-12 17:06:01 -0600 | [diff] [blame] | 30 | LIB_SPD_DEPS = $(SPD_SOURCES) |
| 31 | |
Martin Roth | 3d24275 | 2022-09-09 12:17:10 -0600 | [diff] [blame] | 32 | APCB_SOURCES = $(obj)/$(APCB_NAME).gen |
Karthikeyan Ramasubramanian | 6f023ec | 2022-04-12 17:06:01 -0600 | [diff] [blame] | 33 | |
Martin Roth | 3d24275 | 2022-09-09 12:17:10 -0600 | [diff] [blame] | 34 | $(obj)/$(APCB_NAME).gen: $(SPD_SOURCES) \ |
Karthikeyan Ramasubramanian | 6f023ec | 2022-04-12 17:06:01 -0600 | [diff] [blame] | 35 | $(APCB_V3_EDIT_TOOL) \ |
Matt DeVillier | 34de4d5 | 2023-12-15 16:03:41 -0600 | [diff] [blame] | 36 | $(APCB_PATH)/$(APCB_NAME) |
| 37 | $(APCB_V3_EDIT_TOOL) $(APCB_PATH)/$(APCB_NAME) \ |
Martin Roth | 3d24275 | 2022-09-09 12:17:10 -0600 | [diff] [blame] | 38 | $(obj)/$(APCB_NAME).gen \ |
Karthikeyan Ramasubramanian | 6f023ec | 2022-04-12 17:06:01 -0600 | [diff] [blame] | 39 | --spd_sources $(SPD_SOURCES) \ |
| 40 | --mem_type 'lp5' |
Karthikeyan Ramasubramanian | 92dc7d2 | 2022-03-14 23:59:07 -0600 | [diff] [blame] | 41 | else |
Isaac Lee | efade6d | 2022-08-23 08:49:51 -0700 | [diff] [blame] | 42 | $(info SPD sources not found. Skipping APCB.) |
Martin Roth | 372503f | 2023-12-08 00:43:23 -0700 | [diff] [blame] | 43 | show_notices:: die_no_apcb |
Isaac Lee | efade6d | 2022-08-23 08:49:51 -0700 | [diff] [blame] | 44 | endif |
| 45 | else |
Karthikeyan Ramasubramanian | 92dc7d2 | 2022-03-14 23:59:07 -0600 | [diff] [blame] | 46 | $(info APCB sources not found. Skipping APCB.) |
Martin Roth | 372503f | 2023-12-08 00:43:23 -0700 | [diff] [blame] | 47 | show_notices:: die_no_apcb |
Karthikeyan Ramasubramanian | 92dc7d2 | 2022-03-14 23:59:07 -0600 | [diff] [blame] | 48 | endif |