Skip to contentSkip to conversation

imx: imx8qm: cgtqmx8: switch to binman

PATCH Superseded Oliver Graute 5 participants 11 messages May 3, 2022 – Oct 25, 2022

Subsystems (3)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

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

Switch to use binman to pack images

---
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           | 2 +-
 doc/board/congatec/cgtqmx8.rst      | 3 +--
 5 files changed, 6 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 4414cbc213..3094524460 100644
@@ -74,6 +74,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 +1 -1
index 2cf882f826..fb334bc4a4 100644
@@ -21,7 +21,7 @@ CONFIG_SYS_LOAD_ADDR=0x80280000
 CONFIG_REMAKE_ELF=y
 CONFIG_FIT=y
 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
reviewer
#1 lore raw

Hi Stefano and Oliver,

Quoted 11 lines · Oliver Graute

Switch to use binman to pack images

---
Changes for v3
-added Reviewed-by
-rebased on master

Quoted 6 lines
 arch/arm/dts/imx8qm-cgtqmx8.dts     | 1 +
 arch/arm/mach-imx/imx8/Kconfig      | 1 +
 board/congatec/cgtqmx8/imximage.cfg | 4 ++--
 configs/cgtqmx8_defconfig           | 2 +-
 doc/board/congatec/cgtqmx8.rst      | 3 +--
 5 files changed, 6 insertions(+), 5 deletions(-)

Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

#2 lore raw
Quoted 15 lines · Fabio Estevam

Hi Stefano and Oliver,

Quoted 11 lines · Oliver Graute

Switch to use binman to pack images

---
Changes for v3
-added Reviewed-by
-rebased on master

Quoted 9 lines
Quoted 6 lines
  arch/arm/dts/imx8qm-cgtqmx8.dts     | 1 +
  arch/arm/mach-imx/imx8/Kconfig      | 1 +
  board/congatec/cgtqmx8/imximage.cfg | 4 ++--
  configs/cgtqmx8_defconfig           | 2 +-
  doc/board/congatec/cgtqmx8.rst      | 3 +--
  5 files changed, 6 insertions(+), 5 deletions(-)

Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.

Right - as well as V4, this is what I tried to merge and breaks. I have drop it.

Quoted 2 lines

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks for noting this - Oliver, can you check and repost a V5, then ? Thanks !

Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#3 lore raw
Quoted 8 lines

Right - as well as V4, this is what I tried to merge and breaks. I have drop it.

Quoted 2 lines

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks for noting this - Oliver, can you check and repost a V5, then ? Thanks !

The arch/arm/dts/imx8qm-u-boot.dtsi is applied on the binman Patch for „PATCH v3 imx: imx8qm-rom7720: switch to binman“

So if you first apply the patches for the imx8qm-rom7720 Board it should work.

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Best regards,

Oliver

#4 lore raw
In reply to Stefano Babic
Quoted 26 lines · Stefano Babic
Quoted 15 lines · Fabio Estevam

Hi Stefano and Oliver,

Quoted 11 lines · Oliver Graute

Switch to use binman to pack images

---
Changes for v3
-added Reviewed-by
-rebased on master

Quoted 9 lines
Quoted 6 lines
  arch/arm/dts/imx8qm-cgtqmx8.dts     | 1 +
  arch/arm/mach-imx/imx8/Kconfig      | 1 +
  board/congatec/cgtqmx8/imximage.cfg | 4 ++--
  configs/cgtqmx8_defconfig           | 2 +-
  doc/board/congatec/cgtqmx8.rst      | 3 +--
  5 files changed, 6 insertions(+), 5 deletions(-)

Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.

Quoted 7 lines

Right - as well as V4, this is what I tried to merge and breaks. I have drop it.

Quoted 2 lines

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks for noting this - Oliver, can you check and repost a V5, then ?

The arch/arm/dts/imx8qm-u-boot.dtsi is applied on the binman Patch for "PATCH v3 imx: imx8qm-rom7720: switch to binman"

So if you first apply the patches for the imx8qm-rom7720 Board it should work.

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Best regards,

Oliver

#5 lore raw
Quoted 33 lines · Oliver Graute
Quoted 32 lines · Stefano Babic
Quoted 15 lines · Fabio Estevam

Hi Stefano and Oliver,

