blob: ee71d9930e0374dab5ac6cc242902832f07292d7 [file] [log] [blame]
Kangheui Wone20bc462021-04-06 16:55:48 +10001# SPDX-License-Identifier: GPL-2.0-only
2
3verstage-generic-ccopts += -I$(src)/soc/amd/common/psp_verstage/include
Kangheui Wone20bc462021-04-06 16:55:48 +10004verstage-generic-ccopts += -D__USER_SPACE__
5CPPFLAGS_common += -I$(VBOOT_SOURCE)/firmware/2lib/include/
6
Martin Rothc420d532022-11-15 12:08:30 -07007ifeq ($(CONFIG_COMPILER_GCC),y)
Kangheui Wone20bc462021-04-06 16:55:48 +10008# This size should match the size in the linker script.
9CFLAGS_arm += -Wstack-usage=40960
Martin Rothc420d532022-11-15 12:08:30 -070010else
11CFLAGS_arm += -Wframe-larger-than=40960
12endif
Kangheui Wone20bc462021-04-06 16:55:48 +100013
Karthikeyan Ramasubramanianc2f6f352021-09-10 12:03:30 -060014verstage-y += boot_dev.c
Kangheui Wone20bc462021-04-06 16:55:48 +100015verstage-y += delay.c
16verstage-y += fch.c
17verstage-y += pmutil.c
18verstage-y += post.c
19verstage-y += printk.c
20verstage-y += psp_verstage.c
21verstage-y += psp.c
22verstage-y += reset.c
Kangheui Wone20bc462021-04-06 16:55:48 +100023verstage-y += timer.c
24verstage-y += vboot_crypto.c
Kangheui Wone20bc462021-04-06 16:55:48 +100025
26$(obj)/psp_verstage.bin: $(objcbfs)/verstage.elf
27 $(OBJCOPY_verstage) -O binary $^ $@
Karthikeyan Ramasubramanian2049bb92023-05-17 17:36:19 -060028
29# Default CONFIG_PSP_VERSTAGE_FILE configuration requires psp_verstage.bin and the above
30# build rule takes effect. Once CONFIG_PSP_VERSTAGE_FILE is overridden with signed PSP
31# verstage, then psp_verstage.bin is not built. The following build rule ensures that the
32# unsigned psp_verstage.bin is still built even when not used so that it can be used for
33# signing purposes.
34build_complete:: $(obj)/psp_verstage.bin