summaryrefslogtreecommitdiff
path: root/images
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-02-20 13:47:16 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-02-23 11:14:45 +0100
commit3536e3904152210d70ae5ef6cf24c6d572cbf04f (patch)
treedff687579fde688d62cff499da1e8387bf850302 /images
parentf4d7d6589dc68df4f851d3b652c0ad75bd253799 (diff)
downloadbarebox-3536e3904152210d70ae5ef6cf24c6d572cbf04f.tar.gz
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 <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220220124736.3052502-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'images')
-rw-r--r--images/Makefile.stm32mp11
1 files changed, 7 insertions, 4 deletions
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