[RFC] imx8mm-evk: Generate a bootable flash.bin again

Heiko Schocher hs at denx.de
Wed Aug 18 07:19:27 CEST 2021


Hello Fabio,

On 18.08.21 03:44, Fabio Estevam wrote:
> Hi Heiko,
> 
> On Tue, Aug 17, 2021 at 12:56 AM Heiko Schocher <hs at denx.de> wrote:
> 
>> I am unsure here, if it makes sense to overwrite flash.bin with the
>> binary which contains SPL and u-boot.itb. May others want to use
>> them (as I currently use them for signing them)
> 
> I thought about that too. Frieder suggested I use a different name for
> the SPL file, such as spl.bin.
> 
> I am concerned that renaming flash.bin to spl.bin may break i.MX8MM
> targets that do not use binman, such as the verdin-imx8mm board.

Hmm... okay, but I do not understand why spl code is named flash.bin
than?

spl.bin seems better to me.

>> Why not imx-boot as image name as in NXP sources?
> 
> NXP U-Boot also generates the final binary called "flash.bin"

What do you mean with "final binary"? The binary which contains
SPL and u-boot (and all other needed binaries)?

If so, is this really called flash.bin? So *same* name as "SPL only"
code? I could not believe this...

NXP code does this not for all imx8 derivates, see comment:

https://github.com/Freescale/meta-freescale/blob/master/recipes-bsp/u-boot/u-boot-fslc_2021.07.bb#L31

But yes, the container is named "flash.bin"...

> My main motivation for sending this RFC patch is to avoid imx8mm-evk
> breakage when people upgrade
> to U-Boor 2021.07.

U-Boot 2021.07 is broken? Or do you mean 2021.10?

Ah, *now* I got it commit "8996e6b7c6a1" introduced a SPL based "flash.bin"
through arch/arm/dts/imx8mm-evk-u-boot.dtsi:

+       flash {
+               mkimage {
+                       args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
+
+                       blob {
+                               filename = "u-boot-spl-ddr.bin";
+                       };
+               };
+       };

-> now we have a "flash.bin" with SPL only code and a "flash.bin"
Makefile target which produces "flash.bin" which is a container
of SPL, U-Boot, dtb, atf, ... and may much more binaries...

:-(

Added Peng to cc, as he did this conversion for imx8mm-evk-u-boot.dtsi

> Prior to 2021.07: only flash.bin was required. Yocto recipe, for
> example, will no longer produce a bootable image
> after the upgrade to 2021.07. This is the breakage I would like to avoid.

I vote for renaming flash.bin (in SPL case) to spl.bin. It seems to
me there are many imx8*-u-boot.dtsi file now which use this part:

+       flash {
+               mkimage {
+                       args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
+
+                       blob {
+                               filename = "u-boot-spl-ddr.bin";
+                       };
+               };
+       };

But may this rename is no problem, as all boards use the "flash.bin" container?

I don;t know...

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list