From 3536e3904152210d70ae5ef6cf24c6d572cbf04f Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Sun, 20 Feb 2022 13:47:16 +0100 Subject: ARM: stm32mp: change stm32image extension to .stm32 The .img extension for stm32mp1 images is unfortunate. The format is deprecated and its header makes it not directly executable and thus not suitable as-is for use in a FIP image where the BL33 is run from offset 0. To make existence of the STM32 header evident, rename the extension from .img to .stm32. As it's still supported by TF-A, have symlinks, so user build script can use the old names for now. Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20220220124736.3052502-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- images/Makefile.stm32mp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'images') diff --git a/images/Makefile.stm32mp b/images/Makefile.stm32mp index 558f8c5859..eeb5d9ecf6 100644 --- a/images/Makefile.stm32mp +++ b/images/Makefile.stm32mp @@ -6,16 +6,19 @@ # %.stm32 - convert into STM32MP image # -------------------------------------- -$(obj)/%.stm32: $(obj)/% FORCE +.SECONDEXPANSION: +$(obj)/%.stm32: $(obj)/$$(FILE_$$(@F)) FORCE + $(Q)if [ -z $(FILE_$(@F)) ]; then echo "FILE_$(@F) empty!"; false; fi + @(cd $(obj) && ln -fs $(notdir $@) $(basename $(notdir $@)).img) $(call if_changed,stm32_image) define build_stm32mp_image = $(eval ifeq ($($(strip $(1))), y) pblb-y += $(strip $(2)) - FILE_barebox-$(strip $(3)).img = $(strip $(2)).pblb.stm32 - OPTS_$(strip $(2)).pblb.stm32 = -a 0xc0100000 -e 0xc0100000 -v1 - image-y += barebox-$(strip $(3)).img + FILE_barebox-$(strip $(3)).stm32 = $(strip $(2)).pblb + OPTS_barebox-$(strip $(3)).stm32 = -a 0xc0100000 -e 0xc0100000 -v1 + image-y += barebox-$(strip $(3)).stm32 endif ) endef -- cgit v1.2.1