[PATCH v2 0/8] imx8: switch missing boards to binman

This patchsets switches the remaining imx8 boards to binman.
Oliver Graute (8): imx: imx8qm-rom7720: switch to binman imx: imx8qm: cgtqmx8: switch to binman imx: imx8qxp: imx8qxp_mek switch to binman imx: imx8qm: imx8qm_mek switch to binman imx: imx8qxp: giedi switch to binman imx: imx8qxp: deneb switch to binman imx: imx8x: colibri: switch to binman imx: imx8: apalis: switch to binman
arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi | 2 + arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi | 2 + arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi | 2 + arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi | 2 + arch/arm/dts/imx8qm-cgtqmx8.dts | 1 + arch/arm/dts/imx8qm-rom7720-a1.dts | 1 + arch/arm/dts/imx8qm-u-boot.dtsi | 135 ++++++++++++++++++ arch/arm/dts/imx8qxp-capricorn-u-boot.dtsi | 2 + arch/arm/dts/imx8qxp-u-boot.dtsi | 133 +++++++++++++++++ arch/arm/mach-imx/imx8/Kconfig | 8 ++ .../advantech/imx8qm_rom7720_a1/imximage.cfg | 4 +- board/congatec/cgtqmx8/imximage.cfg | 4 +- board/freescale/imx8qm_mek/README | 2 +- board/freescale/imx8qxp_mek/imximage.cfg | 3 +- board/siemens/capricorn/imximage.cfg | 2 +- configs/apalis-imx8_defconfig | 1 + configs/cgtqmx8_defconfig | 4 +- configs/colibri-imx8x_defconfig | 1 + configs/deneb_defconfig | 2 + configs/giedi_defconfig | 2 + configs/imx8qm_mek_defconfig | 2 + configs/imx8qm_rom7720_a1_4G_defconfig | 3 +- configs/imx8qxp_mek_defconfig | 2 + doc/board/advantech/imx8qm-rom7720-a1.rst | 3 +- doc/board/congatec/cgtqmx8.rst | 3 +- doc/board/nxp/imx8qxp_mek.rst | 2 +- 26 files changed, 313 insertions(+), 15 deletions(-) create mode 100644 arch/arm/dts/imx8qm-u-boot.dtsi create mode 100644 arch/arm/dts/imx8qxp-u-boot.dtsi

