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

Marcel Ziswiler marcel.ziswiler at toradex.com
Thu Aug 19 21:24:46 CEST 2021


On Wed, 2021-08-18 at 09:19 -0300, Fabio Estevam wrote:
> After the conversion to binman in commit 8996e6b7c6a1 ("imx8mm_evk: switch
> to use binman to pack images"), it is necessary to flash both flash.bin and
> u-boot.itb to get a bootable system. Prior to this commit, only flash.bin
> was needed. 
> 
> Such new requirement breaks existing distro mechanisms to generate the
> final binary because the extra u-boot.itb is now required.
> 
> Generate a final flash.bin that can be used again as a single
> bootable binary to keep the original behavior.
> 
> After this change the SPL binary is called spl.bin, which is a more
> descriptive name for its purpose, and can still be used standalone
> (for example, for secure boot purposes).
> 
> Signed-off-by: Fabio Estevam <festevam at denx.de>
> ---
>  arch/arm/dts/imx8mm-evk-u-boot.dtsi | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> index f200afac9f..453fe1d259 100644
> --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> @@ -150,7 +150,7 @@
>         };
>  
>  
> -       flash {
> +       spl {
>                 mkimage {
>                         args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";

A second issue I found (besides imximage.cfg needing adjustments as pointed out by Frieder) is that for me it
only works if I also explicitly set the filename here to spl.bin e.g. as follows:

			filename = "spl.bin";

Anyway, I am just about to send a patch set updating our Verdin iMX8M Mini to also make use of all this. Stay
tuned...

> @@ -217,4 +217,19 @@
>                         };
>                 };
>         };
> +
> +       imx-boot {
> +               filename = "flash.bin";
> +               pad-byte = <0x00>;
> +
> +               spl: blob-ext at 1 {
> +                       offset = <0x0>;
> +                       filename = "spl.bin";
> +               };
> +
> +               uboot: blob-ext at 2 {
> +                       offset = <0x57c00>;
> +                       filename = "u-boot.itb";
> +               };
> +       };
>  };


More information about the U-Boot mailing list