Quoted 11 lines · Oliver Graute

Switch to use binman to pack images

---
Changes for v3
-added Reviewed-by
-rebased on master

Quoted 9 lines
Quoted 6 lines
   arch/arm/dts/imx8qm-cgtqmx8.dts     | 1 +
   arch/arm/mach-imx/imx8/Kconfig      | 1 +
   board/congatec/cgtqmx8/imximage.cfg | 4 ++--
   configs/cgtqmx8_defconfig           | 2 +-
   doc/board/congatec/cgtqmx8.rst      | 3 +--
   5 files changed, 6 insertions(+), 5 deletions(-)

Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.

Right - as well as V4, this is what I tried to merge and breaks. I have drop it.

Quoted 2 lines

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Quoted 6 lines
Quoted 1 line

Thanks for noting this - Oliver, can you check and repost a V5, then ?

The arch/arm/dts/imx8qm-u-boot.dtsi is applied on the binman Patch for "PATCH v3 imx: imx8qm-rom7720: switch to binman"

So if you first apply the patches for the imx8qm-rom7720 Board it should work.

Ok, thanks for tipp - I apply both and will test again

Stefano

Quoted 6 lines

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Best regards,

Oliver

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#6 lore raw
Quoted 36 lines · Stefano Babic
Quoted 35 lines · Oliver Graute
Quoted 33 lines · Stefano Babic
Quoted 15 lines · Fabio Estevam

Hi Stefano and Oliver,

Quoted 11 lines · Oliver Graute

Switch to use binman to pack images

---
Changes for v3
-added Reviewed-by
-rebased on master

Quoted 9 lines
Quoted 6 lines
   arch/arm/dts/imx8qm-cgtqmx8.dts     | 1 +
   arch/arm/mach-imx/imx8/Kconfig      | 1 +
   board/congatec/cgtqmx8/imximage.cfg | 4 ++--
   configs/cgtqmx8_defconfig           | 2 +-
   doc/board/congatec/cgtqmx8.rst      | 3 +--
   5 files changed, 6 insertions(+), 5 deletions(-)

Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.

Right - as well as V4, this is what I tried to merge and breaks. I have drop it.

Quoted 2 lines

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks for noting this - Oliver, can you check and repost a V5, then ?

Quoted 7 lines
Quoted 4 lines

The arch/arm/dts/imx8qm-u-boot.dtsi is applied on the binman Patch for "PATCH v3 imx: imx8qm-rom7720: switch to binman"

So if you first apply the patches for the imx8qm-rom7720 Board it should work.

Ok, thanks for tipp - I apply both and will test again

I saw the CI Pipeline failing. Perhaps the reason is a missing CONFIG_FIT_EXTERNAL_OFFSET?

+++ b/configs/cgtqmx8_defconfig
@@ -20,6 +20,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_SPL_LOAD_FIT=y
# CONFIG_USE_SPL_FIT_GENERATOR is not set

Can you confirm?

Best regards,

Oliver

#7 lore raw
Quoted 40 lines · Oliver Graute
Quoted 39 lines · Stefano Babic
Quoted 38 lines · Oliver Graute
Quoted 26 lines · Stefano Babic
Quoted 15 lines · Fabio Estevam

Hi Stefano and Oliver,

Quoted 11 lines · Oliver Graute

Switch to use binman to pack images

---
Changes for v3
-added Reviewed-by
-rebased on master

Quoted 9 lines
Quoted 6 lines
    arch/arm/dts/imx8qm-cgtqmx8.dts     | 1 +
    arch/arm/mach-imx/imx8/Kconfig      | 1 +
    board/congatec/cgtqmx8/imximage.cfg | 4 ++--
    configs/cgtqmx8_defconfig           | 2 +-
    doc/board/congatec/cgtqmx8.rst      | 3 +--
    5 files changed, 6 insertions(+), 5 deletions(-)

Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.

Quoted 7 lines

Right - as well as V4, this is what I tried to merge and breaks. I have drop it.

Quoted 2 lines

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks for noting this - Oliver, can you check and repost a V5, then ?

The arch/arm/dts/imx8qm-u-boot.dtsi is applied on the binman Patch for "PATCH v3 imx: imx8qm-rom7720: switch to binman"

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

So if you first apply the patches for the imx8qm-rom7720 Board it should work.