Switch to use binman to pack images
Signed-off-by: Oliver Graute oliver.graute@kococonnector.com --- Changes for v5: - renamed ftd to @fdt-SEQ
Changes for v4 - remove hardcoded dtb filename - added CONFIG_FIT_EXTERNAL_OFFSET
Changes for v3 - just rebased to master
Changes for v2 - just rebased to master
arch/arm/dts/imx8qm-rom7720-a1.dts | 1 + arch/arm/dts/imx8qm-u-boot.dtsi | 133 ++++++++++++++++++ arch/arm/mach-imx/imx8/Kconfig | 1 + .../advantech/imx8qm_rom7720_a1/imximage.cfg | 4 +- configs/imx8qm_rom7720_a1_4G_defconfig | 3 +- doc/board/advantech/imx8qm-rom7720-a1.rst | 3 +- 6 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 arch/arm/dts/imx8qm-u-boot.dtsi
diff --git a/arch/arm/dts/imx8qm-rom7720-a1.dts b/arch/arm/dts/imx8qm-rom7720-a1.dts index d1f2fff869..332d441c6d 100644 --- a/arch/arm/dts/imx8qm-rom7720-a1.dts +++ b/arch/arm/dts/imx8qm-rom7720-a1.dts @@ -10,6 +10,7 @@ /memreserve/ 0x80000000 0x00020000;
#include "fsl-imx8qm.dtsi" +#include "imx8qm-u-boot.dtsi"
/ { model = "Advantech iMX8QM Qseven series"; diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi new file mode 100644 index 0000000000..9b382f4d11 --- /dev/null +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 NXP + */ + +/ { + binman: binman { + multiple-images; + }; +}; + +&binman { + u-boot-spl-ddr { + align = <4>; + align-size = <4>; + filename = "u-boot-spl-ddr.bin"; + pad-byte = <0xff>; + + u-boot-spl { + align-end = <4>; + filename = "u-boot-spl.bin"; + }; + }; + + spl { + filename = "spl.bin"; + + mkimage { + args = "-n spl/u-boot-spl.cfgout -T imx8image -e 0x100000"; + + blob { + filename = "u-boot-spl-ddr.bin"; + }; + }; + }; + + itb { + filename = "u-boot.itb"; + + fit { + description = "Configuration to load ATF before U-Boot"; + fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; + fit,fdt-list = "of-list"; + #address-cells = <1>; + + images { + uboot { + arch = "arm64"; + compression = "none"; + description = "U-Boot (64-bit)"; + load = <CONFIG_SYS_TEXT_BASE>; + type = "standalone"; + + uboot-blob { + filename = "u-boot-nodtb.bin"; + type = "blob-ext"; + }; + }; + + atf { + arch = "arm64"; + compression = "none"; + description = "ARM Trusted Firmware"; + entry = <0x00910000>; + load = <0x00091000>; + type = "firmware"; + + atf-blob { + filename = "bl31.bin"; + type = "atf-bl31"; + }; + }; + + scfw { + arch = "arm64"; + compression = "none"; + description = "System Controler Firmware"; + type = "firmware"; + + scfw_blob { + filename = "mx8qm-val-scfw-tcm.bin"; + type = "blob-ext"; + }; + }; + + seco { + arch = "arm64"; + compression = "none"; + description = "Seco Firmware"; + type = "firmware"; + + seco_blob { + filename = "mx8qm-ahab-container.img"; + type = "blob-ext"; + }; + }; + + @fdt-SEQ { + compression = "none"; + description = "NAME"; + type = "flat_dt"; + + uboot-fdt-blob { + filename = "u-boot.dtb"; + type = "blob-ext"; + }; + }; + }; + + configurations { + default = "@config-DEFAULT-SEQ"; + + binman_configuration: @config-SEQ { + description = "NAME"; + fdt = "fdt-SEQ"; + firmware = "uboot"; + loadables = "atf"; + }; + }; + }; + }; + + imx-boot { + filename = "flash.bin"; + pad-byte = <0x00>; + + spl { + filename = "spl.bin"; + offset = <0x0>; + type = "blob-ext"; + }; + }; +}; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index abb03340d8..71abbb33ea 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -82,6 +82,7 @@ config TARGET_CONGA_QMX8
config TARGET_IMX8QM_ROM7720_A1 bool "Support i.MX8QM ROM-7720-A1" + select BINMAN select BOARD_LATE_INIT select SUPPORT_SPL select IMX8QM diff --git a/board/advantech/imx8qm_rom7720_a1/imximage.cfg b/board/advantech/imx8qm_rom7720_a1/imximage.cfg index 5ecde0c530..43035088e3 100644 --- a/board/advantech/imx8qm_rom7720_a1/imximage.cfg +++ b/board/advantech/imx8qm_rom7720_a1/imximage.cfg @@ -4,8 +4,8 @@ */
-/* Boot from SD, sector size 0x400 */ -BOOT_FROM SD 0x400 +BOOT_FROM sd + /* SoC type IMX8QM */ SOC_TYPE IMX8QM /* Append seco container image */ diff --git a/configs/imx8qm_rom7720_a1_4G_defconfig b/configs/imx8qm_rom7720_a1_4G_defconfig index 3b099761a9..4b7ed6df01 100644 --- a/configs/imx8qm_rom7720_a1_4G_defconfig +++ b/configs/imx8qm_rom7720_a1_4G_defconfig @@ -20,8 +20,9 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_SPL_LOAD_FIT=y -CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" +# CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi" diff --git a/doc/board/advantech/imx8qm-rom7720-a1.rst b/doc/board/advantech/imx8qm-rom7720-a1.rst index bd4be1dbeb..953cf01fde 100644 --- a/doc/board/advantech/imx8qm-rom7720-a1.rst +++ b/doc/board/advantech/imx8qm-rom7720-a1.rst @@ -57,8 +57,7 @@ Build U-Boot $ export ATF_LOAD_ADDR=0x80000000 $ export BL33_LOAD_ADDR=0x80020000 $ make imx8qm_rom7720_a1_4G_defconfig - $ make u-boot.bin - $ make flash.bin + $ make
Flash the binary into the SD card ---------------------------------

Switch to use binman to pack images Signed-off-by: Oliver Graute oliver.graute@kococonnector.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Switch to use binman to pack images
Signed-off-by: Oliver Graute oliver.graute@kococonnector.com Reviewed-by: Fabio Estevam festevam@denx.de Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Peng Fan peng.fan@nxp.com
--- Changes for v6 - added CONFIG_SPL_BINMAN_UBOOT_SYMBOLS is not set
Changes for v5 - added CONFIG_FIT_EXTERNAL_OFFSET
Changes for v4 - rebased on master
Changes for v3 -added Reviewed-by - rebased on master
arch/arm/dts/imx8qm-cgtqmx8.dts | 1 + arch/arm/mach-imx/imx8/Kconfig | 1 + board/congatec/cgtqmx8/imximage.cfg | 4 ++-- configs/cgtqmx8_defconfig | 4 +++- doc/board/congatec/cgtqmx8.rst | 3 +-- 5 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/arm/dts/imx8qm-cgtqmx8.dts b/arch/arm/dts/imx8qm-cgtqmx8.dts index 555c357f6f..919d00644f 100644 --- a/arch/arm/dts/imx8qm-cgtqmx8.dts +++ b/arch/arm/dts/imx8qm-cgtqmx8.dts @@ -12,6 +12,7 @@ /memreserve/ 0x80000000 0x00020000;
#include "fsl-imx8qm.dtsi" +#include "imx8qm-u-boot.dtsi"
/ { model = "Congatec QMX8 Qseven series"; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index a7e3af57dc..d423cf8563 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -76,6 +76,7 @@ config TARGET_IMX8QM_MEK
config TARGET_CONGA_QMX8 bool "Support congatec conga-QMX8 board" + select BINMAN select BOARD_LATE_INIT select SUPPORT_SPL select IMX8QM diff --git a/board/congatec/cgtqmx8/imximage.cfg b/board/congatec/cgtqmx8/imximage.cfg index 5ecde0c530..43035088e3 100644 --- a/board/congatec/cgtqmx8/imximage.cfg +++ b/board/congatec/cgtqmx8/imximage.cfg @@ -4,8 +4,8 @@ */
-/* Boot from SD, sector size 0x400 */ -BOOT_FROM SD 0x400 +BOOT_FROM sd + /* SoC type IMX8QM */ SOC_TYPE IMX8QM /* Append seco container image */ diff --git a/configs/cgtqmx8_defconfig b/configs/cgtqmx8_defconfig index ddc65a06b9..4d1dfe4212 100644 --- a/configs/cgtqmx8_defconfig +++ b/configs/cgtqmx8_defconfig @@ -20,8 +20,10 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_SPL_LOAD_FIT=y -CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" +# CONFIG_USE_SPL_FIT_GENERATOR is not set +# CONFIG_SPL_BINMAN_UBOOT_SYMBOLS is not set CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTCOMMAND=y diff --git a/doc/board/congatec/cgtqmx8.rst b/doc/board/congatec/cgtqmx8.rst index bccdef2f16..16711a844d 100644 --- a/doc/board/congatec/cgtqmx8.rst +++ b/doc/board/congatec/cgtqmx8.rst @@ -57,8 +57,7 @@ Build U-Boot $ export ATF_LOAD_ADDR=0x80000000 $ export BL33_LOAD_ADDR=0x80020000 $ make cgtqmx8_defconfig - $ make u-boot.bin - $ make flash.bin + $ make
Flash the binary into the SD card ---------------------------------

Switch to use binman to pack images Signed-off-by: Oliver Graute oliver.graute@kococonnector.com Reviewed-by: Fabio Estevam festevam@denx.de Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Peng Fan peng.fan@nxp.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Switch to use binman pack images
Signed-off-by: Oliver Graute oliver.graute@kococonnector.com Reviewed-by: Peng Fan peng.fan@nxp.com --- Changes v2: - use common imx8qxp-u-boot.dtsi
arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi | 2 + arch/arm/dts/imx8qxp-u-boot.dtsi | 133 +++++++++++++++++++++++ arch/arm/mach-imx/imx8/Kconfig | 1 + board/freescale/imx8qxp_mek/imximage.cfg | 3 +- configs/imx8qxp_mek_defconfig | 2 + doc/board/nxp/imx8qxp_mek.rst | 2 +- 6 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/imx8qxp-u-boot.dtsi
diff --git a/arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi b/arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi index ae037c7550..2218e3ea74 100644 --- a/arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi +++ b/arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi @@ -3,6 +3,8 @@ * Copyright 2018, 2021 NXP */
+#include "imx8qxp-u-boot.dtsi" + &{/imx8qx-pm} {
u-boot,dm-spl; diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi new file mode 100644 index 0000000000..01183f8ade --- /dev/null +++ b/arch/arm/dts/imx8qxp-u-boot.dtsi @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018, 2021 NXP + */ + +/ { + binman: binman { + multiple-images; + }; +}; + +&binman { +#ifdef CONFIG_SPL + u-boot-spl-ddr { + align = <4>; + align-size = <4>; + filename = "u-boot-spl-ddr.bin"; + pad-byte = <0xff>; + + u-boot-spl { + align-end = <4>; + filename = "u-boot-spl.bin"; + }; + }; + + spl { + filename = "spl.bin"; + + mkimage { + args = "-n spl/u-boot-spl.cfgout -T imx8image -e 0x100000"; + + blob { + filename = "u-boot-spl-ddr.bin"; + }; + }; + }; +#endif + + itb { + filename = "u-boot.itb"; + + fit { + description = "Configuration to load ATF before U-Boot"; + fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; + fit,fdt-list = "of-list"; + #address-cells = <1>; + + images { + uboot { + arch = "arm64"; + compression = "none"; + description = "U-Boot (64-bit)"; + load = <CONFIG_SYS_TEXT_BASE>; + type = "standalone"; + + uboot-blob { + filename = "u-boot-nodtb.bin"; + type = "blob-ext"; + }; + }; + + atf { + arch = "arm64"; + compression = "none"; + description = "ARM Trusted Firmware"; + entry = <0x00910000>; + load = <0x00091000>; + type = "firmware"; + + atf-blob { + filename = "bl31.bin"; + type = "atf-bl31"; + }; + }; + + scfw { + arch = "arm64"; + compression = "none"; + description = "System Controler Firmware"; + type = "firmware"; + + scfw_blob { + filename = "mx8qx-mek-scfw-tcm.bin"; + type = "blob-ext"; + }; + }; + + seco { + arch = "arm64"; + compression = "none"; + description = "Seco Firmware"; + type = "firmware"; + + seco_blob { + filename = "mx8qxc0-ahab-container.img"; + type = "blob-ext"; + }; + }; + + fdt { + type = "flat_dt"; + compression = "none"; + + uboot-fdt-blob { + filename = "u-boot.dtb"; + type = "blob-ext"; + }; + }; + }; + + configurations { + default = "conf"; + + conf { + fdt = "fdt"; + firmware = "uboot"; + loadables = "atf"; + }; + }; + }; + }; + + imx-boot { + filename = "flash.bin"; + pad-byte = <0x00>; + + spl { + filename = "spl.bin"; + offset = <0x0>; + type = "blob-ext"; + }; + }; +}; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index d423cf8563..23a7fcf361 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -90,6 +90,7 @@ config TARGET_IMX8QM_ROM7720_A1
config TARGET_IMX8QXP_MEK bool "Support i.MX8QXP MEK board" + select BINMAN select BOARD_LATE_INIT select IMX8QXP select FSL_CAAM diff --git a/board/freescale/imx8qxp_mek/imximage.cfg b/board/freescale/imx8qxp_mek/imximage.cfg index 89a4736ab7..88d6955a9e 100644 --- a/board/freescale/imx8qxp_mek/imximage.cfg +++ b/board/freescale/imx8qxp_mek/imximage.cfg @@ -7,8 +7,7 @@ */
-/* Boot from SD, sector size 0x400 */ -BOOT_FROM SD 0x400 +BOOT_FROM sd /* SoC type IMX8QX */ SOC_TYPE IMX8QX /* Append seco container image */ diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig index 73600c5a8c..0e22f13c7f 100644 --- a/configs/imx8qxp_mek_defconfig +++ b/configs/imx8qxp_mek_defconfig @@ -23,6 +23,8 @@ CONFIG_SYS_LOAD_ADDR=0x80280000 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y +CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOOTDELAY=3 diff --git a/doc/board/nxp/imx8qxp_mek.rst b/doc/board/nxp/imx8qxp_mek.rst index 215627cfa6..708db1952e 100644 --- a/doc/board/nxp/imx8qxp_mek.rst +++ b/doc/board/nxp/imx8qxp_mek.rst @@ -50,7 +50,7 @@ Build U-Boot .. code-block:: bash
$ make imx8qxp_mek_defconfig - $ make flash.bin + $ make
Flash the binary into the SD card ---------------------------------

Switch to use binman pack images Signed-off-by: Oliver Graute oliver.graute@kococonnector.com Reviewed-by: Peng Fan peng.fan@nxp.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Switch to use binman to pack images
Signed-off-by: Oliver Graute oliver.graute@kococonnector.com --- arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi | 2 ++ arch/arm/mach-imx/imx8/Kconfig | 1 + board/freescale/imx8qm_mek/README | 2 +- configs/imx8qm_mek_defconfig | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi b/arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi index a95209e141..eefdccf992 100644 --- a/arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi +++ b/arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi @@ -3,6 +3,8 @@ * Copyright 2018, 2021 NXP */
+#include "imx8qm-u-boot.dtsi" + &{/imx8qm-pm} {
u-boot,dm-spl; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 23a7fcf361..4ccbabf506 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -68,6 +68,7 @@ config TARGET_GIEDI
config TARGET_IMX8QM_MEK bool "Support i.MX8QM MEK board" + select BINMAN select BOARD_LATE_INIT select IMX8QM select FSL_CAAM diff --git a/board/freescale/imx8qm_mek/README b/board/freescale/imx8qm_mek/README index 570ed7e210..b1a4c6cc82 100644 --- a/board/freescale/imx8qm_mek/README +++ b/board/freescale/imx8qm_mek/README @@ -40,7 +40,7 @@ And copy the following firmwares to U-Boot folder: Build U-Boot ============ $ make imx8qm_mek_defconfig -$ make flash.bin +$ make
Flash the binary into the SD card ================================= diff --git a/configs/imx8qm_mek_defconfig b/configs/imx8qm_mek_defconfig index b973b809be..25b51cf1ec 100644 --- a/configs/imx8qm_mek_defconfig +++ b/configs/imx8qm_mek_defconfig @@ -23,6 +23,8 @@ CONFIG_SYS_LOAD_ADDR=0x80280000 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y +CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOOTDELAY=3

Switch to use binman to pack images Signed-off-by: Oliver Graute oliver.graute@kococonnector.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Switch to use binman to pack images
Signed-off-by: Oliver Graute oliver.graute@kococonnector.com --- Changes v2: use common imx8qxp-u-boot.dtsi
arch/arm/dts/imx8qxp-capricorn-u-boot.dtsi | 2 ++ arch/arm/mach-imx/imx8/Kconfig | 1 + board/siemens/capricorn/imximage.cfg | 2 +- configs/giedi_defconfig | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/imx8qxp-capricorn-u-boot.dtsi b/arch/arm/dts/imx8qxp-capricorn-u-boot.dtsi index 1cf58fc3f9..37bdc26cd3 100644 --- a/arch/arm/dts/imx8qxp-capricorn-u-boot.dtsi +++ b/arch/arm/dts/imx8qxp-capricorn-u-boot.dtsi @@ -3,6 +3,8 @@ * Copyright 2019 Siemens AG */
+#include "imx8qxp-u-boot.dtsi" + &{/imx8qx-pm} {
u-boot,dm-spl; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 4ccbabf506..63d99ea23e 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -62,6 +62,7 @@ config TARGET_DENEB
config TARGET_GIEDI bool "Support i.MX8QXP Capricorn Giedi board" + select BINMAN select BOARD_LATE_INIT select FACTORYSET select IMX8QXP diff --git a/board/siemens/capricorn/imximage.cfg b/board/siemens/capricorn/imximage.cfg index fa871bac21..4350e2967c 100644 --- a/board/siemens/capricorn/imximage.cfg +++ b/board/siemens/capricorn/imximage.cfg @@ -8,7 +8,7 @@
/* Boot from SD, sector size 0x400 */ -BOOT_FROM SD 0x400 +BOOT_FROM sd /* SoC type IMX8QX */ SOC_TYPE IMX8QX /* Append seco container image */ diff --git a/configs/giedi_defconfig b/configs/giedi_defconfig index ab7fa51172..fdc6b0b2b3 100644 --- a/configs/giedi_defconfig +++ b/configs/giedi_defconfig @@ -26,6 +26,8 @@ CONFIG_SYS_LOAD_ADDR=0x80280000 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y +CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOOTDELAY=3

Switch to use binman to pack images Signed-off-by: Oliver Graute oliver.graute@kococonnector.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Signed-off-by: Oliver Graute oliver.graute@kococonnector.com Reviewed-by: Peng Fan peng.fan@nxp.com --- arch/arm/mach-imx/imx8/Kconfig | 1 + configs/deneb_defconfig | 2 ++ 2 files changed, 3 insertions(+)
diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 63d99ea23e..018b87b85b 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -56,6 +56,7 @@ config TARGET_COLIBRI_IMX8X
config TARGET_DENEB bool "Support i.MX8QXP Capricorn Deneb board" + select BINMAN select BOARD_LATE_INIT select FACTORYSET select IMX8QXP diff --git a/configs/deneb_defconfig b/configs/deneb_defconfig index 2497b5d922..22efc998f6 100644 --- a/configs/deneb_defconfig +++ b/configs/deneb_defconfig @@ -26,6 +26,8 @@ CONFIG_SYS_LOAD_ADDR=0x80280000 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y +CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOOTDELAY=3

Signed-off-by: Oliver Graute oliver.graute@kococonnector.com Reviewed-by: Peng Fan peng.fan@nxp.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Switch to use binman to pack images
Signed-off-by: Oliver Graute oliver.graute@kococonnector.com ---
Changes for v2 - use common imx8qxp-u-boot.dtsi - added ifdef CONFIG_SPL to imx8qm-u-boot.dtsi
arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi | 2 ++ arch/arm/mach-imx/imx8/Kconfig | 1 + configs/colibri-imx8x_defconfig | 1 + 4 files changed, 6 insertions(+)
diff --git a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi index 322429a98a..91e2944781 100644 --- a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi +++ b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi @@ -3,6 +3,8 @@ * Copyright 2019 Toradex AG */
+#include "imx8qxp-u-boot.dtsi" + &{/imx8qx-pm} {
u-boot,dm-pre-proper; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 018b87b85b..37d12d1895 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -51,6 +51,7 @@ config TARGET_APALIS_IMX8
config TARGET_COLIBRI_IMX8X bool "Support Colibri iMX8X module" + select BINMAN select BOARD_LATE_INIT select IMX8QXP
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index 1a207f99d0..2697775b44 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -17,6 +17,7 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_FIT_VERBOSE=y CONFIG_LOG=y # CONFIG_DISPLAY_BOARDINFO is not set

Switch to use binman to pack images Signed-off-by: Oliver Graute oliver.graute@kococonnector.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Switch to use binman to pack images
Signed-off-by: Oliver Graute oliver.graute@kococonnector.com --- Changes for v2 - use common imx8qm-u-boot.dtsi - guard SPL nodes with CONFIG_SPL
arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi | 2 ++ arch/arm/dts/imx8qm-u-boot.dtsi | 2 ++ arch/arm/mach-imx/imx8/Kconfig | 1 + configs/apalis-imx8_defconfig | 1 + 4 files changed, 6 insertions(+)
diff --git a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi index 956d724979..8fd0e33d2b 100644 --- a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi +++ b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi @@ -3,6 +3,8 @@ * Copyright 2019 Toradex AG */
+#include "imx8qm-u-boot.dtsi" + &mu { u-boot,dm-pre-proper; }; diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index f3fc90c9bb..3507489a81 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -10,6 +10,7 @@ };
&binman { +#ifdef CONFIG_SPL u-boot-spl-ddr { align = <4>; align-size = <4>; @@ -33,6 +34,7 @@ }; }; }; +#endif
itb { filename = "u-boot.itb"; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 37d12d1895..91bd888308 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -46,6 +46,7 @@ choice
config TARGET_APALIS_IMX8 bool "Support Apalis iMX8 module" + select BINMAN select BOARD_LATE_INIT select IMX8QM
diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig index 32e105a557..0c331b62cb 100644 --- a/configs/apalis-imx8_defconfig +++ b/configs/apalis-imx8_defconfig @@ -17,6 +17,7 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_FIT_VERBOSE=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_LOG=y

Hi Oliver
Thanks for working on this.
On Fri, 2022-11-04 at 16:03 +0100, Oliver Graute wrote:
Switch to use binman to pack images
Signed-off-by: Oliver Graute oliver.graute@kococonnector.com
Changes for v2 - use common imx8qm-u-boot.dtsi - guard SPL nodes with CONFIG_SPL
I don't think it is that simple. Even after guarding them SPL nodes the flash.bin one still references them, not? And yes, so far we never used SPL for them 8/8X as that honestly does not really make much sense given the SCFW does the actual RAM initialisation. Anyway, I am not very clear on how/what exactly that all means now.
Another topic is that flash.bin is now just the SPL whereas previously u-boot-dtb.imx was the entire thing. But again, that could have been related to us not using SPL.
arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi | 2 ++ arch/arm/dts/imx8qm-u-boot.dtsi | 2 ++ arch/arm/mach-imx/imx8/Kconfig | 1 + configs/apalis-imx8_defconfig | 1 + 4 files changed, 6 insertions(+)
diff --git a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi index 956d724979..8fd0e33d2b 100644 --- a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi +++ b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi @@ -3,6 +3,8 @@ * Copyright 2019 Toradex AG */ +#include "imx8qm-u-boot.dtsi"
&mu { u-boot,dm-pre-proper; }; diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index f3fc90c9bb..3507489a81 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -10,6 +10,7 @@ }; &binman { +#ifdef CONFIG_SPL u-boot-spl-ddr { align = <4>; align-size = <4>; @@ -33,6 +34,7 @@ }; }; }; +#endif itb { filename = "u-boot.itb"; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 37d12d1895..91bd888308 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -46,6 +46,7 @@ choice config TARGET_APALIS_IMX8 bool "Support Apalis iMX8 module" + select BINMAN select BOARD_LATE_INIT select IMX8QM diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig index 32e105a557..0c331b62cb 100644 --- a/configs/apalis-imx8_defconfig +++ b/configs/apalis-imx8_defconfig @@ -17,6 +17,7 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000
Also not quite sure what exactly that is now.
CONFIG_FIT_VERBOSE=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_LOG=y
Cheers
Marcel

On 09/11/22, Marcel Ziswiler wrote:
Hi Oliver
Thanks for working on this.
On Fri, 2022-11-04 at 16:03 +0100, Oliver Graute wrote:
Switch to use binman to pack images
Signed-off-by: Oliver Graute oliver.graute@kococonnector.com
Changes for v2 - use common imx8qm-u-boot.dtsi - guard SPL nodes with CONFIG_SPL
I don't think it is that simple. Even after guarding them SPL nodes the flash.bin one still references them, not? And yes, so far we never used SPL for them 8/8X as that honestly does not really make much sense given the SCFW does the actual RAM initialisation. Anyway, I am not very clear on how/what exactly that all means now.
On imx8qm-rom7720 we use the SCFW for RAM initalisation too but still use SPL.
Another topic is that flash.bin is now just the SPL whereas previously u-boot-dtb.imx was the entire thing. But again, that could have been related to us not using SPL.
yes, thats right, if I guard the SPL subnode in imx-boot node I get a 0 byte flash.bin.
At the moment I don't know the best way here. I would be grateful for some hints here.
CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000
Also not quite sure what exactly that is now.
its introduced by commit 3814fcba12323b9f30f39ee5455f3f9a7e955c64
Best regards,
Oliver

Switch to use binman to pack images Signed-off-by: Oliver Graute oliver.graute@kococonnector.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

On Sat, 2022-11-12 at 17:26 +0100, sbabic@denx.de wrote:
Switch to use binman to pack images Signed-off-by: Oliver Graute oliver.graute@kococonnector.com
Applied to u-boot-imx, master, thanks !
Quick question: Why exactly did this get applied? This really does not work at all!
Best regards, Stefano Babic

Hi Marcel,
On 15.11.22 11:05, Marcel Ziswiler wrote:
On Sat, 2022-11-12 at 17:26 +0100, sbabic@denx.de wrote:
Switch to use binman to pack images Signed-off-by: Oliver Graute oliver.graute@kococonnector.com
Applied to u-boot-imx, master, thanks !
Quick question: Why exactly did this get applied? This really does not work at all!
Mmhhh...I have seen the series was , and yes, I have seen you planned to test it. It is my fault, I have not disable this single patch from the serier when I applied.
I will revert it.
Stefano
Best regards, Stefano Babic

Hi Oliver,
On Fri, Nov 4, 2022 at 12:19 PM Oliver Graute oliver.graute@kococonnector.com wrote:
This patchsets switches the remaining imx8 boards to binman.
Oliver Graute (8): imx: imx8qm-rom7720: switch to binman imx: imx8qm: cgtqmx8: switch to binman imx: imx8qxp: imx8qxp_mek switch to binman imx: imx8qm: imx8qm_mek switch to binman imx: imx8qxp: giedi switch to binman imx: imx8qxp: deneb switch to binman imx: imx8x: colibri: switch to binman imx: imx8: apalis: switch to binman
Great work, thanks. This series looks good to me:
Reviewed-by: Fabio Estevam festevam@denx.de
It would be nice to get some Tested-by from the board maintainers.

Hi Fabio, Oliver,
On 04.11.22 17:31, Fabio Estevam wrote:
Hi Oliver,
On Fri, Nov 4, 2022 at 12:19 PM Oliver Graute oliver.graute@kococonnector.com wrote:
This patchsets switches the remaining imx8 boards to binman.
Oliver Graute (8): imx: imx8qm-rom7720: switch to binman imx: imx8qm: cgtqmx8: switch to binman imx: imx8qxp: imx8qxp_mek switch to binman imx: imx8qm: imx8qm_mek switch to binman imx: imx8qxp: giedi switch to binman imx: imx8qxp: deneb switch to binman imx: imx8x: colibri: switch to binman imx: imx8: apalis: switch to binman
Great work, thanks. This series looks good to me:
Reviewed-by: Fabio Estevam festevam@denx.de
It would be nice to get some Tested-by from the board maintainers.
I have tried to merge the series, but I get build errors, see:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/519510
Could you take a look ?
Thanks, Stefano

Hi Oliver and Stefano,
On Tue, Nov 8, 2022 at 1:43 PM Stefano Babic sbabic@denx.de wrote:
I have tried to merge the series, but I get build errors, see:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/519510
Could you take a look ?
One problem I noticed is the missing CONFIG_TEXT_BASE conversion:
diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index 3507489a813c..442e64badc39 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; type = "standalone";
uboot-blob { diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi index 01183f8ade63..e8df5bb8bfea 100644 --- a/arch/arm/dts/imx8qxp-u-boot.dtsi +++ b/arch/arm/dts/imx8qxp-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; type = "standalone";
uboot-blob {
With this fix applied, I got:
WARNING './ahab-container.img' not found, resulting binary is not-functional make[1]: Nothing to be done for 'SPL'. BINMAN all binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8image -e 0x100000 ./mkimage-out.spl.mkimage': Fail open first container file ahab-container.img
make: *** [Makefile:1116: all] Error 1
but if I manually copy the firmware, then the build succeeds.
binman should not thrown an error in case of missing firmware. Oliver, any ideas?
Also, some boards use ahab-container.img and others use mx8qxc0-ahab-container.img.
Is it OK to use mx8qxc0-ahab-container.img for all of them?

Hi Fabio,
On 08.11.22 23:16, Fabio Estevam wrote:
Hi Oliver and Stefano,
On Tue, Nov 8, 2022 at 1:43 PM Stefano Babic sbabic@denx.de wrote:
I have tried to merge the series, but I get build errors, see:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/519510
Could you take a look ?
One problem I noticed is the missing CONFIG_TEXT_BASE conversion:
diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index 3507489a813c..442e64badc39 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob {
diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi index 01183f8ade63..e8df5bb8bfea 100644 --- a/arch/arm/dts/imx8qxp-u-boot.dtsi +++ b/arch/arm/dts/imx8qxp-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob {
With this fix applied, I got:
WARNING './ahab-container.img' not found, resulting binary is not-functional make[1]: Nothing to be done for 'SPL'. BINMAN all binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8image -e 0x100000 ./mkimage-out.spl.mkimage': Fail open first container file ahab-container.img
This is normal, but CI creates fakes. Most of built boards have warnings that build does not run. It is nopt a problem.
make: *** [Makefile:1116: all] Error 1
but if I manually copy the firmware, then the build succeeds.
binman should not thrown an error in case of missing firmware. Oliver, any ideas?
Also, some boards use ahab-container.img and others use mx8qxc0-ahab-container.img.
Is it OK to use mx8qxc0-ahab-container.img for all of them?
I try a CI run with this fixed applied and I let you know.
Stefano

On 08/11/22, Fabio Estevam wrote:
Hi Oliver and Stefano,
On Tue, Nov 8, 2022 at 1:43 PM Stefano Babic sbabic@denx.de wrote:
I have tried to merge the series, but I get build errors, see:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/519510
Could you take a look ?
One problem I noticed is the missing CONFIG_TEXT_BASE conversion:
diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index 3507489a813c..442e64badc39 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob {
diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi index 01183f8ade63..e8df5bb8bfea 100644 --- a/arch/arm/dts/imx8qxp-u-boot.dtsi +++ b/arch/arm/dts/imx8qxp-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob {
With this fix applied, I got:
WARNING './ahab-container.img' not found, resulting binary is not-functional make[1]: Nothing to be done for 'SPL'. BINMAN all binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8image -e 0x100000 ./mkimage-out.spl.mkimage': Fail open first container file ahab-container.img
make: *** [Makefile:1116: all] Error 1
but if I manually copy the firmware, then the build succeeds.
binman should not thrown an error in case of missing firmware. Oliver, any ideas?
Also, some boards use ahab-container.img and others use mx8qxc0-ahab-container.img.
Is it OK to use mx8qxc0-ahab-container.img for all of them?
I'am not sure if that is possible. The seco firmware has explicit different images for these cpu variants.
imx-seco-3.8.5/firmware/seco
mx8dxla0-ahab-container.img mx8dxla1-ahab-container.img mx8qmb0-ahab-container.img mx8qxb0-ahab-container.img mx8qxc0-ahab-container.img
Best Regards,
Oliver

On 08/11/22, Stefano Babic wrote:
Hi Fabio, Oliver,
On 04.11.22 17:31, Fabio Estevam wrote:
Hi Oliver,
On Fri, Nov 4, 2022 at 12:19 PM Oliver Graute oliver.graute@kococonnector.com wrote:
This patchsets switches the remaining imx8 boards to binman.
Oliver Graute (8): imx: imx8qm-rom7720: switch to binman imx: imx8qm: cgtqmx8: switch to binman imx: imx8qxp: imx8qxp_mek switch to binman imx: imx8qm: imx8qm_mek switch to binman imx: imx8qxp: giedi switch to binman imx: imx8qxp: deneb switch to binman imx: imx8x: colibri: switch to binman imx: imx8: apalis: switch to binman
Great work, thanks. This series looks good to me:
Reviewed-by: Fabio Estevam festevam@denx.de
It would be nice to get some Tested-by from the board maintainers.
I have tried to merge the series, but I get build errors, see:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/519510
Could you take a look ?
For my imx8qm boards I need to manually place these imx firmware blobs with expected names for sucessfull image creation.
As I understood the CI creates somes fakes. But I don't know where this is happening.
Best regards,
Oliver

Hi Oliver and Stefano,
On Wed, Nov 9, 2022 at 1:19 PM Oliver Graute oliver.graute@gmail.com wrote:
For my imx8qm boards I need to manually place these imx firmware blobs with expected names for sucessfull image creation.
As I understood the CI creates somes fakes. But I don't know where this is happening.
CI is falling with your series applied:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/525787
It is easy to reproduce the failure locally. Just remove ahab-container.img from the U-Boot tree and try to build imx8qxp_mek_defconfig.
Prior to the binman conversion:
WARNING './ahab-container.img' not found, resulting binary is not-functional make[1]: Nothing to be done for 'SPL'.
Only a warning is issued.
After the binman conversion:
WARNING './ahab-container.img' not found, resulting binary is not-functional make[1]: Nothing to be done for 'SPL'. BINMAN all binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8image -e 0x100000 ./mkimage-out.spl.mkimage': Fail open first container file ahab-container.img
make: *** [Makefile:1116: all] Error 1
Maybe someone has any suggestions?

On Wed, Nov 09, 2022 at 02:45:10PM -0300, Fabio Estevam wrote:
Hi Oliver and Stefano,
On Wed, Nov 9, 2022 at 1:19 PM Oliver Graute oliver.graute@gmail.com wrote:
For my imx8qm boards I need to manually place these imx firmware blobs with expected names for sucessfull image creation.
As I understood the CI creates somes fakes. But I don't know where this is happening.
CI is falling with your series applied:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/525787
It is easy to reproduce the failure locally. Just remove ahab-container.img from the U-Boot tree and try to build imx8qxp_mek_defconfig.
Prior to the binman conversion:
WARNING './ahab-container.img' not found, resulting binary is not-functional make[1]: Nothing to be done for 'SPL'.
Only a warning is issued.
After the binman conversion:
WARNING './ahab-container.img' not found, resulting binary is not-functional make[1]: Nothing to be done for 'SPL'. BINMAN all binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8image -e 0x100000 ./mkimage-out.spl.mkimage': Fail open first container file ahab-container.img
make: *** [Makefile:1116: all] Error 1
Maybe someone has any suggestions?
So, this is coming from board/freescale/imx8qxp_mek/imximage.cfg (and there's another board or two doing the same / simialr thing), shouldn't this be wholly in binman now?

On 09/11/22, Fabio Estevam wrote:
Hi Oliver and Stefano,
On Wed, Nov 9, 2022 at 1:19 PM Oliver Graute oliver.graute@gmail.com wrote:
For my imx8qm boards I need to manually place these imx firmware blobs with expected names for sucessfull image creation.
As I understood the CI creates somes fakes. But I don't know where this is happening.
CI is falling with your series applied:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/525787
It is easy to reproduce the failure locally. Just remove ahab-container.img from the U-Boot tree and try to build imx8qxp_mek_defconfig.
Prior to the binman conversion:
WARNING './ahab-container.img' not found, resulting binary is not-functional make[1]: Nothing to be done for 'SPL'.
Only a warning is issued.
After the binman conversion:
WARNING './ahab-container.img' not found, resulting binary is not-functional make[1]: Nothing to be done for 'SPL'. BINMAN all binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8image -e 0x100000 ./mkimage-out.spl.mkimage': Fail open first container file ahab-container.img
make: *** [Makefile:1116: all] Error 1
I can reproduce it with this imx8qxp_mek board. I'am currently do not understand how these binman-fake is working and why there are no fake blobs for imx8qxp board. For the following two boards the fake blobs are created:
imx8mm_evk_defconfig apalis-imx8_defconfig
But where is the difference here?
Best regards,
Oliver
Maybe someone has any suggestions?

Hi Oliver,
On Fri, Nov 11, 2022 at 9:54 AM Oliver Graute oliver.graute@gmail.com wrote:
imx8mm_evk_defconfig apalis-imx8_defconfig
But where is the difference here?
With the change below, the imx8qm_mek_defconfig builds without errors in the absence of the blobs:
diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index 3507489a813c..442e64badc39 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; type = "standalone";
uboot-blob { diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi index 01183f8ade63..e8df5bb8bfea 100644 --- a/arch/arm/dts/imx8qxp-u-boot.dtsi +++ b/arch/arm/dts/imx8qxp-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; type = "standalone";
uboot-blob { diff --git a/configs/imx8qm_mek_defconfig b/configs/imx8qm_mek_defconfig index 4fc828681b6c..4c220188fbb6 100644 --- a/configs/imx8qm_mek_defconfig +++ b/configs/imx8qm_mek_defconfig @@ -3,21 +3,12 @@ CONFIG_ARCH_IMX8=y CONFIG_TEXT_BASE=0x80020000 CONFIG_SYS_MALLOC_LEN=0x2400000 CONFIG_SYS_MALLOC_F_LEN=0x8000 -CONFIG_SPL_GPIO=y -CONFIG_SPL_LIBCOMMON_SUPPORT=y -CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=3 CONFIG_ENV_SIZE=0x1000 CONFIG_ENV_OFFSET=0x400000 CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-mek" -CONFIG_SPL_TEXT_BASE=0x100000 CONFIG_TARGET_IMX8QM_MEK=y -CONFIG_SPL_MMC=y -CONFIG_SPL_SERIAL=y -CONFIG_SPL_DRIVERS_MISC=y -CONFIG_SPL=y -CONFIG_SPL_LOAD_IMX_CONTAINER=y CONFIG_IMX_CONTAINER_CFG="board/freescale/imx8qm_mek/uboot-container.cfg" CONFIG_SYS_LOAD_ADDR=0x80280000 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y @@ -32,22 +23,8 @@ CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if test ${sec_boot} = yes; then if run loadcntr; then run mmcboot; else run netboot; fi; else if run loadimage; then run mmcboot; else run netboot; fi; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi" CONFIG_LOG=y CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_SPL_MAX_SIZE=0x1f000 -CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -CONFIG_SPL_BSS_START_ADDR=0x128000 -CONFIG_SPL_BSS_MAX_SIZE=0x1000 -CONFIG_SPL_BOARD_INIT=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -CONFIG_SPL_STACK=0x13e000 -CONFIG_SYS_SPL_MALLOC=y -CONFIG_HAS_CUSTOM_SPL_MALLOC_START=y -CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x120000 -CONFIG_SYS_SPL_MALLOC_SIZE=0x3000 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 -CONFIG_SPL_POWER_DOMAIN=y -CONFIG_SPL_WATCHDOG=y CONFIG_HUSH_PARSER=y CONFIG_SYS_CBSIZE=256 CONFIG_SYS_PBSIZE=276 @@ -66,14 +43,11 @@ CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_CMD_FAT=y -CONFIG_SPL_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -CONFIG_SPL_DM=y -CONFIG_SPL_CLK=y CONFIG_CLK_IMX8=y CONFIG_CPU=y CONFIG_MXC_GPIO=y @@ -93,16 +67,12 @@ CONFIG_FEC_MXC_MDIO_BASE=0x5B040000 CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y -CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8=y CONFIG_POWER_DOMAIN=y CONFIG_IMX8_POWER_DOMAIN=y CONFIG_DM_REGULATOR=y -CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y -CONFIG_SPL_DM_REGULATOR_GPIO=y CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y -CONFIG_SPL_TINY_MEMSET=y # CONFIG_EFI_LOADER is not set
I removed SPL support, which does not seems to be needed as the scufw handles DDR init.
I don't have access to an imx8qm/qxp board here.
Could you try removing SPL support from your board and see if it boots with binman support?

On Fri, Nov 11, 2022 at 2:40 PM Fabio Estevam festevam@gmail.com wrote:
I removed SPL support, which does not seems to be needed as the scufw handles DDR init.
I don't have access to an imx8qm/qxp board here.
Could you try removing SPL support from your board and see if it boots with binman support?
Ok, let's SPL for now as this is a different topic for discussion.
With the change below against u-boot-imx master-next branch, the imx8qm/qxp boards build fine without blobs:
diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index 3507489a813c..a3e0af48109b 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -10,7 +10,7 @@ };
&binman { -#ifdef CONFIG_SPL +#ifdef CONFIG_SPL_BUILD u-boot-spl-ddr { align = <4>; align-size = <4>; @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; type = "standalone";
uboot-blob { diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi index 01183f8ade63..7622c40906f1 100644 --- a/arch/arm/dts/imx8qxp-u-boot.dtsi +++ b/arch/arm/dts/imx8qxp-u-boot.dtsi @@ -10,7 +10,7 @@ };
&binman { -#ifdef CONFIG_SPL +#ifdef CONFIG_SPL_BUILD u-boot-spl-ddr { align = <4>; align-size = <4>; @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; type = "standalone";
uboot-blob {
Could you please test it on your boards?

Hi guys
On Fri, 2022-11-11 at 14:55 -0300, Fabio Estevam wrote:
On Fri, Nov 11, 2022 at 2:40 PM Fabio Estevam festevam@gmail.com wrote:
I removed SPL support, which does not seems to be needed as the scufw handles DDR init.
I don't have access to an imx8qm/qxp board here.
Could you try removing SPL support from your board and see if it boots with binman support?
Ok, let's SPL for now as this is a different topic for discussion.
Sorry, for jumping in (late) again. However, I still have some serious doubts about the whole topic and was rather surprised that this series just all of a sudden got applied. I hope it is just me being confused so please bear with me.
What exactly is binman vs. imx8image now doing (vs. what was it doing before)? Let us e.g. look at the i.MX 8QuadMax MEK board:
arch/arm/dts/fsl-imx8qm-mek.dts [1]:
That one just includes the following:
arch/arm/dts/imx8qm-u-boot.dtsi [2]:
[snip]
u-boot-spl-ddr {
That seems to be the SPL stuff. However, as mentioned before, it has nothing to do with the DDR initialisation as that is done by the SCFW, not? Anyway, does using SPL even make sense then? I highly doubt it or does anybody know any sensible reason for it?
[snip]
mkimage {
Here above u-boot-spl-ddr.bin gets run through imx8image with the configuration taken from here (if I am not mistaken):
board/freescale/imx8qm_mek/imximage.cfg [3]:
/* Boot from SD, sector size 0x400 */ BOOT_FROM SD 0x400 /* SoC type IMX8QM */ SOC_TYPE IMX8QM /* Append seco container image */ APPEND mx8qm-ahab-container.img /* Create the 2nd container */ CONTAINER /* Add scfw image with exec attribute */ IMAGE SCU mx8qm-mek-scfw-tcm.bin /* Add ATF image with exec attribute */ IMAGE A35 spl/u-boot-spl.bin 0x00100000
So, if I am not mistaken this does already add SECO, SCFW and ATF, right?
BTW: There is also still a board/freescale/imx8qm_mek/uboot-container.cfg [4] which likely no longer serves any purpose, not?
Anyway, let's continue with our discussion on [2]:
[snip]
itb { filename = "u-boot.itb";
So we create a fit image.
[snip]
uboot {
Which contains U-Boot proper.
[snip]
atf {
And ATF.
[snip]
scfw {
And SCFW.
[snip]
scfw_blob { filename = "mx8qm-val-scfw-tcm.bin";
BTW: Are we supposed to have a hard-coded file name for that val board here?
[snip]
seco {
And SECO.
[snip]
seco_blob { filename = "mx8qm-ahab-container.img";
BTW: At least nowadays that one would likely officially rather be called mx8qmb0-ahab-container.img.
[snip]
@fdt-SEQ {
And, of course, the(m) device tree(s).
However, are we sure any of them ATF, SCFW and/or SECO in that fit image are even ever used? How exactly is this supposed to work?
[snip]
imx-boot {
Then it creates flash.bin but only containing the SPL?
[snip]
[1] https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/fsl-imx8qm-m... [2] https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/imx8qm-u-boo... [3] https://source.denx.de/u-boot/u-boot/-/blob/master/board/freescale/imx8qm_me... [4] https://source.denx.de/u-boot/u-boot/-/blob/master/board/freescale/imx8qm_me...
Thanks for clarifying the whole situation.
Cheers
Marcel

On 11/11/22, Fabio Estevam wrote:
On Fri, Nov 11, 2022 at 2:40 PM Fabio Estevam festevam@gmail.com wrote:
I removed SPL support, which does not seems to be needed as the scufw handles DDR init.
I don't have access to an imx8qm/qxp board here.
Could you try removing SPL support from your board and see if it boots with binman support?
Ok, let's SPL for now as this is a different topic for discussion.
With the change below against u-boot-imx master-next branch, the imx8qm/qxp boards build fine without blobs:
diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index 3507489a813c..a3e0af48109b 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -10,7 +10,7 @@ };
&binman { -#ifdef CONFIG_SPL +#ifdef CONFIG_SPL_BUILD u-boot-spl-ddr { align = <4>; align-size = <4>; @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob {
diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi index 01183f8ade63..7622c40906f1 100644 --- a/arch/arm/dts/imx8qxp-u-boot.dtsi +++ b/arch/arm/dts/imx8qxp-u-boot.dtsi @@ -10,7 +10,7 @@ };
&binman { -#ifdef CONFIG_SPL +#ifdef CONFIG_SPL_BUILD u-boot-spl-ddr { align = <4>; align-size = <4>; @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob {
Could you please test it on your boards?
Ok, I can confirm it builds without the binary blobs with this changes. I'll change it in patches accordingly
Best regards,
Oliver

Hi Oliver,
On Fri, Nov 18, 2022 at 10:48 AM Oliver Graute oliver.graute@gmail.com wrote:
Ok, I can confirm it builds without the binary blobs with this changes. I'll change it in patches accordingly
Your series has already landed in master.
Please send any incremental patches to address Marcel's feedback on top of it.

On 11/11/22, Fabio Estevam wrote:
On Fri, Nov 11, 2022 at 2:40 PM Fabio Estevam festevam@gmail.com wrote:
I removed SPL support, which does not seems to be needed as the scufw handles DDR init.
I don't have access to an imx8qm/qxp board here.
Could you try removing SPL support from your board and see if it boots with binman support?
Ok, let's SPL for now as this is a different topic for discussion.
With the change below against u-boot-imx master-next branch, the imx8qm/qxp boards build fine without blobs:
diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index 3507489a813c..a3e0af48109b 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -10,7 +10,7 @@ };
&binman { -#ifdef CONFIG_SPL +#ifdef CONFIG_SPL_BUILD
On building the imx8qm_rom7720 board the CONFIG_SPL_BUILD define is somehow always false. So I endup in a invalid image:
Image 'main-section' is missing external blobs and is non-functional: spl Image 'main-section' has faked external blobs and is non-functional: spl.bin
Some images are invalid
With CONFIG_SPL instead of CONFIG_SPL_BUILD its working again. So the Question is why is CONFIG_SPL true and CONFIG_SPL_BUILD false here?
Some hints?
Best regards,
Oliver

Hi Oliver,
On Tue, Nov 22, 2022 at 11:24 AM Oliver Graute oliver.graute@gmail.com wrote:
On building the imx8qm_rom7720 board the CONFIG_SPL_BUILD define is somehow always false. So I endup in a invalid image:
Image 'main-section' is missing external blobs and is non-functional: spl Image 'main-section' has faked external blobs and is non-functional: spl.bin
Some images are invalid
With CONFIG_SPL instead of CONFIG_SPL_BUILD its working again. So the Question is why is CONFIG_SPL true and CONFIG_SPL_BUILD false here?
Some hints?
Unfortunately, I don't have access to any imx8qxp/qm board to investigate.
Due to the several issues of the imx8qxp conversion series, I am inclined to say we need to revert these patches for 2023.01 and then after 2023.01 we can try again.
What do you think? if you agree, please submit the reverts.

On 11/11/22, Fabio Estevam wrote:
Hi Oliver,
On Fri, Nov 11, 2022 at 9:54 AM Oliver Graute oliver.graute@gmail.com wrote:
imx8mm_evk_defconfig apalis-imx8_defconfig
But where is the difference here?
With the change below, the imx8qm_mek_defconfig builds without errors in the absence of the blobs:
diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi index 3507489a813c..442e64badc39 100644 --- a/arch/arm/dts/imx8qm-u-boot.dtsi +++ b/arch/arm/dts/imx8qm-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob {
diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi index 01183f8ade63..e8df5bb8bfea 100644 --- a/arch/arm/dts/imx8qxp-u-boot.dtsi +++ b/arch/arm/dts/imx8qxp-u-boot.dtsi @@ -50,7 +50,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob {
diff --git a/configs/imx8qm_mek_defconfig b/configs/imx8qm_mek_defconfig index 4fc828681b6c..4c220188fbb6 100644 --- a/configs/imx8qm_mek_defconfig +++ b/configs/imx8qm_mek_defconfig @@ -3,21 +3,12 @@ CONFIG_ARCH_IMX8=y CONFIG_TEXT_BASE=0x80020000 CONFIG_SYS_MALLOC_LEN=0x2400000 CONFIG_SYS_MALLOC_F_LEN=0x8000 -CONFIG_SPL_GPIO=y -CONFIG_SPL_LIBCOMMON_SUPPORT=y -CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=3 CONFIG_ENV_SIZE=0x1000 CONFIG_ENV_OFFSET=0x400000 CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-mek" -CONFIG_SPL_TEXT_BASE=0x100000 CONFIG_TARGET_IMX8QM_MEK=y -CONFIG_SPL_MMC=y -CONFIG_SPL_SERIAL=y -CONFIG_SPL_DRIVERS_MISC=y -CONFIG_SPL=y -CONFIG_SPL_LOAD_IMX_CONTAINER=y CONFIG_IMX_CONTAINER_CFG="board/freescale/imx8qm_mek/uboot-container.cfg" CONFIG_SYS_LOAD_ADDR=0x80280000 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y @@ -32,22 +23,8 @@ CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if test ${sec_boot} = yes; then if run loadcntr; then run mmcboot; else run netboot; fi; else if run loadimage; then run mmcboot; else run netboot; fi; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi" CONFIG_LOG=y CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_SPL_MAX_SIZE=0x1f000 -CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -CONFIG_SPL_BSS_START_ADDR=0x128000 -CONFIG_SPL_BSS_MAX_SIZE=0x1000 -CONFIG_SPL_BOARD_INIT=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -CONFIG_SPL_STACK=0x13e000 -CONFIG_SYS_SPL_MALLOC=y -CONFIG_HAS_CUSTOM_SPL_MALLOC_START=y -CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x120000 -CONFIG_SYS_SPL_MALLOC_SIZE=0x3000 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 -CONFIG_SPL_POWER_DOMAIN=y -CONFIG_SPL_WATCHDOG=y CONFIG_HUSH_PARSER=y CONFIG_SYS_CBSIZE=256 CONFIG_SYS_PBSIZE=276 @@ -66,14 +43,11 @@ CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_CMD_FAT=y -CONFIG_SPL_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -CONFIG_SPL_DM=y -CONFIG_SPL_CLK=y CONFIG_CLK_IMX8=y CONFIG_CPU=y CONFIG_MXC_GPIO=y @@ -93,16 +67,12 @@ CONFIG_FEC_MXC_MDIO_BASE=0x5B040000 CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y -CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8=y CONFIG_POWER_DOMAIN=y CONFIG_IMX8_POWER_DOMAIN=y CONFIG_DM_REGULATOR=y -CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y -CONFIG_SPL_DM_REGULATOR_GPIO=y CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y -CONFIG_SPL_TINY_MEMSET=y # CONFIG_EFI_LOADER is not set
I removed SPL support, which does not seems to be needed as the scufw handles DDR init.
I know that DDR init is done in scfw for imx8qm. Because I patched these values gotten from a NXP Excel RPA sheet into our scfw a year ago as we got our Micron LPDDR4. But I wasn't aware that then the SPL stuff is superflous then. Is this really the case? Is there no other reason for SPL? Can you confirm?
I don't have access to an imx8qm/qxp board here.
Could you try removing SPL support from your board and see if it boots with binman support?
Ok, first I removed SPL Config for imx8qm_dmsse20 board posted here [1] Because this is my current develop setup. The imx8qm_rom7720 and cgt8mx will follow (perhaps next week). So this Board is booting without SPL.
But I run into somme mmc issues.
U-Boot 2023.01-rc1-00056-gb805f40911-dirty (Nov 18 2022 - 13:05:16 +0100)
Model: Advantech iMX8QM DMSSE20 Board: DMS-SE20A1 8GB Build: SCFW 549b1e18, SECO-FW c9de51c0, ATF 5782363 Boot: USB DRAM: 8 GiB Core: 100 devices, 19 uclasses, devicetree: separate MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial@5a060000 Out: serial@5a060000 Err: serial@5a060000 Net: Warning: ethernet@5b040000 (eth0) using random MAC address - 5a:25:75:2d:65:75 eth0: ethernet@5b040000 Warning: ethernet@5b050000 (eth1) using random MAC address - ca:41:6e:6d:75:10 , eth1: ethernet@5b050000 Hit any key to stop autoboot: 0 Card did not respond to voltage select! : -110 Card did not respond to voltage select! : -110 Card did not respond to voltage select! : -110 ** Bad device specification mmc 2 ** Couldn't find partition mmc 2:1 Can't set block device Card did not respond to voltage select! : -110 Card did not respond to voltage select! : -110 ** Bad device specification mmc 2 ** Couldn't find partition mmc 2:1 Can't set block device Wrong Image Format for bootm command ERROR: can't get kernel image! switch to partitions #0, OK mmc0(part 0) is current device
[1] https://patchwork.ozlabs.org/project/uboot/patch/20221007131158.14094-1-oliv...
Best regards,
Oliver

On Fri, 2022-11-04 at 13:31 -0300, Fabio Estevam wrote:
Hi Oliver,
On Fri, Nov 4, 2022 at 12:19 PM Oliver Graute oliver.graute@kococonnector.com wrote:
This patchsets switches the remaining imx8 boards to binman.
Oliver Graute (8): imx: imx8qm-rom7720: switch to binman imx: imx8qm: cgtqmx8: switch to binman imx: imx8qxp: imx8qxp_mek switch to binman imx: imx8qm: imx8qm_mek switch to binman imx: imx8qxp: giedi switch to binman imx: imx8qxp: deneb switch to binman imx: imx8x: colibri: switch to binman imx: imx8: apalis: switch to binman
Great work, thanks. This series looks good to me:
Reviewed-by: Fabio Estevam festevam@denx.de
It would be nice to get some Tested-by from the board maintainers.
Sure, sorry. I'm at it. Expect our feedback promptly now.
participants (8)
-
Fabio Estevam
-
Marcel Ziswiler
-
Oliver Graute
-
Oliver Graute
-
oliver.graute@kococonnector.com
-
sbabic@denx.de
-
Stefano Babic
-
Tom Rini