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

Heiko Schocher hs at denx.de
Tue Aug 17 05:56:26 CEST 2021


Hello Fabio,

On 16.08.21 17:21, Fabio Estevam wrote:
> After the convesion 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 image because the extra u-boot.itb is now required.
> 
> Generate a final flash.bin image that can be used again as a single
> bootable image to keep the original behavior.
> 
> Suggested-by: Heiko Schocher <hs at denx.de>
> Signed-off-by: Fabio Estevam <festevam at denx.de>
> ---
>  arch/arm/dts/imx8mm-evk-u-boot.dtsi | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> index f200afac9f..ad3056c7c8 100644
> --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> @@ -217,4 +217,19 @@
>  			};
>  		};
>  	};
> +
> +	imx-boot {
> +		filename = "flash.bin";

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)

Why not imx-boot as image name as in NXP sources?
(Thats why I named it so in my "fast example approach")

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

regarding the question, if we can make a generic file .. for example
on the imx8mp-phyboard-pollux-rdk u-boot is at offset 0x60000 in
QSPI NOR ( for QSPI boot of course)

So, there should be something like this:

+	imx-boot {
+		filename = "imx-boot";
+		pad-byte = <0x00>;
+
+		qspiheader: blob-ext at 2 {
+			offset = <0x400>;
+			filename = "qspiheader.bin";
+		};
+
+		spl: blob-ext at 2 {
+			offset = <0x1000>;
+			filename = "flash.bin";
+		};
+
+		uboot: blob-ext at 3 {
+			offset = <0x60000>;
+			filename = "u-boot.itb";
+		};
+	};

On sd card boot it is without qspiheader and offsets -0x1000, so
may we make a imx-boot and imx-boot-qspi ?

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

+	imx-boot-qspi {
+		filename = "imx-boot-qspi";
+		pad-byte = <0x00>;
+
+		qspiheader: blob-ext at 2 {
+			offset = <0x400>;
+			filename = "qspiheader.bin";
+		};
+
+		imx-boot: blob-ext at 2 {
+			offset = <0x1000>;
+			filename = "imx-boot";
+		};
+	};

And of course we must add a possibility to create qspi header. I have
here local some python script, but not sure how to integrate this to
binman.

And it would be very cool, to sign the image with binman!

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