Ok, thanks for tipp - I apply both and will test again

I saw the CI Pipeline failing. Perhaps the reason is a missing CONFIG_FIT_EXTERNAL_OFFSET?

I see this, but just applying the two patches, multiple boards are broken:
imx8qm_rom7720_a1_4G cgtqmx8 imx8qm_mek imx8qxp_mek deneb giedi

Quoted 11 lines

+++ b/configs/cgtqmx8_defconfig

(quoted diff) +1 -0
@@ -20,6 +20,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_SPL_LOAD_FIT=y
  # CONFIG_USE_SPL_FIT_GENERATOR is not set
 

Can you confirm?

I let CI run just to see if cgtqmx8 is fixed.

Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#8 lore raw
Quoted 63 lines · Stefano Babic
Quoted 40 lines · Oliver Graute
Quoted 39 lines · Stefano Babic
Quoted 38 lines · Oliver Graute
Quoted 26 lines · Stefano Babic
Quoted 15 lines · Fabio Estevam

Hi Stefano and Oliver,

Quoted 11 lines · Oliver Graute

Switch to use binman to pack images

---
Changes for v3
    -added Reviewed-by
    -rebased on master

Quoted 9 lines
Quoted 6 lines

    arch/arm/dts/imx8qm-cgtqmx8.dts     | 1 +
    arch/arm/mach-imx/imx8/Kconfig      | 1 +
    board/congatec/cgtqmx8/imximage.cfg | 4 ++--
    configs/cgtqmx8_defconfig           | 2 +-
    doc/board/congatec/cgtqmx8.rst      | 3 +--

    5 files changed, 6 insertions(+), 5 deletions(-)

Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.

Quoted 7 lines

Right - as well as V4, this is what I tried to merge and breaks. I have drop it.

Quoted 2 lines

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks for noting this - Oliver, can you check and repost a V5, then ?

The arch/arm/dts/imx8qm-u-boot.dtsi  is applied on the binman Patch for "PATCH v3 imx: imx8qm-rom7720: switch to binman"

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

So if you first apply the patches for the imx8qm-rom7720 Board it should work.

Ok, thanks for tipp - I apply both and will test again

I saw the CI Pipeline failing. Perhaps the reason is a missing CONFIG_FIT_EXTERNAL_OFFSET?

I see this, but just applying the two patches, multiple boards are broken:
imx8qm_rom7720_a1_4G cgtqmx8 imx8qm_mek imx8qxp_mek deneb giedi

Quoted 9 lines

+++ b/configs/cgtqmx8_defconfig

(quoted diff) +0 -0
@@ -20,6 +20,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_SPL_LOAD_FIT=y
  # CONFIG_USE_SPL_FIT_GENERATOR is not set

Quoted 4 lines
Quoted 2 lines

Can you confirm?

I let CI run just to see if cgtqmx8 is fixed.

So this seems to fix the Congatec board. Rather, all DTS for i.MX8 are built together, and other boards have not switched to binman. I feel this dependency too hard. Should we maybe split the targets in arch/arm/dts/Makefile ? All DTS are build according to CONFIG_ARCH_IMX8, so congatec DTS is compiled even in case of deneb and gied.

See https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/13928.

Best regards,
Stefano

Quoted 3 lines

Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#9 lore raw
Quoted 72 lines · Stefano Babic
Quoted 66 lines · Stefano Babic
Quoted 42 lines · Oliver Graute
Quoted 41 lines · Stefano Babic
Quoted 40 lines · Oliver Graute
Quoted 27 lines · Stefano Babic
Quoted 22 lines · Fabio Estevam

Hi Stefano and Oliver,

Quoted 11 lines · Oliver Graute

Switch to use binman to pack images

---
Changes for v3
    -added Reviewed-by
    -rebased on master

Quoted 6 lines

    arch/arm/dts/imx8qm-cgtqmx8.dts     | 1 +
    arch/arm/mach-imx/imx8/Kconfig      | 1 +
    board/congatec/cgtqmx8/imximage.cfg | 4 ++--
    configs/cgtqmx8_defconfig           | 2 +-
    doc/board/congatec/cgtqmx8.rst      | 3 +--

    5 files changed, 6 insertions(+), 5 deletions(-)
Quoted 3 lines

