mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: stm32mp: don't generate .img symlinks for .stm32 binaries
@ 2023-09-15 13:03 Ahmad Fatoum
  2023-09-21  8:05 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-09-15 13:03 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The .img extension for stm32mp1 images has been unfortunate. The format was
deprecated and finally removed in TF-A v2.8 in favor of the FIP format.

We won't remove support in barebox soon, but we shouldn't call these images
*.img. Since commit 3536e3904152 ("ARM: stm32mp: change stm32image extension to .stm32")
introduced with v2022.04.0, the .img files have been symlinks to regular files with
a stm32 extension and this commit now finishes the job and deletes the .img symlinks.

Users still using older TF-A versions should change their build system to use the same
barebox image file, but with .stm32 extension.

Users with new TF-A versions, should use the barebox-stm32mp-generic-bl33.img
as non-trusted firmware in the FIP in addition to a matching device tree generated
during the same barebox build.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 images/Makefile.stm32mp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/images/Makefile.stm32mp b/images/Makefile.stm32mp
index 59d65722078d..86ff870051c2 100644
--- a/images/Makefile.stm32mp
+++ b/images/Makefile.stm32mp
@@ -9,7 +9,7 @@
 .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)
+	@(cd $(obj) && rm -f $(basename $(notdir $@)).img)
 	$(call if_changed,stm32_image)
 
 define build_stm32mp_image =
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: stm32mp: don't generate .img symlinks for .stm32 binaries
  2023-09-15 13:03 [PATCH] ARM: stm32mp: don't generate .img symlinks for .stm32 binaries Ahmad Fatoum
@ 2023-09-21  8:05 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-09-21  8:05 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Fri, Sep 15, 2023 at 03:03:53PM +0200, Ahmad Fatoum wrote:
> The .img extension for stm32mp1 images has been unfortunate. The format was
> deprecated and finally removed in TF-A v2.8 in favor of the FIP format.
> 
> We won't remove support in barebox soon, but we shouldn't call these images
> *.img. Since commit 3536e3904152 ("ARM: stm32mp: change stm32image extension to .stm32")
> introduced with v2022.04.0, the .img files have been symlinks to regular files with
> a stm32 extension and this commit now finishes the job and deletes the .img symlinks.
> 
> Users still using older TF-A versions should change their build system to use the same
> barebox image file, but with .stm32 extension.
> 
> Users with new TF-A versions, should use the barebox-stm32mp-generic-bl33.img
> as non-trusted firmware in the FIP in addition to a matching device tree generated
> during the same barebox build.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  images/Makefile.stm32mp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/images/Makefile.stm32mp b/images/Makefile.stm32mp
> index 59d65722078d..86ff870051c2 100644
> --- a/images/Makefile.stm32mp
> +++ b/images/Makefile.stm32mp
> @@ -9,7 +9,7 @@
>  .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)
> +	@(cd $(obj) && rm -f $(basename $(notdir $@)).img)
>  	$(call if_changed,stm32_image)
>  
>  define build_stm32mp_image =
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-21  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-15 13:03 [PATCH] ARM: stm32mp: don't generate .img symlinks for .stm32 binaries Ahmad Fatoum
2023-09-21  8:05 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox