ARM: dts: imx: Convert i.MX8M flash.bin image generation to binman

Rework the flash.bin image generation such that it uses the new binman
nxp_imx8mimage etype. This way, the flash.bin is assembled in correct
order using plain binman, without any workarounds or sections assembled
in special DT node order.

Reviewed-By: Tim Harvey <tharvey@gateworks.com>
Tested-By: Tim Harvey <tharvey@gateworks.com> # imx8mm_venice
Tested-by: Fabio Estevam <festevam@gmail.com> # imx8mm-evk and imx8mn-evk
Signed-off-by: Marek Vasut <marex@denx.de>
This commit is contained in:
Marek Vasut 2024-04-26 01:00:37 +02:00 committed by Fabio Estevam
parent 6509e007e9
commit 37e50627ef
8 changed files with 222 additions and 321 deletions

View file

@ -5,7 +5,6 @@
/ { / {
binman: binman { binman: binman {
multiple-images;
}; };
#ifdef CONFIG_OPTEE #ifdef CONFIG_OPTEE
@ -43,7 +42,26 @@
}; };
&binman { &binman {
u-boot-spl-ddr { filename = "flash.bin";
section {
pad-byte = <0x00>;
#ifdef CONFIG_FSPI_CONF_HEADER
fspi_conf_block {
filename = CONFIG_FSPI_CONF_FILE;
type = "blob-ext";
size = <0x1000>;
};
#endif
nxp-imx8mimage {
filename = "u-boot-spl-mkimage.bin";
nxp,boot-from = "sd";
nxp,rom-version = <1>;
nxp,loader-address = <CONFIG_SPL_TEXT_BASE>;
args; /* Needed by mkimage etype superclass */
section {
align = <4>; align = <4>;
align-size = <4>; align-size = <4>;
filename = "u-boot-spl-ddr.bin"; filename = "u-boot-spl-ddr.bin";
@ -78,21 +96,7 @@
type = "blob-ext"; type = "blob-ext";
}; };
}; };
spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
blob {
filename = "u-boot-spl-ddr.bin";
}; };
};
};
itb {
filename = "u-boot.itb";
fit { fit {
description = "Configuration to load ATF before U-Boot"; description = "Configuration to load ATF before U-Boot";
@ -101,6 +105,11 @@
#endif #endif
fit,fdt-list = "of-list"; fit,fdt-list = "of-list";
#address-cells = <1>; #address-cells = <1>;
#ifdef CONFIG_FSPI_CONF_HEADER
offset = <0x58C00>;
#else
offset = <0x57c00>;
#endif
images { images {
uboot { uboot {
@ -166,43 +175,6 @@
}; };
}; };
}; };
imx-boot {
filename = "flash.bin";
pad-byte = <0x00>;
#ifdef CONFIG_FSPI_CONF_HEADER
fspi_conf_block {
filename = CONFIG_FSPI_CONF_FILE;
type = "blob-ext";
size = <0x1000>;
};
spl {
filename = "spl.bin";
offset = <0x1000>;
type = "blob-ext";
};
binman_uboot: uboot {
filename = "u-boot.itb";
offset = <0x58C00>;
type = "blob-ext";
};
#else
spl {
filename = "spl.bin";
offset = <0x0>;
type = "blob-ext";
};
binman_uboot: uboot {
filename = "u-boot.itb";
offset = <0x57c00>;
type = "blob-ext";
};
#endif
};
}; };
&clk { &clk {

View file

@ -35,9 +35,13 @@
bootph-pre-ram; bootph-pre-ram;
}; };
&binman_uboot { &binman {
section {
fit {
offset = <0x5fc00>; offset = <0x5fc00>;
}; };
};
};
&gpio1 { &gpio1 {
bootph-pre-ram; bootph-pre-ram;

View file

@ -5,7 +5,6 @@
/ { / {
binman: binman { binman: binman {
multiple-images;
}; };
#ifdef CONFIG_OPTEE #ifdef CONFIG_OPTEE
@ -92,7 +91,26 @@
}; };
&binman { &binman {
u-boot-spl-ddr { filename = "flash.bin";
section {
pad-byte = <0x00>;
#ifdef CONFIG_FSPI_CONF_HEADER
fspi_conf_block {
filename = CONFIG_FSPI_CONF_FILE;
type = "blob-ext";
offset = <0x400>;
};
#endif
nxp-imx8mimage {
filename = "u-boot-spl-mkimage.bin";
nxp,boot-from = "sd";
nxp,rom-version = <2>;
nxp,loader-address = <CONFIG_SPL_TEXT_BASE>;
args; /* Needed by mkimage etype superclass */
section {
filename = "u-boot-spl-ddr.bin"; filename = "u-boot-spl-ddr.bin";
pad-byte = <0xff>; pad-byte = <0xff>;
align-size = <4>; align-size = <4>;
@ -149,21 +167,7 @@
}; };
#endif #endif
}; };
spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000";
blob {
filename = "u-boot-spl-ddr.bin";
}; };
};
};
itb {
filename = "u-boot.itb";
fit { fit {
description = "Configuration to load ATF before U-Boot"; description = "Configuration to load ATF before U-Boot";
@ -172,6 +176,11 @@
#endif #endif
fit,fdt-list = "of-list"; fit,fdt-list = "of-list";
#address-cells = <1>; #address-cells = <1>;
#ifdef CONFIG_FSPI_CONF_HEADER
offset = <0x59000>;
#else
offset = <0x58000>;
#endif
images { images {
uboot { uboot {
@ -237,42 +246,4 @@
}; };
}; };
}; };
imx-boot {
filename = "flash.bin";
pad-byte = <0x00>;
#ifdef CONFIG_FSPI_CONF_HEADER
fspi_conf_block {
filename = CONFIG_FSPI_CONF_FILE;
type = "blob-ext";
offset = <0x400>;
};
spl {
filename = "spl.bin";
offset = <0x1000>;
type = "blob-ext";
};
binman_uboot: uboot {
filename = "u-boot.itb";
offset = <0x59000>;
type = "blob-ext";
};
#else
spl {
offset = <0x0>;
filename = "spl.bin";
type = "blob-ext";
};
binman_uboot: uboot {
offset = <0x58000>;
filename = "u-boot.itb";
type = "blob-ext";
};
#endif
};
}; };

