From 0a0e7514bb2253e8c4ce2ba033517000c8078bd4 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Wed, 21 Sep 2022 00:41:04 -0600 Subject: [PATCH] soc/amd/mendocino: Update build rules for PSP BIOS image Do not compress PSP BIOS image when CBFS verification is enabled. Otherwise when a file is added to CBFS, cbfstool is not able to find the metadata hash anchor magic in the compressed PSP BIOS image. BUG=b:227809919 TEST=Build and boot to OS in Skyrim with CBFS verification enabled for both x86 and PSP verstage. Change-Id: Iaed888b81d14ede77132ff48abcfbeb138c01ce4 Signed-off-by: Karthikeyan Ramasubramanian Reviewed-on: https://review.coreboot.org/c/coreboot/+/68136 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/amd/mendocino/Makefile.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/soc/amd/mendocino/Makefile.inc b/src/soc/amd/mendocino/Makefile.inc index 41aeb20ea4..306f22887b 100644 --- a/src/soc/amd/mendocino/Makefile.inc +++ b/src/soc/amd/mendocino/Makefile.inc @@ -261,11 +261,17 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ --location $(shell printf "%#x" $(MENDOCINO_FWM_POSITION)) \ --output $@ +ifeq ($(CONFIG_CBFS_VERIFICATION)$(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK),yy) +$(PSP_BIOSBIN_FILE): $(PSP_ELF_FILE) + rm -f $@ + $(OBJCOPY_bootblock) -O binary $< $@ +else $(PSP_BIOSBIN_FILE): $(PSP_ELF_FILE) $(AMDCOMPRESS) rm -f $@ @printf " AMDCOMPRS $(subst $(obj)/,,$(@))\n" $(AMDCOMPRESS) --infile $(PSP_ELF_FILE) --outfile $@ --compress \ --maxsize $(PSP_BIOSBIN_SIZE) +endif $(obj)/amdfw_a.rom: $(obj)/amdfw.rom rm -f $@