* [PATCH] imx8mm-evk: Generate a single bootable flash.bin again
@ 2021-08-18 12:19 Fabio Estevam
2021-08-18 14:07 ` Frieder Schrempf
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Fabio Estevam @ 2021-08-18 12:19 UTC (permalink / raw)
To: sbabic
Cc: uboot-imx, u-boot, hs, heiko.thiery, frieder.schrempf, tharvey,
marcel.ziswiler, Fabio Estevam
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@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";
@@ -217,4 +217,19 @@
};
};
};
+
+ imx-boot {
+ filename = "flash.bin";
+ pad-byte = <0x00>;
+
+ spl: blob-ext@1 {
+ offset = <0x0>;
+ filename = "spl.bin";
+ };
+
+ uboot: blob-ext@2 {
+ offset = <0x57c00>;
+ filename = "u-boot.itb";
+ };
+ };
};
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] imx8mm-evk: Generate a single bootable flash.bin again
2021-08-18 12:19 [PATCH] imx8mm-evk: Generate a single bootable flash.bin again Fabio Estevam
@ 2021-08-18 14:07 ` Frieder Schrempf
2021-08-19 18:51 ` Frieder Schrempf
2021-08-18 15:16 ` Heiko Schocher
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Frieder Schrempf @ 2021-08-18 14:07 UTC (permalink / raw)
To: Fabio Estevam, sbabic
Cc: uboot-imx, u-boot, hs, heiko.thiery, tharvey, marcel.ziswiler
On 18.08.21 14:19, 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@denx.de>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.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";
>
> @@ -217,4 +217,19 @@
> };
> };
> };
> +
> + imx-boot {
> + filename = "flash.bin";
> + pad-byte = <0x00>;
> +
> + spl: blob-ext@1 {
> + offset = <0x0>;
> + filename = "spl.bin";
> + };
> +
> + uboot: blob-ext@2 {
> + offset = <0x57c00>;
> + filename = "u-boot.itb";
> + };
> + };
> };
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] imx8mm-evk: Generate a single bootable flash.bin again
2021-08-18 12:19 [PATCH] imx8mm-evk: Generate a single bootable flash.bin again Fabio Estevam
2021-08-18 14:07 ` Frieder Schrempf
@ 2021-08-18 15:16 ` Heiko Schocher
2021-08-18 16:56 ` Tim Harvey
2021-08-19 19:24 ` Marcel Ziswiler
3 siblings, 0 replies; 9+ messages in thread
From: Heiko Schocher @ 2021-08-18 15:16 UTC (permalink / raw)
To: Fabio Estevam, sbabic
Cc: uboot-imx, u-boot, heiko.thiery, frieder.schrempf, tharvey,
marcel.ziswiler
Hello Fabio,
On 18.08.21 14:19, 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@denx.de>
> ---
> arch/arm/dts/imx8mm-evk-u-boot.dtsi | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
Reviewed-by: Heiko Schocher <hs@denx.de>
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@denx.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] imx8mm-evk: Generate a single bootable flash.bin again
2021-08-18 12:19 [PATCH] imx8mm-evk: Generate a single bootable flash.bin again Fabio Estevam
2021-08-18 14:07 ` Frieder Schrempf
2021-08-18 15:16 ` Heiko Schocher
@ 2021-08-18 16:56 ` Tim Harvey
2021-08-19 19:24 ` Marcel Ziswiler
3 siblings, 0 replies; 9+ messages in thread
From: Tim Harvey @ 2021-08-18 16:56 UTC (permalink / raw)
To: Fabio Estevam
Cc: Stefano Babic, dl-uboot-imx, u-boot, Heiko Schocher,
Heiko Thiery, Schrempf Frieder, Marcel Ziswiler
On Wed, Aug 18, 2021 at 5:19 AM Fabio Estevam <festevam@denx.de> 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@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";
>
> @@ -217,4 +217,19 @@
> };
> };
> };
> +
> + imx-boot {
> + filename = "flash.bin";
> + pad-byte = <0x00>;
> +
> + spl: blob-ext@1 {
> + offset = <0x0>;
> + filename = "spl.bin";
> + };
> +
> + uboot: blob-ext@2 {
> + offset = <0x57c00>;
> + filename = "u-boot.itb";
> + };
> + };
> };
> --
> 2.25.1
>
Fabio,
Note that doc/board/freescale/imx8mm_evk.rst will need to be updated
after this change as well.
Best regards,
Tim
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] imx8mm-evk: Generate a single bootable flash.bin again
2021-08-18 14:07 ` Frieder Schrempf
@ 2021-08-19 18:51 ` Frieder Schrempf
2021-08-19 18:58 ` Fabio Estevam
0 siblings, 1 reply; 9+ messages in thread
From: Frieder Schrempf @ 2021-08-19 18:51 UTC (permalink / raw)
To: Fabio Estevam, sbabic
Cc: uboot-imx, u-boot, hs, heiko.thiery, tharvey, marcel.ziswiler
Hi Fabio,
On 18.08.21 16:07, Frieder Schrempf wrote:
> On 18.08.21 14:19, 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@denx.de>
>
> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
I tried to adapt this for my own board, but I needed to change the following in the imximage.cfg for the build to pass. Did you test this?
-LOADER mkimage.flash.mkimage 0x7E1000
+LOADER mkimage.spl.mkimage 0x7E1000
Best regards
Frieder
>> ---
>> 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";
>>
>> @@ -217,4 +217,19 @@
>> };
>> };
>> };
>> +
>> + imx-boot {
>> + filename = "flash.bin";
>> + pad-byte = <0x00>;
>> +
>> + spl: blob-ext@1 {
>> + offset = <0x0>;
>> + filename = "spl.bin";
>> + };
>> +
>> + uboot: blob-ext@2 {
>> + offset = <0x57c00>;
>> + filename = "u-boot.itb";
>> + };
>> + };
>> };
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] imx8mm-evk: Generate a single bootable flash.bin again
2021-08-19 18:51 ` Frieder Schrempf
@ 2021-08-19 18:58 ` Fabio Estevam
2021-08-19 19:09 ` Frieder Schrempf
2021-08-19 19:13 ` Marcel Ziswiler
0 siblings, 2 replies; 9+ messages in thread
From: Fabio Estevam @ 2021-08-19 18:58 UTC (permalink / raw)
To: Frieder Schrempf
Cc: Fabio Estevam, Stefano Babic, dl-uboot-imx, U-Boot-Denx,
Heiko Schocher, Heiko Thiery, Tim Harvey, Marcel Ziswiler
Hi Frieder,
On Thu, Aug 19, 2021 at 3:52 PM Frieder Schrempf
<frieder.schrempf@kontron.de> wrote:
> I tried to adapt this for my own board, but I needed to change the following in the imximage.cfg for the build to pass. Did you test this?
>
> -LOADER mkimage.flash.mkimage 0x7E1000
> +LOADER mkimage.spl.mkimage 0x7E1000
Interesting. I do not see the build error here.
My patch is against commit 78e786decb6c8 in mainline U-Boot.
Are you able to reproduce the build error on imx8mm-evk too?
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] imx8mm-evk: Generate a single bootable flash.bin again
2021-08-19 18:58 ` Fabio Estevam
@ 2021-08-19 19:09 ` Frieder Schrempf
2021-08-19 19:13 ` Marcel Ziswiler
1 sibling, 0 replies; 9+ messages in thread
From: Frieder Schrempf @ 2021-08-19 19:09 UTC (permalink / raw)
To: Fabio Estevam
Cc: Fabio Estevam, Stefano Babic, dl-uboot-imx, U-Boot-Denx,
Heiko Schocher, Heiko Thiery, Tim Harvey, Marcel Ziswiler
On 19.08.21 20:58, Fabio Estevam wrote:
> Hi Frieder,
>
> On Thu, Aug 19, 2021 at 3:52 PM Frieder Schrempf
> <frieder.schrempf@kontron.de> wrote:
>
>> I tried to adapt this for my own board, but I needed to change the following in the imximage.cfg for the build to pass. Did you test this?
>>
>> -LOADER mkimage.flash.mkimage 0x7E1000
>> +LOADER mkimage.spl.mkimage 0x7E1000
>
> Interesting. I do not see the build error here.
>
> My patch is against commit 78e786decb6c8 in mainline U-Boot.
>
> Are you able to reproduce the build error on imx8mm-evk too?
Yes, I'm building against the very same commit from master and I get the following at the end of the build, also for imx8mm-evk:
MKIMAGE u-boot.img
MKIMAGE u-boot-dtb.img
CFGS spl/u-boot-spl.cfgout
BINMAN all
binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000 ./mkimage-out.spl.mkimage': mkimage.flash.mkimage: Can't open: No such file or directory
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] imx8mm-evk: Generate a single bootable flash.bin again
2021-08-19 18:58 ` Fabio Estevam
2021-08-19 19:09 ` Frieder Schrempf
@ 2021-08-19 19:13 ` Marcel Ziswiler
1 sibling, 0 replies; 9+ messages in thread
From: Marcel Ziswiler @ 2021-08-19 19:13 UTC (permalink / raw)
To: festevam, frieder.schrempf
Cc: hs, festevam, uboot-imx, sbabic, u-boot, tharvey, heiko.thiery
Hi Fabio and Frieder
On Thu, 2021-08-19 at 15:58 -0300, Fabio Estevam wrote:
> Hi Frieder,
>
> On Thu, Aug 19, 2021 at 3:52 PM Frieder Schrempf
> <frieder.schrempf@kontron.de> wrote:
>
> > I tried to adapt this for my own board, but I needed to change the following in the imximage.cfg for the
> > build to pass. Did you test this?
> >
> > -LOADER mkimage.flash.mkimage 0x7E1000
> > +LOADER mkimage.spl.mkimage 0x7E1000
Yes, I can copy that. And while investigating I noticed that doing a clean or even a mrproper does not seem to
clean any of those mkimage.flash.mkimage or mkimage-out.flash.mkimage.
> Interesting. I do not see the build error here.
So likely, it was just picking up some old stuff for you Fabio. Not sure whether or not we would also want to
fix this cleaning issue as it can be quite confusing.
> My patch is against commit 78e786decb6c8 in mainline U-Boot.
>
> Are you able to reproduce the build error on imx8mm-evk too?
Yes, once one does hand clean them old artifacts.
> Thanks
Cheers
Marcel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] imx8mm-evk: Generate a single bootable flash.bin again
2021-08-18 12:19 [PATCH] imx8mm-evk: Generate a single bootable flash.bin again Fabio Estevam
` (2 preceding siblings ...)
2021-08-18 16:56 ` Tim Harvey
@ 2021-08-19 19:24 ` Marcel Ziswiler
3 siblings, 0 replies; 9+ messages in thread
From: Marcel Ziswiler @ 2021-08-19 19:24 UTC (permalink / raw)
To: festevam, sbabic
Cc: hs, u-boot, uboot-imx, tharvey, frieder.schrempf, heiko.thiery
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@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@1 {
> + offset = <0x0>;
> + filename = "spl.bin";
> + };
> +
> + uboot: blob-ext@2 {
> + offset = <0x57c00>;
> + filename = "u-boot.itb";
> + };
> + };
> };
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-08-19 19:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 12:19 [PATCH] imx8mm-evk: Generate a single bootable flash.bin again Fabio Estevam
2021-08-18 14:07 ` Frieder Schrempf
2021-08-19 18:51 ` Frieder Schrempf
2021-08-19 18:58 ` Fabio Estevam
2021-08-19 19:09 ` Frieder Schrempf
2021-08-19 19:13 ` Marcel Ziswiler
2021-08-18 15:16 ` Heiko Schocher
2021-08-18 16:56 ` Tim Harvey
2021-08-19 19:24 ` Marcel Ziswiler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.