View file

@ -136,7 +136,7 @@
}; };
&binman { &binman {
itb { section {
fit { fit {
images { images {
fdt-dto-imx8mp-dhcom-som-overlay-eth1xfast { fdt-dto-imx8mp-dhcom-som-overlay-eth1xfast {

View file

@ -136,7 +136,7 @@
}; };
&binman { &binman {
itb { section {
fit { fit {
images { images {
fip { fip {

View file

@ -6,7 +6,6 @@
/ { / {
binman: binman { binman: binman {
multiple-images;
}; };
#ifdef CONFIG_OPTEE #ifdef CONFIG_OPTEE
@ -83,7 +82,18 @@
#endif #endif
&binman { &binman {
u-boot-spl-ddr { filename = "flash.bin";
section {
pad-byte = <0x00>;
nxp-imx8mimage {
filename = "u-boot-spl-mkimage.bin";
nxp,boot-from = "sd";
nxp,rom-version = <2>;
nxp,loader-address = <CONFIG_SPL_TEXT_BASE>;
args; /* Needed by mkimage etype superclass */
section {
filename = "u-boot-spl-ddr.bin"; filename = "u-boot-spl-ddr.bin";
pad-byte = <0xff>; pad-byte = <0xff>;
align-size = <4>; align-size = <4>;
@ -117,21 +127,7 @@
align-end = <4>; align-end = <4>;
}; };
}; };
spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x920000";
blob {
filename = "u-boot-spl-ddr.bin";
}; };
};
};
itb {
filename = "u-boot.itb";
fit { fit {
description = "Configuration to load ATF before U-Boot"; description = "Configuration to load ATF before U-Boot";
@ -140,6 +136,7 @@
#endif #endif
fit,fdt-list = "of-list"; fit,fdt-list = "of-list";
#address-cells = <1>; #address-cells = <1>;
offset = <0x58000>;
images { images {
uboot { uboot {
@ -195,21 +192,4 @@
}; };
}; };
}; };
imx-boot {
filename = "flash.bin";
pad-byte = <0x00>;
spl {
filename = "spl.bin";
offset = <0x0>;
type = "blob-ext";
};
binman_uboot: uboot {
filename = "u-boot.itb";
offset = <0x58000>;
type = "blob-ext";
};
};
}; };

View file

@ -11,14 +11,13 @@
}; };
&binman { &binman {
/delete-node/ signed-hdmi; section {
nxp-imx8mimage {
signed-hdmi { section {
filename = "signed_hdmi.bin"; signed-hdmi-imx8m {
signed-dp-imx8m {
filename = "signed_dp_imx8m.bin"; filename = "signed_dp_imx8m.bin";
type = "blob-ext"; };
};
}; };
}; };
}; };

View file

@ -5,7 +5,6 @@
/ { / {
binman: binman { binman: binman {
multiple-images;
}; };
}; };
@ -35,7 +34,18 @@
}; };
&binman { &binman {
u-boot-spl-ddr { filename = "flash.bin";
section {
pad-byte = <0x00>;
nxp-imx8mimage {
filename = "u-boot-spl-mkimage.bin";
nxp,boot-from = "sd";
nxp,rom-version = <1>;
nxp,loader-address = <CONFIG_SPL_TEXT_BASE>;
args; /* Needed by mkimage etype superclass */
section {
align = <4>; align = <4>;
align-size = <4>; align-size = <4>;
filename = "u-boot-spl-ddr.bin"; filename = "u-boot-spl-ddr.bin";
@ -69,31 +79,13 @@
align-end = <4>; align-end = <4>;
type = "blob-ext"; type = "blob-ext";
}; };
};
signed-hdmi {
filename = "signed_hdmi.bin";
signed-hdmi-imx8m { signed-hdmi-imx8m {
filename = "signed_hdmi_imx8m.bin"; filename = "signed_hdmi_imx8m.bin";
type = "blob-ext"; type = "blob-ext";
}; };
}; };
spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
blob {
filename = "u-boot-spl-ddr.bin";
}; };
};
};
itb {
filename = "u-boot.itb";
fit { fit {
description = "Configuration to load ATF before U-Boot"; description = "Configuration to load ATF before U-Boot";
@ -158,21 +150,4 @@
}; };
}; };
}; };
imx-boot {
filename = "flash.bin";
pad-byte = <0x00>;
spl {
filename = "spl.bin";
offset = <0x0>;
type = "blob-ext";
};
binman_uboot: uboot {
filename = "u-boot.itb";
offset = <0x57c00>;
type = "blob-ext";
};
};
}; };