[U-Boot] [PATCHv1] arm: stm32mp1: deploy spl in root folder

Patrick DELAUNAY patrick.delaunay at st.com
Thu Jan 24 16:08:44 UTC 2019


Hi Sean,

> From: Sean Nyekjaer <sean at geanix.com>
> Sent: jeudi 24 janvier 2019 13:38
> 
> Hi Patrice
> 
> >>> What about keeping spl binary in /spl directory and copying it in
> >>> root directory instead ? It would avoid us to update our environment
> >>> regarding your proposal.
> >
> >
> > You didn't answer to the above question.
> >
> > Patrice
> >
> 
> Sorry.
> I really don't care how it's done :-)
> But the I think the best solution is the I one posted, it's better to align things with
> other boards in u-boot.

I checked with Patrice the other boards and most of the cases the modified spl binay 
(u-boot-spl.bin/ u-boot-spl.ais / u-boot-spl.img / u-boot-spl.pbl / u-boot-spl.gph)
are generated in spl directory.

So I done the same for u-boot-spl.stm32.

The only case where it is populated in u-boot directory it is when it is concatenated with u-boot image
(so the generated files depends on u-boot.bin) , but is not the case for us.

Perhaps I miss so other cases ?

Moreover I am working with YOCTO  and using a sub-directory is not issue with latest version
and with patch in poky/meta/recipes-bsp/u-boot/u-boot.inc
------------------------------------------------------------------------------------------
   commit c6ab82882cd49be5510d1f8c967d0dc2da2490c2
   Author:	Nathan Rossi <nathan at nathanrossi.com>  Fri Mar 25 10:07:12 2016
  Committer:	Richard Purdie <richard.purdie at linuxfoundation.org>  Mon Mar 28 16:55:48 2016

  u-boot.inc: Add sub-dir support for SPL_BINARY

  Add support for the SPL_BINARY variable to handle sub directories. In
  some cases the SPL binary that needs to be deployed is only built to the
  spl/ directory in U-Boot. So that a sub directory can be specified in
  the SPL_BINARY variable, handle the case so that the deploy code uses
  the basename of the path specified in SPL_BINARY.

  (From OE-Core rev: eb90d1c8fc7b82ca2593185930b3bf175f40ae13)

  Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
  Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
------------------------------------------------------------------------------------------

So, I don't understood the blocking point, and other platform do the same (the reason of the patch).

Even I agree that copy the generated u-boot-spl.stm32 in u-boot build directory could be easier (for BUILDROOT ?),
I want keep the file  spl/u-boot-spl.stm32 to avoid to break the current upstream effort
of YOCTO BSP support for STM32MP157 board (which expect spl file in spl directory).

I you are agree with the next proposal,  I will ack you patch v2

=> a modified patch to just copy with $(call if_changed,copy)

------------------------------------------------------------------------------------------------------------
From c2ee2da650c0afef8df8c467ee6e643480193c5d Mon Sep 17 00:00:00 2001
From: Patrick Delaunay <patrick.delaunay at st.com>
Date: Thu, 24 Jan 2019 16:08:50 +0100
Subject: [PATCHv2] arm: stm32mp1: deploy spl in root folder

Deploy u-boot-spl.stm32 binary in u-boot root folder like the rest of
the boards. This makes it more streamlined when building in Yocto,
Buildroot etc..

Signed-off-by: Sean Nyekjaer <sean.nyekjaer at prevas.dk>
---

 arch/arm/mach-stm32mp/config.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-stm32mp/config.mk b/arch/arm/mach-stm32mp/config.mk
index cde5850..f371aac 100644
--- a/arch/arm/mach-stm32mp/config.mk
+++ b/arch/arm/mach-stm32mp/config.mk
@@ -3,7 +3,7 @@
 # Copyright (C) 2018, STMicroelectronics - All Rights Reserved
 #
 
-ALL-$(CONFIG_SPL_BUILD) += spl/u-boot-spl.stm32
+ALL-$(CONFIG_SPL_BUILD) += u-boot-spl.stm32
 
 MKIMAGEFLAGS_u-boot-spl.stm32 = -T stm32image -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE)
 
@@ -11,3 +11,6 @@ spl/u-boot-spl.stm32: MKIMAGEOUTPUT = spl/u-boot-spl.stm32.log
 
 spl/u-boot-spl.stm32: spl/u-boot-spl.bin FORCE
 	$(call if_changed,mkimage)
+
+u-boot-spl.stm32 : spl/u-boot-spl.stm32
+	$(call if_changed,copy)
-- 
2.7.4
--------------------------------------------------------------------------------------------------

Sorry for the delay

> 
> /Sean

Patrick


More information about the U-Boot mailing list