soc/mediatek: Require MCU and DRAM blobs to exist

When the config of MCU firmware blob such as CONFIG_SPM_FIRMWARE is
non-empty, we should always expect the file to exist. Similarly, since
the device is unlikely to boot without the DRAM blob (assuming MRC_CACHE
doesn't contain valid memory training data), dram.elf should always
exist as well.

Therefore, remove the check for the existence of the blobs. Build would
fail if any of the blobs is missing.

Change-Id: I755e7c5a70b34b0c3d3915ab339c65263688aad7
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84053
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Yu-Ping Wu 2024-08-23 16:07:15 +08:00 committed by Felix Held
commit 62ae90eac2
5 changed files with 9 additions and 19 deletions

View file

@ -88,9 +88,7 @@ DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram
$(DRAM_CBFS)-file := $(MT8183_BLOB_DIR)/dram.elf
$(DRAM_CBFS)-type := stage
$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
ifneq ($(wildcard $($(DRAM_CBFS)-file)),)
cbfs-files-y += $(DRAM_CBFS)
endif
cbfs-files-y += $(DRAM_CBFS)
BL31_MAKEARGS += PLAT=mt8183

View file

@ -69,16 +69,14 @@ $(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \
$(eval $(fw)-file := $(MT8186_BLOB_DIR)/$(fw)) \
$(eval $(fw)-type := raw) \
$(eval $(fw)-compression := LZ4) \
$(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \
$(eval cbfs-files-y += $(fw)) \
)
DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram
$(DRAM_CBFS)-file := $(MT8186_BLOB_DIR)/dram.elf
$(DRAM_CBFS)-type := stage
$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
ifneq ($(wildcard $($(DRAM_CBFS)-file)),)
cbfs-files-y += $(DRAM_CBFS)
endif
cbfs-files-y += $(DRAM_CBFS)
$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin
./util/mtkheader/gen-bl-img.py mt8183 sf $< $@

View file

@ -78,16 +78,14 @@ $(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \
$(eval $(fw)-file := $(MT8188_BLOB_DIR)/$(fw)) \
$(eval $(fw)-type := raw) \
$(eval $(fw)-compression := LZ4) \
$(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \
$(eval cbfs-files-y += $(fw)) \
)
DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram
$(DRAM_CBFS)-file := $(MT8188_BLOB_DIR)/dram.elf
$(DRAM_CBFS)-type := stage
$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
ifneq ($(wildcard $($(DRAM_CBFS)-file)),)
cbfs-files-y += $(DRAM_CBFS)
endif
cbfs-files-y += $(DRAM_CBFS)
$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin
./util/mtkheader/gen-bl-img.py mt8183 sf $< $@

View file

@ -71,16 +71,14 @@ $(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \
$(eval $(fw)-file := $(MT8192_BLOB_DIR)/$(fw)) \
$(eval $(fw)-type := raw) \
$(eval $(fw)-compression := LZ4) \
$(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \
$(eval cbfs-files-y += $(fw)) \
)
DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram
$(DRAM_CBFS)-file := $(MT8192_BLOB_DIR)/dram.elf
$(DRAM_CBFS)-type := stage
$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
ifneq ($(wildcard $($(DRAM_CBFS)-file)),)
cbfs-files-y += $(DRAM_CBFS)
endif
cbfs-files-y += $(DRAM_CBFS)
$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin
./util/mtkheader/gen-bl-img.py mt8183 sf $< $@

View file

@ -87,16 +87,14 @@ $(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \
$(eval $(fw)-file := $(MT8195_BLOB_DIR)/$(fw)) \
$(eval $(fw)-type := raw) \
$(eval $(fw)-compression := LZ4) \
$(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \
$(eval cbfs-files-y += $(fw)) \
)
DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram
$(DRAM_CBFS)-file := $(MT8195_BLOB_DIR)/dram.elf
$(DRAM_CBFS)-type := stage
$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
ifneq ($(wildcard $($(DRAM_CBFS)-file)),)
cbfs-files-y += $(DRAM_CBFS)
endif
cbfs-files-y += $(DRAM_CBFS)
$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin
./util/mtkheader/gen-bl-img.py mt8183 sf $< $@