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 <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68136
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
Karthikeyan Ramasubramanian 2022-09-21 00:41:04 -06:00 committed by Raul Rangel
parent e30e4f5450
commit 0a0e7514bb
1 changed files with 6 additions and 0 deletions

View File

@ -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 $@