[PATCH v3 1/2] imx8mm-evk: Generate a single bootable flash.bin again
Marcel Ziswiler
marcel.ziswiler at toradex.com
Mon Aug 23 14:03:27 CEST 2021
On Mon, 2021-08-23 at 13:55 +0200, Heiko Thiery wrote:
> Hi Fabio,
>
> Am Do., 19. Aug. 2021 um 21:28 Uhr schrieb Fabio Estevam <festevam at denx.de>:
> >
> > 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.
> > and if it is not
> > 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).
> >
> > Also update imx8mm_evk.rst to remove the u-boot.itb copy step.
> >
> > Signed-off-by: Fabio Estevam <festevam at denx.de>
> > Reviewed-by: Frieder Schrempf <frieder.schrempf at kontron.de>
> > Reviewed-by: Heiko Schocher <hs at denx.de>
> >
> > Signed-off-by: Fabio Estevam <festevam at denx.de>
> > ---
> > Changes since v2:
> > - Change the LOADER to mkimage.spl.mkimage (Frieder)
> >
> > arch/arm/dts/imx8mm-evk-u-boot.dtsi | 17 ++++++++++++++++-
> > .../imx8mm_evk/imximage-8mm-lpddr4.cfg | 2 +-
> > doc/board/freescale/imx8mm_evk.rst | 1 -
> > 3 files changed, 17 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> > index f200afac9f..75cd59e545 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";
> >
> > @@ -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";
> > + };
> > + };
> > };
> > diff --git a/board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg b/board/freescale/imx8mm_evk/imximage-8mm-
> > lpddr4.cfg
> > index b89092a559..2c15dbc413 100644
> > --- a/board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg
> > +++ b/board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg
> > @@ -6,4 +6,4 @@
> > #define __ASSEMBLY__
> >
> > BOOT_FROM sd
> > -LOADER mkimage.flash.mkimage 0x7E1000
> > +LOADER mkimage.spl.mkimage 0x7E1000
>
> I think the "mkimage.spl.mkimage" is a temporarily created file from
> binman. Isn't it correct to use the output file of the binman image
> u-boot-spl-ddr ("u-boot-spl-ddr.bin") here?
Yes, looking at it again, that really seems the proper one and I can confirm that this works fine.
More information about the U-Boot
mailing list