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

Frieder Schrempf frieder.schrempf at kontron.de
Wed Aug 18 08:36:19 CEST 2021


On 18.08.21 07:19, Heiko Schocher wrote:
> 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://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FFreescale%2Fmeta-freescale%2Fblob%2Fmaster%2Frecipes-bsp%2Fu-boot%2Fu-boot-fslc_2021.07.bb%23L31&data=04%7C01%7Cfrieder.schrempf%40kontron.de%7C5a0d20c6c27e4d5c38bc08d96207bf7f%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637648607684078827%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Cbq1Eenz7z8BySR12NwZi2T0s1krCFQmDP4jeBMJle8%3D&reserved=0
> 
> 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...
> 
> :-(


Exactly, that's the main problem.

> 
> 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:

Yes, I think we should introduce a common dtsi file with a binman configuration that uses spl.bin for the SPL image and flash.bin for the final image. Then we could switch all boards to use this config step by step afterwards.

> 
> +       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
> 


More information about the U-Boot mailing list