xref: /aosp_15_r20/external/coreboot/src/mainboard/amd/chausie/Makefile.mk (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1# SPDX-License-Identifier: GPL-2.0-only
2
3bootblock-y += bootblock.c
4bootblock-y += early_gpio.c
5bootblock-y += ec.c
6
7romstage-y += port_descriptors.c
8
9ramstage-y += chromeos.c
10ramstage-y += gpio.c
11ramstage-y += port_descriptors.c
12
13ifneq ($(wildcard $(MAINBOARD_BLOBS_DIR)/APCB_FT6.bin),)
14APCB_SOURCES = $(MAINBOARD_BLOBS_DIR)/APCB_FT6.bin
15APCB_SOURCES_RECOVERY = $(MAINBOARD_BLOBS_DIR)/APCB_FT6_DefaultRecovery.bin
16else
17show_notices:: warn_no_apcb
18endif
19
20ifeq ($(CONFIG_CHAUSIE_HAVE_MCHP_FW),y)
21$(call add_intermediate, add_mchp_fw)
22	$(CBFSTOOL) $(obj)/coreboot.pre write -r EC -f $(CONFIG_CHAUSIE_MCHP_SIG_FILE) --fill-upward
23
24# calculate the absolute position from the config offset
25CHAUSIE_EC_POSITION=$(call int-add, \
26	$(call int-subtract, 0xffffffff \
27	$(CONFIG_ROM_SIZE)) $(CONFIG_CHAUSIE_MCHP_FW_OFFSET) 1)
28
29cbfs-files-y += ec/ecfw
30ec/ecfw-file := $(CONFIG_CHAUSIE_MCHP_FW_FILE)
31ec/ecfw-position := $(CHAUSIE_EC_POSITION)
32ec/ecfw-type := raw
33
34else
35show_notices:: warn_no_mchp
36endif # CONFIG_CHAUSIE_HAVE_MCHP_FW
37
38PHONY+=warn_no_mchp
39warn_no_mchp:
40	printf "\n\t** WARNING **\n"
41	printf "coreboot has been built without the Microchip EC FW.\n"
42	printf "Do not flash this image.  Your Chausie's power button\n"
43	printf "will not respond when you press it.\n\n"
44