Just realized that v3 does not include
imx8qm-u-boot.dtsi and this breaks CI.

Quoted 8 lines

Right - as well as V4, this is what I tried to merge and breaks. I have drop
it.

Quoted 2 lines

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks for noting this - Oliver, can you check and repost a V5, then ?

The arch/arm/dts/imx8qm-u-boot.dtsi  is applied on the binman Patch for "PATCH v3 imx: imx8qm-rom7720: switch to binman"

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

So if you first apply the patches for the imx8qm-rom7720 Board it should work.

Ok, thanks for tipp - I apply both and will test again

I saw the CI Pipeline failing. Perhaps the reason is a missing CONFIG_FIT_EXTERNAL_OFFSET?

I see this, but just applying the two patches, multiple boards are broken:
imx8qm_rom7720_a1_4G cgtqmx8 imx8qm_mek imx8qxp_mek deneb giedi

Quoted 9 lines

+++ b/configs/cgtqmx8_defconfig

(quoted diff) +0 -0
@@ -20,6 +20,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_SPL_LOAD_FIT=y
  # CONFIG_USE_SPL_FIT_GENERATOR is not set

Quoted 4 lines
Quoted 2 lines

Can you confirm?

I let CI run just to see if cgtqmx8 is fixed.

Quoted 7 lines

So this seems to fix the Congatec board. Rather, all DTS for i.MX8 are built together, and other boards have not switched to binman. I feel this dependency too hard. Should we maybe split the targets in arch/arm/dts/Makefile ? All DTS are build according to CONFIG_ARCH_IMX8, so congatec DTS is compiled even in case of deneb and gied.

See https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/13928.

IMHO at this point we need to just untested-convert those last outstanding board or boards, or remove them. This migration has been dragging on and on and I'm sure I've mailed the board maintainers a few times.

Signature · 1 line
Tom
#10 lore raw
In reply to Stefano Babic
Quoted 63 lines · Stefano Babic
Quoted 40 lines · Oliver Graute
Quoted 39 lines · Stefano Babic
Quoted 38 lines · Oliver Graute
Quoted 26 lines · Stefano Babic
Quoted 15 lines · Fabio Estevam

Hi Stefano and Oliver,

Quoted 11 lines · Oliver Graute

Switch to use binman to pack images

---
Changes for v3
-added Reviewed-by
-rebased on master

Quoted 9 lines
Quoted 6 lines
    arch/arm/dts/imx8qm-cgtqmx8.dts     | 1 +
    arch/arm/mach-imx/imx8/Kconfig      | 1 +
    board/congatec/cgtqmx8/imximage.cfg | 4 ++--
    configs/cgtqmx8_defconfig           | 2 +-
    doc/board/congatec/cgtqmx8.rst      | 3 +--
    5 files changed, 6 insertions(+), 5 deletions(-)

Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.

Quoted 7 lines

Right - as well as V4, this is what I tried to merge and breaks. I have drop it.

Quoted 2 lines

The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks for noting this - Oliver, can you check and repost a V5, then ?

The arch/arm/dts/imx8qm-u-boot.dtsi is applied on the binman Patch for "PATCH v3 imx: imx8qm-rom7720: switch to binman"

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

So if you first apply the patches for the imx8qm-rom7720 Board it should work.

Ok, thanks for tipp - I apply both and will test again

I saw the CI Pipeline failing. Perhaps the reason is a missing CONFIG_FIT_EXTERNAL_OFFSET?

I see this, but just applying the two patches, multiple boards are broken:
imx8qm_rom7720_a1_4G cgtqmx8 imx8qm_mek imx8qxp_mek deneb giedi

Quoted 9 lines

+++ b/configs/cgtqmx8_defconfig

(quoted diff) +1 -0
@@ -20,6 +20,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_SPL_LOAD_FIT=y
  # CONFIG_USE_SPL_FIT_GENERATOR is not set
 
Quoted 4 lines
Quoted 2 lines

Can you confirm?

I let CI run just to see if cgtqmx8 is fixed.

For imx8qm_rom7720 the CONFIG_FIT_EXTERNAL_OFFSET is also missing

configs/imx8qm_rom7720_a1_4G_defconfig +1 -0
@@ -20,6 +20,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_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_BOOTDELAY=3

Best regards,

Oliver