imx8mm-evk: Generate a single bootable flash.bin again
Subsystems (2)
PATCH v4 1/1 imx8mm-evk: Generate a single bootable flash.bin again
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).
Also update imx8mm_evk.rst to remove the u-boot.itb copy step.
---
Changes since v3:
- Use u-boot-spl-ddr.bin in the LOADER section (Heiko)
- Dropped patch 2/2 as it needs improvements.
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(-)
arch/arm/dts/imx8mm-evk-u-boot.dtsi +16 -1
@@ -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"; + }; + }; };
board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg +1 -1
@@ -6,4 +6,4 @@ #define __ASSEMBLY__ BOOT_FROM sd -LOADER mkimage.flash.mkimage 0x7E1000 +LOADER u-boot-spl-ddr.bin 0x7E1000
doc/board/freescale/imx8mm_evk.rst +0 -1
@@ -50,7 +50,6 @@ Burn the flash.bin to MicroSD card offset 33KB: .. code-block:: bash $sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=notrunc - $sudo dd if=u-boot.itb of=/dev/sdc bs=1024 seek=384 conv=sync Boot ----
Signature · 1 line
2.25.1
Quoted 37 lines · 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).
Also update
imx8mm_evk.rstto remove the u-boot.itb copy step.Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Frieder Schrempf <[email protected]>Reviewed-by Heiko Schocher <[email protected]>Reviewed-by Marcel Ziswiler <[email protected]>---
Changes since v3:
- Use u-boot-spl-ddr.bin in the LOADER section (Heiko)
- Dropped patch 2/2 as it needs improvements.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(-)arch/arm/dts/imx8mm-evk-u-boot.dtsi +0
-0@@ -150,7 +150,7 @@ };
Quoted 6 lines
- flash {
+ spl {
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e0x7e1000";
As Heiko also pointed out for my patch set it might be nicer to explicitly name that file here:
filename = "spl.bin";
Quoted 44 lines
arch/arm/dts/imx8mm-evk-u-boot.dtsi +15
-0@@ -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"; + }; + }; };board/freescale/imx8mm_evk/imximage-8mm- renamed from board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg +0
-0lpddr4.cfg
indexb89092a559..90573be5fd100644board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg +0
-0@@ -6,4 +6,4 @@ #define __ASSEMBLY__
BOOT_FROM sdboard/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg +1
-1-LOADER mkimage.flash.mkimage 0x7E1000 +LOADER u-boot-spl-ddr.bin 0x7E1000doc/board/freescale/imx8mm_evk.rst +0
-0@@ -50,7 +50,6 @@ Burn the flash.bin to MicroSD card offset 33KB:.. code-block:: bash
$sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=notrunc - $sudo dd if=u-boot.itb of=/dev/sdc bs=1024 seek=384 conv=sync
Boot
----