diff options
author | Felix Held <felix.held@amd.corp-partner.google.com> | 2021-08-27 04:11:10 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-08-28 18:47:05 +0000 |
commit | f8df08213d8abff2e53e90cc8f03056ff5a8e24a (patch) | |
tree | e93a3a8e7cdcb7536174de14ccce67e0ede1c91c /src/soc | |
parent | 30bfcaba391523b0723999ba87cc7a94612e9218 (diff) |
soc/amd/common/fsp/Makefile: check if CONFIG_FSP_M_FILE is defined
When CONFIG_FSP_M_FILE isn't defined, the parameter of the file-size
call evaluates to an empty string, so the file-size call will run
"cat | wc -c" which will cause make to get stuck in there. Also print a
message when no FSP-M file is specified that the resulting image won't
boot successfully.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6b02774e2c79d12554fd076aa01bbe972176f372
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57189
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/fsp/Makefile.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/soc/amd/common/fsp/Makefile.inc b/src/soc/amd/common/fsp/Makefile.inc index 2541f27754..ee5e1ac19a 100644 --- a/src/soc/amd/common/fsp/Makefile.inc +++ b/src/soc/amd/common/fsp/Makefile.inc @@ -7,11 +7,15 @@ ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_DMI_TABLES) += dmi.c subdirs-y += ./* +ifeq ($(CONFIG_FSP_M_FILE),) +$(info There's no FSP-M binary file specified. The resulting image won't boot successfully.) +else ifeq ($(call int-gt,\ $(call file-size,$(call strip_quotes,$(CONFIG_FSP_M_FILE)))\ $(shell printf "%d" $(CONFIG_FSP_M_SIZE))),\ 1) $(error FSP-M binary larger than FSP_M_FILE.) endif +endif # CONFIG_FSP_M_FILE endif # CONFIG_PLATFORM_USES_FSP2_0 |