Skip to contentSkip to conversation

imx: imx8qm-rom7720: switch to binman

PATCH Superseded Oliver Graute 3 participants 7 messages Oct 25, 2022 – Nov 2, 2022

Subsystems (3)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 imx: imx8qm-rom7720: switch to binman

Switch to use binman to pack images

---
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               | 131 ++++++++++++++++++
 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, 138 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/dts/imx8qm-u-boot.dtsi
arch/arm/dts/imx8qm-rom7720-a1.dts +1 -0
index d1f2fff869..332d441c6d 100644
@@ -10,6 +10,7 @@
 /memreserve/ 0x80000000 0x00020000;
 
 #include "fsl-imx8qm.dtsi"
+#include "imx8qm-u-boot.dtsi"
 
 / {
 	model = "Advantech iMX8QM Qseven series";
arch/arm/dts/imx8qm-u-boot.dtsi new file +131 -0

131 lines not on this page · raw message

arch/arm/mach-imx/imx8/Kconfig +1 -0
index abb03340d8..71abbb33ea 100644
@@ -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
board/advantech/imx8qm_rom7720_a1/imximage.cfg +2 -2
index 5ecde0c530..43035088e3 100644
@@ -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 */
configs/imx8qm_rom7720_a1_4G_defconfig +2 -1
index 3b099761a9..4b7ed6df01 100644
@@ -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"
doc/board/advantech/imx8qm-rom7720-a1.rst +1 -2
index bd4be1dbeb..953cf01fde 100644
@@ -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
 ---------------------------------
Signature · 1 line
2.17.1
#1 lore raw

PATCH v5 1/1 imx: imx8qm: cgtqmx8: switch to binman

Switch to use binman to pack images

---
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           | 3 ++-
 doc/board/congatec/cgtqmx8.rst      | 3 +--
 5 files changed, 7 insertions(+), 5 deletions(-)
arch/arm/dts/imx8qm-cgtqmx8.dts +1 -0
index 555c357f6f..919d00644f 100644
@@ -12,6 +12,7 @@
 /memreserve/ 0x80000000 0x00020000;
 
 #include "fsl-imx8qm.dtsi"
+#include "imx8qm-u-boot.dtsi"
 
 / {
 	model = "Congatec QMX8 Qseven series";
arch/arm/mach-imx/imx8/Kconfig +1 -0
index ba2a38c7f7..a0036a32b5 100644
@@ -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
board/congatec/cgtqmx8/imximage.cfg +2 -2
index 5ecde0c530..43035088e3 100644
@@ -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 */
configs/cgtqmx8_defconfig +2 -1
index ddc65a06b9..fb43de624b 100644
@@ -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_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTCOMMAND=y
doc/board/congatec/cgtqmx8.rst +1 -2
index bccdef2f16..16711a844d 100644
@@ -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
 ---------------------------------
Signature · 1 line
2.17.1
Reviewed-by Peng Fan on v5 1/1
#2 lore raw

Re: [PATCH v5] imx: imx8qm: cgtqmx8: switch to binman

Quoted 5 lines · Oliver Graute

Switch to use binman to pack images

I missed

Quoted 90 lines

---
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           | 3 ++-
 doc/board/congatec/cgtqmx8.rst      | 3 +--
 5 files changed, 7 insertions(+), 5 deletions(-)
arch/arm/dts/imx8qm-cgtqmx8.dts +1 -0
index 555c357f6f..919d00644f 100644
@@ -12,6 +12,7 @@
 /memreserve/ 0x80000000 0x00020000;
 
 #include "fsl-imx8qm.dtsi"
+#include "imx8qm-u-boot.dtsi"
 
 / {
 	model = "Congatec QMX8 Qseven series";
arch/arm/mach-imx/imx8/Kconfig +1 -0
index ba2a38c7f7..a0036a32b5 100644
@@ -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
board/congatec/cgtqmx8/imximage.cfg +2 -2
index 5ecde0c530..43035088e3 100644
@@ -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 */
configs/cgtqmx8_defconfig +2 -1
index ddc65a06b9..fb43de624b 100644
@@ -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_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTCOMMAND=y
doc/board/congatec/cgtqmx8.rst +1 -2
index bccdef2f16..16711a844d 100644
@@ -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
 ---------------------------------
Signature · 1 line
2.17.1

Now Running into this issue:

MKIMAGE u-boot.img
MKIMAGE u-boot-dtb.img
LD u-boot.elf
make[1]: Für das Ziel „SPL“ ist nichts zu tun.
BINMAN all
binman: Section '/binman/u-boot-spl-ddr': Symbol '_binman_u_boot_any_prop_image_pos'
in entry '/binman/u-boot-spl-ddr/u-boot-spl/u-boot-spl-nodtb': Entry 'u-boot-any' not found in list (u-boot-spl-nodtb,u-boot-spl-dtb,u-boot-spl,main-section)
Makefile:1109: recipe for target 'all' failed
make: *** [all] Error 1

some hints?

Best Regards,

Oliver

reviewer
#3 lore raw

Re: [PATCH v5] imx: imx8qm: cgtqmx8: switch to binman

Hi Oliver,

Quoted 12 lines · Oliver Graute

Now Running into this issue:

MKIMAGE u-boot.img
MKIMAGE u-boot-dtb.img
LD u-boot.elf
make[1]: Für das Ziel „SPL“ ist nichts zu tun.
BINMAN all
binman: Section '/binman/u-boot-spl-ddr': Symbol '_binman_u_boot_any_prop_image_pos'
in entry '/binman/u-boot-spl-ddr/u-boot-spl/u-boot-spl-nodtb': Entry 'u-boot-any' not found in list (u-boot-spl-nodtb,u-boot-spl-dtb,u-boot-spl,main-section)
Makefile:1109: recipe for target 'all' failed
make: *** [all] Error 1

Quoted 1 line

some hints?

I suggest sending the two patches as a series: 1/2 and 2/2 as it is easier to review.

Looks like you missed passing @fdt-SEQ like it is done on arch/arm/dts/imx8mm-u-boot.dtsi.

#4 lore raw

Re: [PATCH v5] imx: imx8qm: cgtqmx8: switch to binman

Quoted 16 lines · Fabio Estevam

Hi Oliver,

Quoted 12 lines · Oliver Graute

Now Running into this issue:

MKIMAGE u-boot.img
MKIMAGE u-boot-dtb.img
LD u-boot.elf
make[1]: Für das Ziel „SPL“ ist nichts zu tun.
BINMAN all
binman: Section '/binman/u-boot-spl-ddr': Symbol '_binman_u_boot_any_prop_image_pos'
in entry '/binman/u-boot-spl-ddr/u-boot-spl/u-boot-spl-nodtb': Entry 'u-boot-any' not found in list (u-boot-spl-nodtb,u-boot-spl-dtb,u-boot-spl,main-section)
Makefile:1109: recipe for target 'all' failed
make: *** [all] Error 1

Quoted 4 lines
Quoted 1 line

some hints?

I suggest sending the two patches as a series: 1/2 and 2/2 as it is easier to review.

Ok will send both patches in a series

Quoted 3 lines

Looks like you missed passing @fdt-SEQ like it is done on arch/arm/dts/imx8mm-u-boot.dtsi.

Still see the above error (only for cgtqmx8 board) after replacing fdt with @fdt-SEQ and further alignment with arch/arm/dts/imx8mm-u-boot.dtsi.

Error disappears if I remove the u-boot-spl node in imx8qm-u-boot.dts But this make no sense for me.

/*

		u-boot-spl {
			align-end = <4>;
			filename = "u-boot-spl.bin";
		};

*

Best regards,

Oliver

reviewer
#5 lore raw

Re: [PATCH v5] imx: imx8qm: cgtqmx8: switch to binman

In reply to Oliver Graute

Hi Oliver,

Quoted 12 lines · Oliver Graute

Now Running into this issue:

MKIMAGE u-boot.img
MKIMAGE u-boot-dtb.img
LD u-boot.elf
make[1]: Für das Ziel „SPL“ ist nichts zu tun.
BINMAN all
binman: Section '/binman/u-boot-spl-ddr': Symbol '_binman_u_boot_any_prop_image_pos'
in entry '/binman/u-boot-spl-ddr/u-boot-spl/u-boot-spl-nodtb': Entry 'u-boot-any' not found in list (u-boot-spl-nodtb,u-boot-spl-dtb,u-boot-spl,main-section)
Makefile:1109: recipe for target 'all' failed
make: *** [all] Error 1

Quoted 1 line

some hints?

As suggested in another thread, does it help if you add:

# CONFIG_SPL_BINMAN_UBOOT_SYMBOLS is not set

into your defconfig?

#6 lore raw

Re: [PATCH v5] imx: imx8qm: cgtqmx8: switch to binman

Quoted 16 lines · Fabio Estevam

Hi Oliver,

Quoted 12 lines · Oliver Graute

Now Running into this issue:

MKIMAGE u-boot.img
MKIMAGE u-boot-dtb.img
LD u-boot.elf
make[1]: Für das Ziel „SPL“ ist nichts zu tun.
BINMAN all
binman: Section '/binman/u-boot-spl-ddr': Symbol '_binman_u_boot_any_prop_image_pos'
in entry '/binman/u-boot-spl-ddr/u-boot-spl/u-boot-spl-nodtb': Entry 'u-boot-any' not found in list (u-boot-spl-nodtb,u-boot-spl-dtb,u-boot-spl,main-section)
Makefile:1109: recipe for target 'all' failed
make: *** [all] Error 1

Quoted 7 lines
Quoted 1 line

some hints?

As suggested in another thread, does it help if you add:

# CONFIG_SPL_BINMAN_UBOOT_SYMBOLS is not set

into your defconfig?

indeed this solves the problem. Very thanks
I`ll post v6 then.

Best Regards,

Oliver