All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/5] imx8mq: switch to binman
@ 2021-10-22  2:42 Peng Fan (OSS)
  2021-10-22  2:42 ` [PATCH V3 1/5] imx: imx8mq_evk: " Peng Fan (OSS)
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Peng Fan (OSS) @ 2021-10-22  2:42 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

V3:
 Rebased due to IMX_CONFIG moved to Kconfig
 drop two patches which applied to imx/master

V2:
 Add cover-letter
 Rebased to latest master to avoid apply failure.

Peng Fan (5):
  imx: imx8mq_evk: switch to binman
  imx: imx8mq_phanbell: switch to binman
  imx: pico-imx8mq: switch to use binman
  imx: imx8mq use common imximage.cfg
  doc: imx8mq_evk: update doc after using binman

 arch/arm/dts/imx8mq-evk-u-boot.dtsi      |   2 +
 arch/arm/dts/imx8mq-phanbell-u-boot.dtsi |   2 +
 arch/arm/dts/imx8mq-pico-pi.dts          |   1 +
 arch/arm/dts/imx8mq-u-boot.dtsi          | 122 +++++++++++++++++++++++
 arch/arm/mach-imx/imx8m/Kconfig          |   9 +-
 arch/arm/mach-imx/imx8m/imximage.cfg     |  12 +--
 configs/imx8mq_evk_defconfig             |   2 +-
 configs/imx8mq_phanbell_defconfig        |   2 +-
 configs/pico-imx8mq_defconfig            |   2 +-
 doc/board/nxp/imx8mq_evk.rst             |   3 +-
 10 files changed, 141 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/dts/imx8mq-u-boot.dtsi

-- 
2.30.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH V3 1/5] imx: imx8mq_evk: switch to binman
  2021-10-22  2:42 [PATCH V3 0/5] imx8mq: switch to binman Peng Fan (OSS)
@ 2021-10-22  2:42 ` Peng Fan (OSS)
  2021-11-11 14:41   ` Patrick Wildt
                     ` (2 more replies)
  2021-10-22  2:42 ` [PATCH V3 2/5] imx: imx8mq_phanbell: " Peng Fan (OSS)
                   ` (3 subsequent siblings)
  4 siblings, 3 replies; 21+ messages in thread
From: Peng Fan (OSS) @ 2021-10-22  2:42 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Switch to use binman to pack images

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/dts/imx8mq-evk-u-boot.dtsi     |   2 +
 arch/arm/dts/imx8mq-u-boot.dtsi         | 122 ++++++++++++++++++++++++
 arch/arm/mach-imx/imx8m/Kconfig         |   1 +
 board/freescale/imx8mq_evk/Kconfig      |   2 +-
 board/freescale/imx8mq_evk/imximage.cfg |  11 +++
 configs/imx8mq_evk_defconfig            |   2 +-
 6 files changed, 138 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/imx8mq-u-boot.dtsi
 create mode 100644 board/freescale/imx8mq_evk/imximage.cfg

diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
index 2cfc12b7e0..6f9c81462e 100644
--- a/arch/arm/dts/imx8mq-evk-u-boot.dtsi
+++ b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
 
+#include "imx8mq-u-boot.dtsi"
+
 &usdhc1 {
 	mmc-hs400-1_8v;
 };
diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi
new file mode 100644
index 0000000000..2c10e9b645
--- /dev/null
+++ b/arch/arm/dts/imx8mq-u-boot.dtsi
@@ -0,0 +1,122 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 NXP
+ */
+
+/ {
+	binman: binman {
+		multiple-images;
+	};
+
+};
+
+&binman {
+	u-boot-spl-ddr {
+		filename = "u-boot-spl-ddr.bin";
+		pad-byte = <0xff>;
+		align-size = <4>;
+		align = <4>;
+
+		u-boot-spl {
+			align-end = <4>;
+		};
+
+		blob_1: blob-ext@1 {
+			filename = "lpddr4_pmu_train_1d_imem.bin";
+			size = <0x8000>;
+		};
+
+		blob_2: blob-ext@2 {
+			filename = "lpddr4_pmu_train_1d_dmem.bin";
+			size = <0x4000>;
+		};
+
+		blob_3: blob-ext@3 {
+			filename = "lpddr4_pmu_train_2d_imem.bin";
+			size = <0x8000>;
+		};
+
+		blob_4: blob-ext@4 {
+			filename = "lpddr4_pmu_train_2d_dmem.bin";
+			size = <0x4000>;
+		};
+	};
+
+	signed_hdmi {
+		filename = "signed_hdmi.bin";
+
+		blob_5: blob-ext@5 {
+			filename = "signed_hdmi_imx8m.bin";
+		};
+	};
+
+	flash {
+		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 {
+			description = "Configuration to load ATF before U-Boot";
+			#address-cells = <1>;
+			fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
+
+			images {
+				uboot {
+					description = "U-Boot (64-bit)";
+					type = "standalone";
+					arch = "arm64";
+					compression = "none";
+					load = <CONFIG_SYS_TEXT_BASE>;
+
+					uboot_blob: blob-ext {
+						filename = "u-boot-nodtb.bin";
+					};
+				};
+
+				atf {
+					description = "ARM Trusted Firmware";
+					type = "firmware";
+					arch = "arm64";
+					compression = "none";
+					load = <0x910000>;
+					entry = <0x910000>;
+
+					atf_blob: blob-ext {
+						filename = "bl31.bin";
+					};
+				};
+
+				fdt {
+					description = "NAME";
+					type = "flat_dt";
+					compression = "none";
+
+					uboot_fdt_blob: blob-ext {
+						filename = "u-boot.dtb";
+					};
+				};
+			};
+
+			configurations {
+				default = "conf";
+
+				conf {
+					description = "NAME";
+					firmware = "uboot";
+					loadables = "atf";
+					fdt = "fdt";
+				};
+			};
+		};
+	};
+};
diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index 276b8bd974..c556e712b7 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -36,6 +36,7 @@ config TARGET_IMX8MQ_CM
 
 config TARGET_IMX8MQ_EVK
 	bool "imx8mq_evk"
+	select BINMAN
 	select IMX8MQ
 	select IMX8M_LPDDR4
 
diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
index c4d20ad7c7..a7c49744b3 100644
--- a/board/freescale/imx8mq_evk/Kconfig
+++ b/board/freescale/imx8mq_evk/Kconfig
@@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
 	default "imx8mq_evk"
 
 config IMX_CONFIG
-	default "arch/arm/mach-imx/imx8m/imximage.cfg"
+	default "board/freescale/imx8mq_evk/imximage.cfg"
 
 endif
diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
new file mode 100644
index 0000000000..74f12b30d2
--- /dev/null
+++ b/board/freescale/imx8mq_evk/imximage.cfg
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 NXP
+ */
+
+#define __ASSEMBLY__
+
+FIT
+BOOT_FROM	sd
+SIGNED_HDMI	signed_hdmi.bin
+LOADER		mkimage.flash.mkimage	0x7e1000
diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
index 62fe6f1523..5970d8c164 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -18,7 +18,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
 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_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_LATE_INIT=y
 CONFIG_SPL_BOARD_INIT=y
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH V3 2/5] imx: imx8mq_phanbell: switch to binman
  2021-10-22  2:42 [PATCH V3 0/5] imx8mq: switch to binman Peng Fan (OSS)
  2021-10-22  2:42 ` [PATCH V3 1/5] imx: imx8mq_evk: " Peng Fan (OSS)
@ 2021-10-22  2:42 ` Peng Fan (OSS)
  2021-11-11 14:45   ` Patrick Wildt
  2022-01-08  2:08   ` Tom Rini
  2021-10-22  2:42 ` [PATCH V3 3/5] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 21+ messages in thread
From: Peng Fan (OSS) @ 2021-10-22  2:42 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Switch to binman to pack images

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/dts/imx8mq-phanbell-u-boot.dtsi  |  2 ++
 arch/arm/mach-imx/imx8m/Kconfig           |  7 ++++---
 board/google/imx8mq_phanbell/Kconfig      |  2 +-
 board/google/imx8mq_phanbell/imximage.cfg | 11 +++++++++++
 configs/imx8mq_phanbell_defconfig         |  2 +-
 5 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100644 board/google/imx8mq_phanbell/imximage.cfg

diff --git a/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi b/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi
index 4712cf6a44..a65a942ee7 100644
--- a/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi
+++ b/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
 
+#include "imx8mq-u-boot.dtsi"
+
 &reg_usdhc2_vmmc {
 	u-boot,off-on-delay-us = <20000>;
 };
diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index c556e712b7..b453e5a7da 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -41,9 +41,10 @@ config TARGET_IMX8MQ_EVK
 	select IMX8M_LPDDR4
 
 config TARGET_IMX8MQ_PHANBELL
-        bool "imx8mq_phanbell"
-        select IMX8MQ
-        select IMX8M_LPDDR4
+	bool "imx8mq_phanbell"
+	select BINMAN
+	select IMX8MQ
+	select IMX8M_LPDDR4
 
 config TARGET_IMX8MM_EVK
 	bool "imx8mm LPDDR4 EVK board"
diff --git a/board/google/imx8mq_phanbell/Kconfig b/board/google/imx8mq_phanbell/Kconfig
index 54cfb99952..e59b03cb17 100644
--- a/board/google/imx8mq_phanbell/Kconfig
+++ b/board/google/imx8mq_phanbell/Kconfig
@@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
 	default "imx8mq_phanbell"
 
 config IMX_CONFIG
-	default "arch/arm/mach-imx/imx8m/imximage.cfg"
+	default "board/google/imx8mq_phanbell/imximage.cfg"
 
 endif
diff --git a/board/google/imx8mq_phanbell/imximage.cfg b/board/google/imx8mq_phanbell/imximage.cfg
new file mode 100644
index 0000000000..74f12b30d2
--- /dev/null
+++ b/board/google/imx8mq_phanbell/imximage.cfg
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 NXP
+ */
+
+#define __ASSEMBLY__
+
+FIT
+BOOT_FROM	sd
+SIGNED_HDMI	signed_hdmi.bin
+LOADER		mkimage.flash.mkimage	0x7e1000
diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig
index 911c3391db..a8eab85b4a 100644
--- a/configs/imx8mq_phanbell_defconfig
+++ b/configs/imx8mq_phanbell_defconfig
@@ -18,7 +18,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
 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_SD_BOOT=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_BOARD_INIT=y
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH V3 3/5] imx: pico-imx8mq: switch to use binman
  2021-10-22  2:42 [PATCH V3 0/5] imx8mq: switch to binman Peng Fan (OSS)
  2021-10-22  2:42 ` [PATCH V3 1/5] imx: imx8mq_evk: " Peng Fan (OSS)
  2021-10-22  2:42 ` [PATCH V3 2/5] imx: imx8mq_phanbell: " Peng Fan (OSS)
@ 2021-10-22  2:42 ` Peng Fan (OSS)
  2021-11-11 14:46   ` Patrick Wildt
  2022-01-08  2:08   ` Tom Rini
  2021-10-22  2:42 ` [PATCH V3 4/5] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
  2021-10-22  2:42 ` [PATCH V3 5/5] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)
  4 siblings, 2 replies; 21+ messages in thread
From: Peng Fan (OSS) @ 2021-10-22  2:42 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Switch to use binman to pack images

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/dts/imx8mq-pico-pi.dts           |  1 +
 arch/arm/mach-imx/imx8m/Kconfig           |  1 +
 board/technexion/pico-imx8mq/Kconfig      |  2 +-
 board/technexion/pico-imx8mq/imximage.cfg | 11 +++++++++++
 configs/pico-imx8mq_defconfig             |  2 +-
 5 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 board/technexion/pico-imx8mq/imximage.cfg

diff --git a/arch/arm/dts/imx8mq-pico-pi.dts b/arch/arm/dts/imx8mq-pico-pi.dts
index d2af18ad0e..8ed6e9166b 100644
--- a/arch/arm/dts/imx8mq-pico-pi.dts
+++ b/arch/arm/dts/imx8mq-pico-pi.dts
@@ -9,6 +9,7 @@
 /dts-v1/;
 
 #include "imx8mq.dtsi"
+#include "imx8mq-u-boot.dtsi"
 
 / {
 	model = "TechNexion PICO-PI-8M";
diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index b453e5a7da..707d2d5f4b 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -107,6 +107,7 @@ config TARGET_IMX8MP_EVK
 
 config TARGET_PICO_IMX8MQ
 	bool "Support Technexion Pico iMX8MQ"
+	select BINMAN
 	select IMX8MQ
 	select IMX8M_LPDDR4
 
diff --git a/board/technexion/pico-imx8mq/Kconfig b/board/technexion/pico-imx8mq/Kconfig
index 628b051149..97655517d8 100644
--- a/board/technexion/pico-imx8mq/Kconfig
+++ b/board/technexion/pico-imx8mq/Kconfig
@@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
 	default "pico-imx8mq"
 
 config IMX_CONFIG
-	default "arch/arm/mach-imx/imx8m/imximage.cfg"
+	default "board/technexion/pico-imx8mq/imximage.cfg"
 
 endif
diff --git a/board/technexion/pico-imx8mq/imximage.cfg b/board/technexion/pico-imx8mq/imximage.cfg
new file mode 100644
index 0000000000..74f12b30d2
--- /dev/null
+++ b/board/technexion/pico-imx8mq/imximage.cfg
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 NXP
+ */
+
+#define __ASSEMBLY__
+
+FIT
+BOOT_FROM	sd
+SIGNED_HDMI	signed_hdmi.bin
+LOADER		mkimage.flash.mkimage	0x7e1000
diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig
index b90a492424..a25baf71dc 100644
--- a/configs/pico-imx8mq_defconfig
+++ b/configs/pico-imx8mq_defconfig
@@ -17,7 +17,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
 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_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_LATE_INIT=y
 CONFIG_SPL_BOARD_INIT=y
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH V3 4/5] imx: imx8mq use common imximage.cfg
  2021-10-22  2:42 [PATCH V3 0/5] imx8mq: switch to binman Peng Fan (OSS)
                   ` (2 preceding siblings ...)
  2021-10-22  2:42 ` [PATCH V3 3/5] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
@ 2021-10-22  2:42 ` Peng Fan (OSS)
  2021-11-11 14:46   ` Patrick Wildt
                     ` (2 more replies)
  2021-10-22  2:42 ` [PATCH V3 5/5] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)
  4 siblings, 3 replies; 21+ messages in thread
From: Peng Fan (OSS) @ 2021-10-22  2:42 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

After all these board switch to binman, we could use common imximage.cfg

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/mach-imx/imx8m/imximage.cfg      | 12 +++---------
 board/freescale/imx8mq_evk/Kconfig        |  2 +-
 board/freescale/imx8mq_evk/imximage.cfg   | 11 -----------
 board/google/imx8mq_phanbell/Kconfig      |  2 +-
 board/google/imx8mq_phanbell/imximage.cfg | 11 -----------
 board/technexion/pico-imx8mq/Kconfig      |  2 +-
 board/technexion/pico-imx8mq/imximage.cfg | 11 -----------
 7 files changed, 6 insertions(+), 45 deletions(-)
 delete mode 100644 board/freescale/imx8mq_evk/imximage.cfg
 delete mode 100644 board/google/imx8mq_phanbell/imximage.cfg
 delete mode 100644 board/technexion/pico-imx8mq/imximage.cfg

diff --git a/arch/arm/mach-imx/imx8m/imximage.cfg b/arch/arm/mach-imx/imx8m/imximage.cfg
index 714b24273b..9c6eaf0a6d 100644
--- a/arch/arm/mach-imx/imx8m/imximage.cfg
+++ b/arch/arm/mach-imx/imx8m/imximage.cfg
@@ -1,17 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2018 NXP
+ * Copyright 2018-2021 NXP
  */
 
 #define __ASSEMBLY__
 
 FIT
 BOOT_FROM	sd
-SIGNED_HDMI	signed_hdmi_imx8m.bin
-LOADER		spl/u-boot-spl-ddr.bin	0x7E1000
-SECOND_LOADER	u-boot.itb		0x40200000 0x60000
-
-DDR_FW lpddr4_pmu_train_1d_imem.bin
-DDR_FW lpddr4_pmu_train_1d_dmem.bin
-DDR_FW lpddr4_pmu_train_2d_imem.bin
-DDR_FW lpddr4_pmu_train_2d_dmem.bin
+SIGNED_HDMI	signed_hdmi.bin
+LOADER		mkimage.flash.mkimage	0x7e1000
diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
index a7c49744b3..c4d20ad7c7 100644
--- a/board/freescale/imx8mq_evk/Kconfig
+++ b/board/freescale/imx8mq_evk/Kconfig
@@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
 	default "imx8mq_evk"
 
 config IMX_CONFIG
-	default "board/freescale/imx8mq_evk/imximage.cfg"
+	default "arch/arm/mach-imx/imx8m/imximage.cfg"
 
 endif
diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
deleted file mode 100644
index 74f12b30d2..0000000000
--- a/board/freescale/imx8mq_evk/imximage.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright 2021 NXP
- */
-
-#define __ASSEMBLY__
-
-FIT
-BOOT_FROM	sd
-SIGNED_HDMI	signed_hdmi.bin
-LOADER		mkimage.flash.mkimage	0x7e1000
diff --git a/board/google/imx8mq_phanbell/Kconfig b/board/google/imx8mq_phanbell/Kconfig
index e59b03cb17..54cfb99952 100644
--- a/board/google/imx8mq_phanbell/Kconfig
+++ b/board/google/imx8mq_phanbell/Kconfig
@@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
 	default "imx8mq_phanbell"
 
 config IMX_CONFIG
-	default "board/google/imx8mq_phanbell/imximage.cfg"
+	default "arch/arm/mach-imx/imx8m/imximage.cfg"
 
 endif
diff --git a/board/google/imx8mq_phanbell/imximage.cfg b/board/google/imx8mq_phanbell/imximage.cfg
deleted file mode 100644
index 74f12b30d2..0000000000
--- a/board/google/imx8mq_phanbell/imximage.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright 2021 NXP
- */
-
-#define __ASSEMBLY__
-
-FIT
-BOOT_FROM	sd
-SIGNED_HDMI	signed_hdmi.bin
-LOADER		mkimage.flash.mkimage	0x7e1000
diff --git a/board/technexion/pico-imx8mq/Kconfig b/board/technexion/pico-imx8mq/Kconfig
index 97655517d8..628b051149 100644
--- a/board/technexion/pico-imx8mq/Kconfig
+++ b/board/technexion/pico-imx8mq/Kconfig
@@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
 	default "pico-imx8mq"
 
 config IMX_CONFIG
-	default "board/technexion/pico-imx8mq/imximage.cfg"
+	default "arch/arm/mach-imx/imx8m/imximage.cfg"
 
 endif
diff --git a/board/technexion/pico-imx8mq/imximage.cfg b/board/technexion/pico-imx8mq/imximage.cfg
deleted file mode 100644
index 74f12b30d2..0000000000
--- a/board/technexion/pico-imx8mq/imximage.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright 2021 NXP
- */
-
-#define __ASSEMBLY__
-
-FIT
-BOOT_FROM	sd
-SIGNED_HDMI	signed_hdmi.bin
-LOADER		mkimage.flash.mkimage	0x7e1000
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH V3 5/5] doc: imx8mq_evk: update doc after using binman
  2021-10-22  2:42 [PATCH V3 0/5] imx8mq: switch to binman Peng Fan (OSS)
                   ` (3 preceding siblings ...)
  2021-10-22  2:42 ` [PATCH V3 4/5] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
@ 2021-10-22  2:42 ` Peng Fan (OSS)
  2021-11-11 14:47   ` Patrick Wildt
  2022-01-08  2:08   ` Tom Rini
  4 siblings, 2 replies; 21+ messages in thread
From: Peng Fan (OSS) @ 2021-10-22  2:42 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Update doc after using binman to pack images

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 doc/board/nxp/imx8mq_evk.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/board/nxp/imx8mq_evk.rst b/doc/board/nxp/imx8mq_evk.rst
index c269fdebe3..92eeda79aa 100644
--- a/doc/board/nxp/imx8mq_evk.rst
+++ b/doc/board/nxp/imx8mq_evk.rst
@@ -43,13 +43,14 @@ Build U-Boot
 
    $ export CROSS_COMPILE=aarch64-poky-linux-
    $ make imx8mq_evk_defconfig
-   $ make flash.bin
+   $ make
 
 Burn the flash.bin to MicroSD card offset 33KB:
 
 .. code-block:: bash
 
    $sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=notrunc
+   $sudo dd if=u-boot.itb of=/dev/sd[x] bs=1024 seek=384 conv=notrunc
 
 Boot
 ----
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 1/5] imx: imx8mq_evk: switch to binman
  2021-10-22  2:42 ` [PATCH V3 1/5] imx: imx8mq_evk: " Peng Fan (OSS)
@ 2021-11-11 14:41   ` Patrick Wildt
  2021-11-22  8:58     ` Peng Fan (OSS)
  2021-11-11 17:24   ` Heiko Thiery
  2022-01-08  2:08   ` Tom Rini
  2 siblings, 1 reply; 21+ messages in thread
From: Patrick Wildt @ 2021-11-11 14:41 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

On Fri, Oct 22, 2021 at 10:42:16AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Switch to use binman to pack images
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

I'm unsure how to reply to this.  On the one hand I really like to see
this go in, on the other hand this changes the expectation of what
flash.bin is.  We had the same discussion for i.MX8MM.

Because historically, flash.bin is SPL+U-Boot.itb, and for i.MX8MM
people have changed the binman config to generate a single bootable
file again: 028abfd9b1576b45cf756b9a0c978cfe17906314

So, I would ask you to adjust the imx8mq-u-boot.dts changes in the same
way as done for i.MX8MM.  You should be able to see the differences
by diffing e.g. these files:

diff -u arch/arm/dts/imx8mq-u-boot.dtsi arch/arm/dts/imx8mm-evk-u-boot.dtsi

> ---
>  arch/arm/dts/imx8mq-evk-u-boot.dtsi     |   2 +
>  arch/arm/dts/imx8mq-u-boot.dtsi         | 122 ++++++++++++++++++++++++
>  arch/arm/mach-imx/imx8m/Kconfig         |   1 +
>  board/freescale/imx8mq_evk/Kconfig      |   2 +-
>  board/freescale/imx8mq_evk/imximage.cfg |  11 +++
>  configs/imx8mq_evk_defconfig            |   2 +-
>  6 files changed, 138 insertions(+), 2 deletions(-)
>  create mode 100644 arch/arm/dts/imx8mq-u-boot.dtsi
>  create mode 100644 board/freescale/imx8mq_evk/imximage.cfg
> 
> diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> index 2cfc12b7e0..6f9c81462e 100644
> --- a/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> @@ -1,5 +1,7 @@
>  // SPDX-License-Identifier: (GPL-2.0 OR MIT)
>  
> +#include "imx8mq-u-boot.dtsi"
> +
>  &usdhc1 {
>  	mmc-hs400-1_8v;
>  };
> diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi
> new file mode 100644
> index 0000000000..2c10e9b645
> --- /dev/null
> +++ b/arch/arm/dts/imx8mq-u-boot.dtsi
> @@ -0,0 +1,122 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright 2021 NXP
> + */
> +
> +/ {
> +	binman: binman {
> +		multiple-images;
> +	};
> +
> +};
> +
> +&binman {
> +	u-boot-spl-ddr {
> +		filename = "u-boot-spl-ddr.bin";
> +		pad-byte = <0xff>;
> +		align-size = <4>;
> +		align = <4>;
> +
> +		u-boot-spl {
> +			align-end = <4>;
> +		};
> +
> +		blob_1: blob-ext@1 {
> +			filename = "lpddr4_pmu_train_1d_imem.bin";
> +			size = <0x8000>;
> +		};
> +
> +		blob_2: blob-ext@2 {
> +			filename = "lpddr4_pmu_train_1d_dmem.bin";
> +			size = <0x4000>;
> +		};
> +
> +		blob_3: blob-ext@3 {
> +			filename = "lpddr4_pmu_train_2d_imem.bin";
> +			size = <0x8000>;
> +		};
> +
> +		blob_4: blob-ext@4 {
> +			filename = "lpddr4_pmu_train_2d_dmem.bin";
> +			size = <0x4000>;
> +		};
> +	};
> +
> +	signed_hdmi {
> +		filename = "signed_hdmi.bin";
> +
> +		blob_5: blob-ext@5 {
> +			filename = "signed_hdmi_imx8m.bin";
> +		};
> +	};
> +
> +	flash {
> +		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 {
> +			description = "Configuration to load ATF before U-Boot";
> +			#address-cells = <1>;
> +			fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
> +
> +			images {
> +				uboot {
> +					description = "U-Boot (64-bit)";
> +					type = "standalone";
> +					arch = "arm64";
> +					compression = "none";
> +					load = <CONFIG_SYS_TEXT_BASE>;
> +
> +					uboot_blob: blob-ext {
> +						filename = "u-boot-nodtb.bin";
> +					};
> +				};
> +
> +				atf {
> +					description = "ARM Trusted Firmware";
> +					type = "firmware";
> +					arch = "arm64";
> +					compression = "none";
> +					load = <0x910000>;
> +					entry = <0x910000>;
> +
> +					atf_blob: blob-ext {
> +						filename = "bl31.bin";
> +					};
> +				};
> +
> +				fdt {
> +					description = "NAME";
> +					type = "flat_dt";
> +					compression = "none";
> +
> +					uboot_fdt_blob: blob-ext {
> +						filename = "u-boot.dtb";
> +					};
> +				};
> +			};
> +
> +			configurations {
> +				default = "conf";
> +
> +				conf {
> +					description = "NAME";
> +					firmware = "uboot";
> +					loadables = "atf";
> +					fdt = "fdt";
> +				};
> +			};
> +		};
> +	};
> +};
> diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
> index 276b8bd974..c556e712b7 100644
> --- a/arch/arm/mach-imx/imx8m/Kconfig
> +++ b/arch/arm/mach-imx/imx8m/Kconfig
> @@ -36,6 +36,7 @@ config TARGET_IMX8MQ_CM
>  
>  config TARGET_IMX8MQ_EVK
>  	bool "imx8mq_evk"
> +	select BINMAN
>  	select IMX8MQ
>  	select IMX8M_LPDDR4
>  
> diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
> index c4d20ad7c7..a7c49744b3 100644
> --- a/board/freescale/imx8mq_evk/Kconfig
> +++ b/board/freescale/imx8mq_evk/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>  	default "imx8mq_evk"
>  
>  config IMX_CONFIG
> -	default "arch/arm/mach-imx/imx8m/imximage.cfg"
> +	default "board/freescale/imx8mq_evk/imximage.cfg"
>  
>  endif
> diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
> new file mode 100644
> index 0000000000..74f12b30d2
> --- /dev/null
> +++ b/board/freescale/imx8mq_evk/imximage.cfg
> @@ -0,0 +1,11 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright 2021 NXP
> + */
> +
> +#define __ASSEMBLY__
> +
> +FIT
> +BOOT_FROM	sd
> +SIGNED_HDMI	signed_hdmi.bin
> +LOADER		mkimage.flash.mkimage	0x7e1000
> diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
> index 62fe6f1523..5970d8c164 100644
> --- a/configs/imx8mq_evk_defconfig
> +++ b/configs/imx8mq_evk_defconfig
> @@ -18,7 +18,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
>  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_BOARD_EARLY_INIT_F=y
>  CONFIG_BOARD_LATE_INIT=y
>  CONFIG_SPL_BOARD_INIT=y
> -- 
> 2.30.0
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 2/5] imx: imx8mq_phanbell: switch to binman
  2021-10-22  2:42 ` [PATCH V3 2/5] imx: imx8mq_phanbell: " Peng Fan (OSS)
@ 2021-11-11 14:45   ` Patrick Wildt
  2022-01-08  2:08   ` Tom Rini
  1 sibling, 0 replies; 21+ messages in thread
From: Patrick Wildt @ 2021-11-11 14:45 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

On Fri, Oct 22, 2021 at 10:42:17AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Switch to binman to pack images

Reviewed-by: Patrick Wildt <patrick@blueri.se>

> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm/dts/imx8mq-phanbell-u-boot.dtsi  |  2 ++
>  arch/arm/mach-imx/imx8m/Kconfig           |  7 ++++---
>  board/google/imx8mq_phanbell/Kconfig      |  2 +-
>  board/google/imx8mq_phanbell/imximage.cfg | 11 +++++++++++
>  configs/imx8mq_phanbell_defconfig         |  2 +-
>  5 files changed, 19 insertions(+), 5 deletions(-)
>  create mode 100644 board/google/imx8mq_phanbell/imximage.cfg
> 
> diff --git a/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi b/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi
> index 4712cf6a44..a65a942ee7 100644
> --- a/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi
> @@ -1,5 +1,7 @@
>  // SPDX-License-Identifier: (GPL-2.0 OR MIT)
>  
> +#include "imx8mq-u-boot.dtsi"
> +
>  &reg_usdhc2_vmmc {
>  	u-boot,off-on-delay-us = <20000>;
>  };
> diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
> index c556e712b7..b453e5a7da 100644
> --- a/arch/arm/mach-imx/imx8m/Kconfig
> +++ b/arch/arm/mach-imx/imx8m/Kconfig
> @@ -41,9 +41,10 @@ config TARGET_IMX8MQ_EVK
>  	select IMX8M_LPDDR4
>  
>  config TARGET_IMX8MQ_PHANBELL
> -        bool "imx8mq_phanbell"
> -        select IMX8MQ
> -        select IMX8M_LPDDR4
> +	bool "imx8mq_phanbell"
> +	select BINMAN
> +	select IMX8MQ
> +	select IMX8M_LPDDR4
>  
>  config TARGET_IMX8MM_EVK
>  	bool "imx8mm LPDDR4 EVK board"
> diff --git a/board/google/imx8mq_phanbell/Kconfig b/board/google/imx8mq_phanbell/Kconfig
> index 54cfb99952..e59b03cb17 100644
> --- a/board/google/imx8mq_phanbell/Kconfig
> +++ b/board/google/imx8mq_phanbell/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>  	default "imx8mq_phanbell"
>  
>  config IMX_CONFIG
> -	default "arch/arm/mach-imx/imx8m/imximage.cfg"
> +	default "board/google/imx8mq_phanbell/imximage.cfg"
>  
>  endif
> diff --git a/board/google/imx8mq_phanbell/imximage.cfg b/board/google/imx8mq_phanbell/imximage.cfg
> new file mode 100644
> index 0000000000..74f12b30d2
> --- /dev/null
> +++ b/board/google/imx8mq_phanbell/imximage.cfg
> @@ -0,0 +1,11 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright 2021 NXP
> + */
> +
> +#define __ASSEMBLY__
> +
> +FIT
> +BOOT_FROM	sd
> +SIGNED_HDMI	signed_hdmi.bin
> +LOADER		mkimage.flash.mkimage	0x7e1000
> diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig
> index 911c3391db..a8eab85b4a 100644
> --- a/configs/imx8mq_phanbell_defconfig
> +++ b/configs/imx8mq_phanbell_defconfig
> @@ -18,7 +18,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
>  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_SD_BOOT=y
>  CONFIG_BOARD_EARLY_INIT_F=y
>  CONFIG_SPL_BOARD_INIT=y
> -- 
> 2.30.0
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 3/5] imx: pico-imx8mq: switch to use binman
  2021-10-22  2:42 ` [PATCH V3 3/5] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
@ 2021-11-11 14:46   ` Patrick Wildt
  2022-01-08  2:08   ` Tom Rini
  1 sibling, 0 replies; 21+ messages in thread
From: Patrick Wildt @ 2021-11-11 14:46 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

On Fri, Oct 22, 2021 at 10:42:18AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Switch to use binman to pack images

Reviewed-by: Patrick Wildt <patrick@blueri.se>

> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm/dts/imx8mq-pico-pi.dts           |  1 +
>  arch/arm/mach-imx/imx8m/Kconfig           |  1 +
>  board/technexion/pico-imx8mq/Kconfig      |  2 +-
>  board/technexion/pico-imx8mq/imximage.cfg | 11 +++++++++++
>  configs/pico-imx8mq_defconfig             |  2 +-
>  5 files changed, 15 insertions(+), 2 deletions(-)
>  create mode 100644 board/technexion/pico-imx8mq/imximage.cfg
> 
> diff --git a/arch/arm/dts/imx8mq-pico-pi.dts b/arch/arm/dts/imx8mq-pico-pi.dts
> index d2af18ad0e..8ed6e9166b 100644
> --- a/arch/arm/dts/imx8mq-pico-pi.dts
> +++ b/arch/arm/dts/imx8mq-pico-pi.dts
> @@ -9,6 +9,7 @@
>  /dts-v1/;
>  
>  #include "imx8mq.dtsi"
> +#include "imx8mq-u-boot.dtsi"
>  
>  / {
>  	model = "TechNexion PICO-PI-8M";
> diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
> index b453e5a7da..707d2d5f4b 100644
> --- a/arch/arm/mach-imx/imx8m/Kconfig
> +++ b/arch/arm/mach-imx/imx8m/Kconfig
> @@ -107,6 +107,7 @@ config TARGET_IMX8MP_EVK
>  
>  config TARGET_PICO_IMX8MQ
>  	bool "Support Technexion Pico iMX8MQ"
> +	select BINMAN
>  	select IMX8MQ
>  	select IMX8M_LPDDR4
>  
> diff --git a/board/technexion/pico-imx8mq/Kconfig b/board/technexion/pico-imx8mq/Kconfig
> index 628b051149..97655517d8 100644
> --- a/board/technexion/pico-imx8mq/Kconfig
> +++ b/board/technexion/pico-imx8mq/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>  	default "pico-imx8mq"
>  
>  config IMX_CONFIG
> -	default "arch/arm/mach-imx/imx8m/imximage.cfg"
> +	default "board/technexion/pico-imx8mq/imximage.cfg"
>  
>  endif
> diff --git a/board/technexion/pico-imx8mq/imximage.cfg b/board/technexion/pico-imx8mq/imximage.cfg
> new file mode 100644
> index 0000000000..74f12b30d2
> --- /dev/null
> +++ b/board/technexion/pico-imx8mq/imximage.cfg
> @@ -0,0 +1,11 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright 2021 NXP
> + */
> +
> +#define __ASSEMBLY__
> +
> +FIT
> +BOOT_FROM	sd
> +SIGNED_HDMI	signed_hdmi.bin
> +LOADER		mkimage.flash.mkimage	0x7e1000
> diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig
> index b90a492424..a25baf71dc 100644
> --- a/configs/pico-imx8mq_defconfig
> +++ b/configs/pico-imx8mq_defconfig
> @@ -17,7 +17,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
>  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_BOARD_EARLY_INIT_F=y
>  CONFIG_BOARD_LATE_INIT=y
>  CONFIG_SPL_BOARD_INIT=y
> -- 
> 2.30.0
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 4/5] imx: imx8mq use common imximage.cfg
  2021-10-22  2:42 ` [PATCH V3 4/5] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
@ 2021-11-11 14:46   ` Patrick Wildt
  2021-11-11 17:21   ` Heiko Thiery
  2022-01-08  2:08   ` Tom Rini
  2 siblings, 0 replies; 21+ messages in thread
From: Patrick Wildt @ 2021-11-11 14:46 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

On Fri, Oct 22, 2021 at 10:42:19AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> After all these board switch to binman, we could use common imximage.cfg

Reviewed-by: Patrick Wildt <patrick@blueri.se>

> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm/mach-imx/imx8m/imximage.cfg      | 12 +++---------
>  board/freescale/imx8mq_evk/Kconfig        |  2 +-
>  board/freescale/imx8mq_evk/imximage.cfg   | 11 -----------
>  board/google/imx8mq_phanbell/Kconfig      |  2 +-
>  board/google/imx8mq_phanbell/imximage.cfg | 11 -----------
>  board/technexion/pico-imx8mq/Kconfig      |  2 +-
>  board/technexion/pico-imx8mq/imximage.cfg | 11 -----------
>  7 files changed, 6 insertions(+), 45 deletions(-)
>  delete mode 100644 board/freescale/imx8mq_evk/imximage.cfg
>  delete mode 100644 board/google/imx8mq_phanbell/imximage.cfg
>  delete mode 100644 board/technexion/pico-imx8mq/imximage.cfg
> 
> diff --git a/arch/arm/mach-imx/imx8m/imximage.cfg b/arch/arm/mach-imx/imx8m/imximage.cfg
> index 714b24273b..9c6eaf0a6d 100644
> --- a/arch/arm/mach-imx/imx8m/imximage.cfg
> +++ b/arch/arm/mach-imx/imx8m/imximage.cfg
> @@ -1,17 +1,11 @@
>  /* SPDX-License-Identifier: GPL-2.0+ */
>  /*
> - * Copyright 2018 NXP
> + * Copyright 2018-2021 NXP
>   */
>  
>  #define __ASSEMBLY__
>  
>  FIT
>  BOOT_FROM	sd
> -SIGNED_HDMI	signed_hdmi_imx8m.bin
> -LOADER		spl/u-boot-spl-ddr.bin	0x7E1000
> -SECOND_LOADER	u-boot.itb		0x40200000 0x60000
> -
> -DDR_FW lpddr4_pmu_train_1d_imem.bin
> -DDR_FW lpddr4_pmu_train_1d_dmem.bin
> -DDR_FW lpddr4_pmu_train_2d_imem.bin
> -DDR_FW lpddr4_pmu_train_2d_dmem.bin
> +SIGNED_HDMI	signed_hdmi.bin
> +LOADER		mkimage.flash.mkimage	0x7e1000
> diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
> index a7c49744b3..c4d20ad7c7 100644
> --- a/board/freescale/imx8mq_evk/Kconfig
> +++ b/board/freescale/imx8mq_evk/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>  	default "imx8mq_evk"
>  
>  config IMX_CONFIG
> -	default "board/freescale/imx8mq_evk/imximage.cfg"
> +	default "arch/arm/mach-imx/imx8m/imximage.cfg"
>  
>  endif
> diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
> deleted file mode 100644
> index 74f12b30d2..0000000000
> --- a/board/freescale/imx8mq_evk/imximage.cfg
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0+ */
> -/*
> - * Copyright 2021 NXP
> - */
> -
> -#define __ASSEMBLY__
> -
> -FIT
> -BOOT_FROM	sd
> -SIGNED_HDMI	signed_hdmi.bin
> -LOADER		mkimage.flash.mkimage	0x7e1000
> diff --git a/board/google/imx8mq_phanbell/Kconfig b/board/google/imx8mq_phanbell/Kconfig
> index e59b03cb17..54cfb99952 100644
> --- a/board/google/imx8mq_phanbell/Kconfig
> +++ b/board/google/imx8mq_phanbell/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>  	default "imx8mq_phanbell"
>  
>  config IMX_CONFIG
> -	default "board/google/imx8mq_phanbell/imximage.cfg"
> +	default "arch/arm/mach-imx/imx8m/imximage.cfg"
>  
>  endif
> diff --git a/board/google/imx8mq_phanbell/imximage.cfg b/board/google/imx8mq_phanbell/imximage.cfg
> deleted file mode 100644
> index 74f12b30d2..0000000000
> --- a/board/google/imx8mq_phanbell/imximage.cfg
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0+ */
> -/*
> - * Copyright 2021 NXP
> - */
> -
> -#define __ASSEMBLY__
> -
> -FIT
> -BOOT_FROM	sd
> -SIGNED_HDMI	signed_hdmi.bin
> -LOADER		mkimage.flash.mkimage	0x7e1000
> diff --git a/board/technexion/pico-imx8mq/Kconfig b/board/technexion/pico-imx8mq/Kconfig
> index 97655517d8..628b051149 100644
> --- a/board/technexion/pico-imx8mq/Kconfig
> +++ b/board/technexion/pico-imx8mq/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>  	default "pico-imx8mq"
>  
>  config IMX_CONFIG
> -	default "board/technexion/pico-imx8mq/imximage.cfg"
> +	default "arch/arm/mach-imx/imx8m/imximage.cfg"
>  
>  endif
> diff --git a/board/technexion/pico-imx8mq/imximage.cfg b/board/technexion/pico-imx8mq/imximage.cfg
> deleted file mode 100644
> index 74f12b30d2..0000000000
> --- a/board/technexion/pico-imx8mq/imximage.cfg
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0+ */
> -/*
> - * Copyright 2021 NXP
> - */
> -
> -#define __ASSEMBLY__
> -
> -FIT
> -BOOT_FROM	sd
> -SIGNED_HDMI	signed_hdmi.bin
> -LOADER		mkimage.flash.mkimage	0x7e1000
> -- 
> 2.30.0
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 5/5] doc: imx8mq_evk: update doc after using binman
  2021-10-22  2:42 ` [PATCH V3 5/5] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)
@ 2021-11-11 14:47   ` Patrick Wildt
  2022-01-08  2:08   ` Tom Rini
  1 sibling, 0 replies; 21+ messages in thread
From: Patrick Wildt @ 2021-11-11 14:47 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

On Fri, Oct 22, 2021 at 10:42:20AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Update doc after using binman to pack images

Not necessary if we make sure flash.bin stays a single bootable image

> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  doc/board/nxp/imx8mq_evk.rst | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/board/nxp/imx8mq_evk.rst b/doc/board/nxp/imx8mq_evk.rst
> index c269fdebe3..92eeda79aa 100644
> --- a/doc/board/nxp/imx8mq_evk.rst
> +++ b/doc/board/nxp/imx8mq_evk.rst
> @@ -43,13 +43,14 @@ Build U-Boot
>  
>     $ export CROSS_COMPILE=aarch64-poky-linux-
>     $ make imx8mq_evk_defconfig
> -   $ make flash.bin
> +   $ make
>  
>  Burn the flash.bin to MicroSD card offset 33KB:
>  
>  .. code-block:: bash
>  
>     $sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=notrunc
> +   $sudo dd if=u-boot.itb of=/dev/sd[x] bs=1024 seek=384 conv=notrunc
>  
>  Boot
>  ----
> -- 
> 2.30.0
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 4/5] imx: imx8mq use common imximage.cfg
  2021-10-22  2:42 ` [PATCH V3 4/5] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
  2021-11-11 14:46   ` Patrick Wildt
@ 2021-11-11 17:21   ` Heiko Thiery
  2021-11-22  8:56     ` Peng Fan (OSS)
  2022-01-08  2:08   ` Tom Rini
  2 siblings, 1 reply; 21+ messages in thread
From: Heiko Thiery @ 2021-11-11 17:21 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

Hi Peng,

Am Fr., 22. Okt. 2021 um 04:08 Uhr schrieb Peng Fan (OSS)
<peng.fan@oss.nxp.com>:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> After all these board switch to binman, we could use common imximage.cfg
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm/mach-imx/imx8m/imximage.cfg      | 12 +++---------
>  board/freescale/imx8mq_evk/Kconfig        |  2 +-
>  board/freescale/imx8mq_evk/imximage.cfg   | 11 -----------
>  board/google/imx8mq_phanbell/Kconfig      |  2 +-
>  board/google/imx8mq_phanbell/imximage.cfg | 11 -----------
>  board/technexion/pico-imx8mq/Kconfig      |  2 +-
>  board/technexion/pico-imx8mq/imximage.cfg | 11 -----------
>  7 files changed, 6 insertions(+), 45 deletions(-)
>  delete mode 100644 board/freescale/imx8mq_evk/imximage.cfg
>  delete mode 100644 board/google/imx8mq_phanbell/imximage.cfg
>  delete mode 100644 board/technexion/pico-imx8mq/imximage.cfg
>
> diff --git a/arch/arm/mach-imx/imx8m/imximage.cfg b/arch/arm/mach-imx/imx8m/imximage.cfg
> index 714b24273b..9c6eaf0a6d 100644
> --- a/arch/arm/mach-imx/imx8m/imximage.cfg
> +++ b/arch/arm/mach-imx/imx8m/imximage.cfg
> @@ -1,17 +1,11 @@
>  /* SPDX-License-Identifier: GPL-2.0+ */
>  /*
> - * Copyright 2018 NXP
> + * Copyright 2018-2021 NXP
>   */
>
>  #define __ASSEMBLY__
>
>  FIT
>  BOOT_FROM      sd
> -SIGNED_HDMI    signed_hdmi_imx8m.bin
> -LOADER         spl/u-boot-spl-ddr.bin  0x7E1000
> -SECOND_LOADER  u-boot.itb              0x40200000 0x60000
> -
> -DDR_FW lpddr4_pmu_train_1d_imem.bin
> -DDR_FW lpddr4_pmu_train_1d_dmem.bin
> -DDR_FW lpddr4_pmu_train_2d_imem.bin
> -DDR_FW lpddr4_pmu_train_2d_dmem.bin
> +SIGNED_HDMI    signed_hdmi.bin
> +LOADER         mkimage.flash.mkimage   0x7e1000

This file is only a temporarily created file by binman. You should use
the output file .. here it should be flash.bin.

But as Patrick already pointed out, we should create the final
flash.bin like before. I also have a patch for adding a new im8mq
board pending that has this already implemented.[1].

[1] https://patchwork.ozlabs.org/project/uboot/patch/20211014180824.10681-2-heiko.thiery@gmail.com/

> diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
> index a7c49744b3..c4d20ad7c7 100644
> --- a/board/freescale/imx8mq_evk/Kconfig
> +++ b/board/freescale/imx8mq_evk/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>         default "imx8mq_evk"
>
>  config IMX_CONFIG
> -       default "board/freescale/imx8mq_evk/imximage.cfg"
> +       default "arch/arm/mach-imx/imx8m/imximage.cfg"
>
>  endif
> diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
> deleted file mode 100644
> index 74f12b30d2..0000000000
> --- a/board/freescale/imx8mq_evk/imximage.cfg
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0+ */
> -/*
> - * Copyright 2021 NXP
> - */
> -
> -#define __ASSEMBLY__
> -
> -FIT
> -BOOT_FROM      sd
> -SIGNED_HDMI    signed_hdmi.bin
> -LOADER         mkimage.flash.mkimage   0x7e1000
> diff --git a/board/google/imx8mq_phanbell/Kconfig b/board/google/imx8mq_phanbell/Kconfig
> index e59b03cb17..54cfb99952 100644
> --- a/board/google/imx8mq_phanbell/Kconfig
> +++ b/board/google/imx8mq_phanbell/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>         default "imx8mq_phanbell"
>
>  config IMX_CONFIG
> -       default "board/google/imx8mq_phanbell/imximage.cfg"
> +       default "arch/arm/mach-imx/imx8m/imximage.cfg"
>
>  endif
> diff --git a/board/google/imx8mq_phanbell/imximage.cfg b/board/google/imx8mq_phanbell/imximage.cfg
> deleted file mode 100644
> index 74f12b30d2..0000000000
> --- a/board/google/imx8mq_phanbell/imximage.cfg
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0+ */
> -/*
> - * Copyright 2021 NXP
> - */
> -
> -#define __ASSEMBLY__
> -
> -FIT
> -BOOT_FROM      sd
> -SIGNED_HDMI    signed_hdmi.bin
> -LOADER         mkimage.flash.mkimage   0x7e1000
> diff --git a/board/technexion/pico-imx8mq/Kconfig b/board/technexion/pico-imx8mq/Kconfig
> index 97655517d8..628b051149 100644
> --- a/board/technexion/pico-imx8mq/Kconfig
> +++ b/board/technexion/pico-imx8mq/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>         default "pico-imx8mq"
>
>  config IMX_CONFIG
> -       default "board/technexion/pico-imx8mq/imximage.cfg"
> +       default "arch/arm/mach-imx/imx8m/imximage.cfg"
>
>  endif
> diff --git a/board/technexion/pico-imx8mq/imximage.cfg b/board/technexion/pico-imx8mq/imximage.cfg
> deleted file mode 100644
> index 74f12b30d2..0000000000
> --- a/board/technexion/pico-imx8mq/imximage.cfg
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0+ */
> -/*
> - * Copyright 2021 NXP
> - */
> -
> -#define __ASSEMBLY__
> -
> -FIT
> -BOOT_FROM      sd
> -SIGNED_HDMI    signed_hdmi.bin
> -LOADER         mkimage.flash.mkimage   0x7e1000
> --
> 2.30.0
>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 1/5] imx: imx8mq_evk: switch to binman
  2021-10-22  2:42 ` [PATCH V3 1/5] imx: imx8mq_evk: " Peng Fan (OSS)
  2021-11-11 14:41   ` Patrick Wildt
@ 2021-11-11 17:24   ` Heiko Thiery
  2021-11-22  8:59     ` Peng Fan (OSS)
  2022-01-08  2:08   ` Tom Rini
  2 siblings, 1 reply; 21+ messages in thread
From: Heiko Thiery @ 2021-11-11 17:24 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

Hi Peng,

Am Fr., 22. Okt. 2021 um 04:07 Uhr schrieb Peng Fan (OSS)
<peng.fan@oss.nxp.com>:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> Switch to use binman to pack images

After switching to binman you will hit the same issue I have in the
u-boot CI. The mkimage step will fail because the hdmi firmware blob
can not be found [1]. There is already a discuusion ongoing how to fix
that [2].

[1] https://lists.denx.de/pipermail/u-boot/2021-October/464338.html
[2] https://lists.denx.de/pipermail/u-boot/2021-November/466181.html

>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm/dts/imx8mq-evk-u-boot.dtsi     |   2 +
>  arch/arm/dts/imx8mq-u-boot.dtsi         | 122 ++++++++++++++++++++++++
>  arch/arm/mach-imx/imx8m/Kconfig         |   1 +
>  board/freescale/imx8mq_evk/Kconfig      |   2 +-
>  board/freescale/imx8mq_evk/imximage.cfg |  11 +++
>  configs/imx8mq_evk_defconfig            |   2 +-
>  6 files changed, 138 insertions(+), 2 deletions(-)
>  create mode 100644 arch/arm/dts/imx8mq-u-boot.dtsi
>  create mode 100644 board/freescale/imx8mq_evk/imximage.cfg
>
> diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> index 2cfc12b7e0..6f9c81462e 100644
> --- a/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> @@ -1,5 +1,7 @@
>  // SPDX-License-Identifier: (GPL-2.0 OR MIT)
>
> +#include "imx8mq-u-boot.dtsi"
> +
>  &usdhc1 {
>         mmc-hs400-1_8v;
>  };
> diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi
> new file mode 100644
> index 0000000000..2c10e9b645
> --- /dev/null
> +++ b/arch/arm/dts/imx8mq-u-boot.dtsi
> @@ -0,0 +1,122 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright 2021 NXP
> + */
> +
> +/ {
> +       binman: binman {
> +               multiple-images;
> +       };
> +
> +};
> +
> +&binman {
> +       u-boot-spl-ddr {
> +               filename = "u-boot-spl-ddr.bin";
> +               pad-byte = <0xff>;
> +               align-size = <4>;
> +               align = <4>;
> +
> +               u-boot-spl {
> +                       align-end = <4>;
> +               };
> +
> +               blob_1: blob-ext@1 {
> +                       filename = "lpddr4_pmu_train_1d_imem.bin";
> +                       size = <0x8000>;
> +               };
> +
> +               blob_2: blob-ext@2 {
> +                       filename = "lpddr4_pmu_train_1d_dmem.bin";
> +                       size = <0x4000>;
> +               };
> +
> +               blob_3: blob-ext@3 {
> +                       filename = "lpddr4_pmu_train_2d_imem.bin";
> +                       size = <0x8000>;
> +               };
> +
> +               blob_4: blob-ext@4 {
> +                       filename = "lpddr4_pmu_train_2d_dmem.bin";
> +                       size = <0x4000>;
> +               };
> +       };
> +
> +       signed_hdmi {
> +               filename = "signed_hdmi.bin";
> +
> +               blob_5: blob-ext@5 {
> +                       filename = "signed_hdmi_imx8m.bin";
> +               };
> +       };
> +
> +       flash {
> +               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 {
> +                       description = "Configuration to load ATF before U-Boot";
> +                       #address-cells = <1>;
> +                       fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
> +
> +                       images {
> +                               uboot {
> +                                       description = "U-Boot (64-bit)";
> +                                       type = "standalone";
> +                                       arch = "arm64";
> +                                       compression = "none";
> +                                       load = <CONFIG_SYS_TEXT_BASE>;
> +
> +                                       uboot_blob: blob-ext {
> +                                               filename = "u-boot-nodtb.bin";
> +                                       };
> +                               };
> +
> +                               atf {
> +                                       description = "ARM Trusted Firmware";
> +                                       type = "firmware";
> +                                       arch = "arm64";
> +                                       compression = "none";
> +                                       load = <0x910000>;
> +                                       entry = <0x910000>;
> +
> +                                       atf_blob: blob-ext {
> +                                               filename = "bl31.bin";
> +                                       };
> +                               };
> +
> +                               fdt {
> +                                       description = "NAME";
> +                                       type = "flat_dt";
> +                                       compression = "none";
> +
> +                                       uboot_fdt_blob: blob-ext {
> +                                               filename = "u-boot.dtb";
> +                                       };
> +                               };
> +                       };
> +
> +                       configurations {
> +                               default = "conf";
> +
> +                               conf {
> +                                       description = "NAME";
> +                                       firmware = "uboot";
> +                                       loadables = "atf";
> +                                       fdt = "fdt";
> +                               };
> +                       };
> +               };
> +       };
> +};
> diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
> index 276b8bd974..c556e712b7 100644
> --- a/arch/arm/mach-imx/imx8m/Kconfig
> +++ b/arch/arm/mach-imx/imx8m/Kconfig
> @@ -36,6 +36,7 @@ config TARGET_IMX8MQ_CM
>
>  config TARGET_IMX8MQ_EVK
>         bool "imx8mq_evk"
> +       select BINMAN
>         select IMX8MQ
>         select IMX8M_LPDDR4
>
> diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
> index c4d20ad7c7..a7c49744b3 100644
> --- a/board/freescale/imx8mq_evk/Kconfig
> +++ b/board/freescale/imx8mq_evk/Kconfig
> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>         default "imx8mq_evk"
>
>  config IMX_CONFIG
> -       default "arch/arm/mach-imx/imx8m/imximage.cfg"
> +       default "board/freescale/imx8mq_evk/imximage.cfg"
>
>  endif
> diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
> new file mode 100644
> index 0000000000..74f12b30d2
> --- /dev/null
> +++ b/board/freescale/imx8mq_evk/imximage.cfg
> @@ -0,0 +1,11 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright 2021 NXP
> + */
> +
> +#define __ASSEMBLY__
> +
> +FIT
> +BOOT_FROM      sd
> +SIGNED_HDMI    signed_hdmi.bin
> +LOADER         mkimage.flash.mkimage   0x7e1000
> diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
> index 62fe6f1523..5970d8c164 100644
> --- a/configs/imx8mq_evk_defconfig
> +++ b/configs/imx8mq_evk_defconfig
> @@ -18,7 +18,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
>  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_BOARD_EARLY_INIT_F=y
>  CONFIG_BOARD_LATE_INIT=y
>  CONFIG_SPL_BOARD_INIT=y
> --
> 2.30.0
>

-- 
Heiko

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 4/5] imx: imx8mq use common imximage.cfg
  2021-11-11 17:21   ` Heiko Thiery
@ 2021-11-22  8:56     ` Peng Fan (OSS)
  0 siblings, 0 replies; 21+ messages in thread
From: Peng Fan (OSS) @ 2021-11-22  8:56 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: sbabic, festevam, u-boot, dl-uboot-imx, Peng Fan



On 2021/11/12 1:21, Heiko Thiery wrote:
> Hi Peng,
> 
> Am Fr., 22. Okt. 2021 um 04:08 Uhr schrieb Peng Fan (OSS)
> <peng.fan@oss.nxp.com>:
>>
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> After all these board switch to binman, we could use common imximage.cfg
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>>   arch/arm/mach-imx/imx8m/imximage.cfg      | 12 +++---------
>>   board/freescale/imx8mq_evk/Kconfig        |  2 +-
>>   board/freescale/imx8mq_evk/imximage.cfg   | 11 -----------
>>   board/google/imx8mq_phanbell/Kconfig      |  2 +-
>>   board/google/imx8mq_phanbell/imximage.cfg | 11 -----------
>>   board/technexion/pico-imx8mq/Kconfig      |  2 +-
>>   board/technexion/pico-imx8mq/imximage.cfg | 11 -----------
>>   7 files changed, 6 insertions(+), 45 deletions(-)
>>   delete mode 100644 board/freescale/imx8mq_evk/imximage.cfg
>>   delete mode 100644 board/google/imx8mq_phanbell/imximage.cfg
>>   delete mode 100644 board/technexion/pico-imx8mq/imximage.cfg
>>
>> diff --git a/arch/arm/mach-imx/imx8m/imximage.cfg b/arch/arm/mach-imx/imx8m/imximage.cfg
>> index 714b24273b..9c6eaf0a6d 100644
>> --- a/arch/arm/mach-imx/imx8m/imximage.cfg
>> +++ b/arch/arm/mach-imx/imx8m/imximage.cfg
>> @@ -1,17 +1,11 @@
>>   /* SPDX-License-Identifier: GPL-2.0+ */
>>   /*
>> - * Copyright 2018 NXP
>> + * Copyright 2018-2021 NXP
>>    */
>>
>>   #define __ASSEMBLY__
>>
>>   FIT
>>   BOOT_FROM      sd
>> -SIGNED_HDMI    signed_hdmi_imx8m.bin
>> -LOADER         spl/u-boot-spl-ddr.bin  0x7E1000
>> -SECOND_LOADER  u-boot.itb              0x40200000 0x60000
>> -
>> -DDR_FW lpddr4_pmu_train_1d_imem.bin
>> -DDR_FW lpddr4_pmu_train_1d_dmem.bin
>> -DDR_FW lpddr4_pmu_train_2d_imem.bin
>> -DDR_FW lpddr4_pmu_train_2d_dmem.bin
>> +SIGNED_HDMI    signed_hdmi.bin
>> +LOADER         mkimage.flash.mkimage   0x7e1000
> 
> This file is only a temporarily created file by binman. You should use
> the output file .. here it should be flash.bin.
> 
> But as Patrick already pointed out, we should create the final
> flash.bin like before. I also have a patch for adding a new im8mq
> board pending that has this already implemented.[1].

Thanks, I'll check and rework the patchset.

Thanks,
Peng.

> 
> [1] https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20211014180824.10681-2-heiko.thiery%40gmail.com%2F&amp;data=04%7C01%7Cpeng.fan%40nxp.com%7C080150fe94714852252808d9a537b028%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637722480863078675%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Yqxm1zT0476ZVGrAMgBzKAUevZRAO2fI4LC5b3C6%2BMg%3D&amp;reserved=0
> 
>> diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
>> index a7c49744b3..c4d20ad7c7 100644
>> --- a/board/freescale/imx8mq_evk/Kconfig
>> +++ b/board/freescale/imx8mq_evk/Kconfig
>> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>>          default "imx8mq_evk"
>>
>>   config IMX_CONFIG
>> -       default "board/freescale/imx8mq_evk/imximage.cfg"
>> +       default "arch/arm/mach-imx/imx8m/imximage.cfg"
>>
>>   endif
>> diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
>> deleted file mode 100644
>> index 74f12b30d2..0000000000
>> --- a/board/freescale/imx8mq_evk/imximage.cfg
>> +++ /dev/null
>> @@ -1,11 +0,0 @@
>> -/* SPDX-License-Identifier: GPL-2.0+ */
>> -/*
>> - * Copyright 2021 NXP
>> - */
>> -
>> -#define __ASSEMBLY__
>> -
>> -FIT
>> -BOOT_FROM      sd
>> -SIGNED_HDMI    signed_hdmi.bin
>> -LOADER         mkimage.flash.mkimage   0x7e1000
>> diff --git a/board/google/imx8mq_phanbell/Kconfig b/board/google/imx8mq_phanbell/Kconfig
>> index e59b03cb17..54cfb99952 100644
>> --- a/board/google/imx8mq_phanbell/Kconfig
>> +++ b/board/google/imx8mq_phanbell/Kconfig
>> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>>          default "imx8mq_phanbell"
>>
>>   config IMX_CONFIG
>> -       default "board/google/imx8mq_phanbell/imximage.cfg"
>> +       default "arch/arm/mach-imx/imx8m/imximage.cfg"
>>
>>   endif
>> diff --git a/board/google/imx8mq_phanbell/imximage.cfg b/board/google/imx8mq_phanbell/imximage.cfg
>> deleted file mode 100644
>> index 74f12b30d2..0000000000
>> --- a/board/google/imx8mq_phanbell/imximage.cfg
>> +++ /dev/null
>> @@ -1,11 +0,0 @@
>> -/* SPDX-License-Identifier: GPL-2.0+ */
>> -/*
>> - * Copyright 2021 NXP
>> - */
>> -
>> -#define __ASSEMBLY__
>> -
>> -FIT
>> -BOOT_FROM      sd
>> -SIGNED_HDMI    signed_hdmi.bin
>> -LOADER         mkimage.flash.mkimage   0x7e1000
>> diff --git a/board/technexion/pico-imx8mq/Kconfig b/board/technexion/pico-imx8mq/Kconfig
>> index 97655517d8..628b051149 100644
>> --- a/board/technexion/pico-imx8mq/Kconfig
>> +++ b/board/technexion/pico-imx8mq/Kconfig
>> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>>          default "pico-imx8mq"
>>
>>   config IMX_CONFIG
>> -       default "board/technexion/pico-imx8mq/imximage.cfg"
>> +       default "arch/arm/mach-imx/imx8m/imximage.cfg"
>>
>>   endif
>> diff --git a/board/technexion/pico-imx8mq/imximage.cfg b/board/technexion/pico-imx8mq/imximage.cfg
>> deleted file mode 100644
>> index 74f12b30d2..0000000000
>> --- a/board/technexion/pico-imx8mq/imximage.cfg
>> +++ /dev/null
>> @@ -1,11 +0,0 @@
>> -/* SPDX-License-Identifier: GPL-2.0+ */
>> -/*
>> - * Copyright 2021 NXP
>> - */
>> -
>> -#define __ASSEMBLY__
>> -
>> -FIT
>> -BOOT_FROM      sd
>> -SIGNED_HDMI    signed_hdmi.bin
>> -LOADER         mkimage.flash.mkimage   0x7e1000
>> --
>> 2.30.0
>>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 1/5] imx: imx8mq_evk: switch to binman
  2021-11-11 14:41   ` Patrick Wildt
@ 2021-11-22  8:58     ` Peng Fan (OSS)
  0 siblings, 0 replies; 21+ messages in thread
From: Peng Fan (OSS) @ 2021-11-22  8:58 UTC (permalink / raw)
  To: Patrick Wildt; +Cc: sbabic, festevam, u-boot, dl-uboot-imx, Peng Fan



On 2021/11/11 22:41, Patrick Wildt wrote:
> On Fri, Oct 22, 2021 at 10:42:16AM +0800, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> Switch to use binman to pack images
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> 
> I'm unsure how to reply to this.  On the one hand I really like to see
> this go in, on the other hand this changes the expectation of what
> flash.bin is.  We had the same discussion for i.MX8MM.
> 
> Because historically, flash.bin is SPL+U-Boot.itb, and for i.MX8MM
> people have changed the binman config to generate a single bootable
> file again: 028abfd9b1576b45cf756b9a0c978cfe17906314
> 
> So, I would ask you to adjust the imx8mq-u-boot.dts changes in the same
> way as done for i.MX8MM.  You should be able to see the differences
> by diffing e.g. these files:

ok, thanks for pointing this to me, I'll modify the file to output a
single flash.bin as i.MX8MM.

THanks,
Peng.

> 
> diff -u arch/arm/dts/imx8mq-u-boot.dtsi arch/arm/dts/imx8mm-evk-u-boot.dtsi
> 
>> ---
>>   arch/arm/dts/imx8mq-evk-u-boot.dtsi     |   2 +
>>   arch/arm/dts/imx8mq-u-boot.dtsi         | 122 ++++++++++++++++++++++++
>>   arch/arm/mach-imx/imx8m/Kconfig         |   1 +
>>   board/freescale/imx8mq_evk/Kconfig      |   2 +-
>>   board/freescale/imx8mq_evk/imximage.cfg |  11 +++
>>   configs/imx8mq_evk_defconfig            |   2 +-
>>   6 files changed, 138 insertions(+), 2 deletions(-)
>>   create mode 100644 arch/arm/dts/imx8mq-u-boot.dtsi
>>   create mode 100644 board/freescale/imx8mq_evk/imximage.cfg
>>
>> diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
>> index 2cfc12b7e0..6f9c81462e 100644
>> --- a/arch/arm/dts/imx8mq-evk-u-boot.dtsi
>> +++ b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
>> @@ -1,5 +1,7 @@
>>   // SPDX-License-Identifier: (GPL-2.0 OR MIT)
>>   
>> +#include "imx8mq-u-boot.dtsi"
>> +
>>   &usdhc1 {
>>   	mmc-hs400-1_8v;
>>   };
>> diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi
>> new file mode 100644
>> index 0000000000..2c10e9b645
>> --- /dev/null
>> +++ b/arch/arm/dts/imx8mq-u-boot.dtsi
>> @@ -0,0 +1,122 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>> +/*
>> + * Copyright 2021 NXP
>> + */
>> +
>> +/ {
>> +	binman: binman {
>> +		multiple-images;
>> +	};
>> +
>> +};
>> +
>> +&binman {
>> +	u-boot-spl-ddr {
>> +		filename = "u-boot-spl-ddr.bin";
>> +		pad-byte = <0xff>;
>> +		align-size = <4>;
>> +		align = <4>;
>> +
>> +		u-boot-spl {
>> +			align-end = <4>;
>> +		};
>> +
>> +		blob_1: blob-ext@1 {
>> +			filename = "lpddr4_pmu_train_1d_imem.bin";
>> +			size = <0x8000>;
>> +		};
>> +
>> +		blob_2: blob-ext@2 {
>> +			filename = "lpddr4_pmu_train_1d_dmem.bin";
>> +			size = <0x4000>;
>> +		};
>> +
>> +		blob_3: blob-ext@3 {
>> +			filename = "lpddr4_pmu_train_2d_imem.bin";
>> +			size = <0x8000>;
>> +		};
>> +
>> +		blob_4: blob-ext@4 {
>> +			filename = "lpddr4_pmu_train_2d_dmem.bin";
>> +			size = <0x4000>;
>> +		};
>> +	};
>> +
>> +	signed_hdmi {
>> +		filename = "signed_hdmi.bin";
>> +
>> +		blob_5: blob-ext@5 {
>> +			filename = "signed_hdmi_imx8m.bin";
>> +		};
>> +	};
>> +
>> +	flash {
>> +		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 {
>> +			description = "Configuration to load ATF before U-Boot";
>> +			#address-cells = <1>;
>> +			fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
>> +
>> +			images {
>> +				uboot {
>> +					description = "U-Boot (64-bit)";
>> +					type = "standalone";
>> +					arch = "arm64";
>> +					compression = "none";
>> +					load = <CONFIG_SYS_TEXT_BASE>;
>> +
>> +					uboot_blob: blob-ext {
>> +						filename = "u-boot-nodtb.bin";
>> +					};
>> +				};
>> +
>> +				atf {
>> +					description = "ARM Trusted Firmware";
>> +					type = "firmware";
>> +					arch = "arm64";
>> +					compression = "none";
>> +					load = <0x910000>;
>> +					entry = <0x910000>;
>> +
>> +					atf_blob: blob-ext {
>> +						filename = "bl31.bin";
>> +					};
>> +				};
>> +
>> +				fdt {
>> +					description = "NAME";
>> +					type = "flat_dt";
>> +					compression = "none";
>> +
>> +					uboot_fdt_blob: blob-ext {
>> +						filename = "u-boot.dtb";
>> +					};
>> +				};
>> +			};
>> +
>> +			configurations {
>> +				default = "conf";
>> +
>> +				conf {
>> +					description = "NAME";
>> +					firmware = "uboot";
>> +					loadables = "atf";
>> +					fdt = "fdt";
>> +				};
>> +			};
>> +		};
>> +	};
>> +};
>> diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
>> index 276b8bd974..c556e712b7 100644
>> --- a/arch/arm/mach-imx/imx8m/Kconfig
>> +++ b/arch/arm/mach-imx/imx8m/Kconfig
>> @@ -36,6 +36,7 @@ config TARGET_IMX8MQ_CM
>>   
>>   config TARGET_IMX8MQ_EVK
>>   	bool "imx8mq_evk"
>> +	select BINMAN
>>   	select IMX8MQ
>>   	select IMX8M_LPDDR4
>>   
>> diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
>> index c4d20ad7c7..a7c49744b3 100644
>> --- a/board/freescale/imx8mq_evk/Kconfig
>> +++ b/board/freescale/imx8mq_evk/Kconfig
>> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>>   	default "imx8mq_evk"
>>   
>>   config IMX_CONFIG
>> -	default "arch/arm/mach-imx/imx8m/imximage.cfg"
>> +	default "board/freescale/imx8mq_evk/imximage.cfg"
>>   
>>   endif
>> diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
>> new file mode 100644
>> index 0000000000..74f12b30d2
>> --- /dev/null
>> +++ b/board/freescale/imx8mq_evk/imximage.cfg
>> @@ -0,0 +1,11 @@
>> +/* SPDX-License-Identifier: GPL-2.0+ */
>> +/*
>> + * Copyright 2021 NXP
>> + */
>> +
>> +#define __ASSEMBLY__
>> +
>> +FIT
>> +BOOT_FROM	sd
>> +SIGNED_HDMI	signed_hdmi.bin
>> +LOADER		mkimage.flash.mkimage	0x7e1000
>> diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
>> index 62fe6f1523..5970d8c164 100644
>> --- a/configs/imx8mq_evk_defconfig
>> +++ b/configs/imx8mq_evk_defconfig
>> @@ -18,7 +18,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
>>   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_BOARD_EARLY_INIT_F=y
>>   CONFIG_BOARD_LATE_INIT=y
>>   CONFIG_SPL_BOARD_INIT=y
>> -- 
>> 2.30.0
>>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 1/5] imx: imx8mq_evk: switch to binman
  2021-11-11 17:24   ` Heiko Thiery
@ 2021-11-22  8:59     ` Peng Fan (OSS)
  0 siblings, 0 replies; 21+ messages in thread
From: Peng Fan (OSS) @ 2021-11-22  8:59 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: sbabic, festevam, u-boot, dl-uboot-imx, Peng Fan



On 2021/11/12 1:24, Heiko Thiery wrote:
> Hi Peng,
> 
> Am Fr., 22. Okt. 2021 um 04:07 Uhr schrieb Peng Fan (OSS)
> <peng.fan@oss.nxp.com>:
>>
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> Switch to use binman to pack images
> 
> After switching to binman you will hit the same issue I have in the
> u-boot CI. The mkimage step will fail because the hdmi firmware blob
> can not be found [1]. There is already a discuusion ongoing how to fix
> that [2].

It should not. I not met failure before, let me try again.

Thanks,
Peng.

> 
> [1] https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.denx.de%2Fpipermail%2Fu-boot%2F2021-October%2F464338.html&amp;data=04%7C01%7Cpeng.fan%40nxp.com%7C801faca45846458ee4a908d9a5383734%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637722483129948474%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=KOwwQdaUvADXP5PEoniPUrcJ8tfsqb4wBF1KnfZmYqA%3D&amp;reserved=0
> [2] https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.denx.de%2Fpipermail%2Fu-boot%2F2021-November%2F466181.html&amp;data=04%7C01%7Cpeng.fan%40nxp.com%7C801faca45846458ee4a908d9a5383734%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637722483129948474%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=hLEvWAvxTEHffELh1cTIgILUm%2FsDbZFO86L0lP1WWGk%3D&amp;reserved=0
> 
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>>   arch/arm/dts/imx8mq-evk-u-boot.dtsi     |   2 +
>>   arch/arm/dts/imx8mq-u-boot.dtsi         | 122 ++++++++++++++++++++++++
>>   arch/arm/mach-imx/imx8m/Kconfig         |   1 +
>>   board/freescale/imx8mq_evk/Kconfig      |   2 +-
>>   board/freescale/imx8mq_evk/imximage.cfg |  11 +++
>>   configs/imx8mq_evk_defconfig            |   2 +-
>>   6 files changed, 138 insertions(+), 2 deletions(-)
>>   create mode 100644 arch/arm/dts/imx8mq-u-boot.dtsi
>>   create mode 100644 board/freescale/imx8mq_evk/imximage.cfg
>>
>> diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
>> index 2cfc12b7e0..6f9c81462e 100644
>> --- a/arch/arm/dts/imx8mq-evk-u-boot.dtsi
>> +++ b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
>> @@ -1,5 +1,7 @@
>>   // SPDX-License-Identifier: (GPL-2.0 OR MIT)
>>
>> +#include "imx8mq-u-boot.dtsi"
>> +
>>   &usdhc1 {
>>          mmc-hs400-1_8v;
>>   };
>> diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi
>> new file mode 100644
>> index 0000000000..2c10e9b645
>> --- /dev/null
>> +++ b/arch/arm/dts/imx8mq-u-boot.dtsi
>> @@ -0,0 +1,122 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>> +/*
>> + * Copyright 2021 NXP
>> + */
>> +
>> +/ {
>> +       binman: binman {
>> +               multiple-images;
>> +       };
>> +
>> +};
>> +
>> +&binman {
>> +       u-boot-spl-ddr {
>> +               filename = "u-boot-spl-ddr.bin";
>> +               pad-byte = <0xff>;
>> +               align-size = <4>;
>> +               align = <4>;
>> +
>> +               u-boot-spl {
>> +                       align-end = <4>;
>> +               };
>> +
>> +               blob_1: blob-ext@1 {
>> +                       filename = "lpddr4_pmu_train_1d_imem.bin";
>> +                       size = <0x8000>;
>> +               };
>> +
>> +               blob_2: blob-ext@2 {
>> +                       filename = "lpddr4_pmu_train_1d_dmem.bin";
>> +                       size = <0x4000>;
>> +               };
>> +
>> +               blob_3: blob-ext@3 {
>> +                       filename = "lpddr4_pmu_train_2d_imem.bin";
>> +                       size = <0x8000>;
>> +               };
>> +
>> +               blob_4: blob-ext@4 {
>> +                       filename = "lpddr4_pmu_train_2d_dmem.bin";
>> +                       size = <0x4000>;
>> +               };
>> +       };
>> +
>> +       signed_hdmi {
>> +               filename = "signed_hdmi.bin";
>> +
>> +               blob_5: blob-ext@5 {
>> +                       filename = "signed_hdmi_imx8m.bin";
>> +               };
>> +       };
>> +
>> +       flash {
>> +               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 {
>> +                       description = "Configuration to load ATF before U-Boot";
>> +                       #address-cells = <1>;
>> +                       fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
>> +
>> +                       images {
>> +                               uboot {
>> +                                       description = "U-Boot (64-bit)";
>> +                                       type = "standalone";
>> +                                       arch = "arm64";
>> +                                       compression = "none";
>> +                                       load = <CONFIG_SYS_TEXT_BASE>;
>> +
>> +                                       uboot_blob: blob-ext {
>> +                                               filename = "u-boot-nodtb.bin";
>> +                                       };
>> +                               };
>> +
>> +                               atf {
>> +                                       description = "ARM Trusted Firmware";
>> +                                       type = "firmware";
>> +                                       arch = "arm64";
>> +                                       compression = "none";
>> +                                       load = <0x910000>;
>> +                                       entry = <0x910000>;
>> +
>> +                                       atf_blob: blob-ext {
>> +                                               filename = "bl31.bin";
>> +                                       };
>> +                               };
>> +
>> +                               fdt {
>> +                                       description = "NAME";
>> +                                       type = "flat_dt";
>> +                                       compression = "none";
>> +
>> +                                       uboot_fdt_blob: blob-ext {
>> +                                               filename = "u-boot.dtb";
>> +                                       };
>> +                               };
>> +                       };
>> +
>> +                       configurations {
>> +                               default = "conf";
>> +
>> +                               conf {
>> +                                       description = "NAME";
>> +                                       firmware = "uboot";
>> +                                       loadables = "atf";
>> +                                       fdt = "fdt";
>> +                               };
>> +                       };
>> +               };
>> +       };
>> +};
>> diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
>> index 276b8bd974..c556e712b7 100644
>> --- a/arch/arm/mach-imx/imx8m/Kconfig
>> +++ b/arch/arm/mach-imx/imx8m/Kconfig
>> @@ -36,6 +36,7 @@ config TARGET_IMX8MQ_CM
>>
>>   config TARGET_IMX8MQ_EVK
>>          bool "imx8mq_evk"
>> +       select BINMAN
>>          select IMX8MQ
>>          select IMX8M_LPDDR4
>>
>> diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
>> index c4d20ad7c7..a7c49744b3 100644
>> --- a/board/freescale/imx8mq_evk/Kconfig
>> +++ b/board/freescale/imx8mq_evk/Kconfig
>> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>>          default "imx8mq_evk"
>>
>>   config IMX_CONFIG
>> -       default "arch/arm/mach-imx/imx8m/imximage.cfg"
>> +       default "board/freescale/imx8mq_evk/imximage.cfg"
>>
>>   endif
>> diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
>> new file mode 100644
>> index 0000000000..74f12b30d2
>> --- /dev/null
>> +++ b/board/freescale/imx8mq_evk/imximage.cfg
>> @@ -0,0 +1,11 @@
>> +/* SPDX-License-Identifier: GPL-2.0+ */
>> +/*
>> + * Copyright 2021 NXP
>> + */
>> +
>> +#define __ASSEMBLY__
>> +
>> +FIT
>> +BOOT_FROM      sd
>> +SIGNED_HDMI    signed_hdmi.bin
>> +LOADER         mkimage.flash.mkimage   0x7e1000
>> diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
>> index 62fe6f1523..5970d8c164 100644
>> --- a/configs/imx8mq_evk_defconfig
>> +++ b/configs/imx8mq_evk_defconfig
>> @@ -18,7 +18,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
>>   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_BOARD_EARLY_INIT_F=y
>>   CONFIG_BOARD_LATE_INIT=y
>>   CONFIG_SPL_BOARD_INIT=y
>> --
>> 2.30.0
>>
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 1/5] imx: imx8mq_evk: switch to binman
  2021-10-22  2:42 ` [PATCH V3 1/5] imx: imx8mq_evk: " Peng Fan (OSS)
  2021-11-11 14:41   ` Patrick Wildt
  2021-11-11 17:24   ` Heiko Thiery
@ 2022-01-08  2:08   ` Tom Rini
  2 siblings, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-08  2:08 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

On Fri, Oct 22, 2021 at 10:42:16AM +0800, Peng Fan (OSS) wrote:

> From: Peng Fan <peng.fan@nxp.com>
> 
> Switch to use binman to pack images
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 2/5] imx: imx8mq_phanbell: switch to binman
  2021-10-22  2:42 ` [PATCH V3 2/5] imx: imx8mq_phanbell: " Peng Fan (OSS)
  2021-11-11 14:45   ` Patrick Wildt
@ 2022-01-08  2:08   ` Tom Rini
  1 sibling, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-08  2:08 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

On Fri, Oct 22, 2021 at 10:42:17AM +0800, Peng Fan (OSS) wrote:

> From: Peng Fan <peng.fan@nxp.com>
> 
> Switch to binman to pack images
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Reviewed-by: Patrick Wildt <patrick@blueri.se>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 3/5] imx: pico-imx8mq: switch to use binman
  2021-10-22  2:42 ` [PATCH V3 3/5] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
  2021-11-11 14:46   ` Patrick Wildt
@ 2022-01-08  2:08   ` Tom Rini
  1 sibling, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-08  2:08 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

On Fri, Oct 22, 2021 at 10:42:18AM +0800, Peng Fan (OSS) wrote:

> From: Peng Fan <peng.fan@nxp.com>
> 
> Switch to use binman to pack images
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Reviewed-by: Patrick Wildt <patrick@blueri.se>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 4/5] imx: imx8mq use common imximage.cfg
  2021-10-22  2:42 ` [PATCH V3 4/5] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
  2021-11-11 14:46   ` Patrick Wildt
  2021-11-11 17:21   ` Heiko Thiery
@ 2022-01-08  2:08   ` Tom Rini
  2 siblings, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-08  2:08 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

On Fri, Oct 22, 2021 at 10:42:19AM +0800, Peng Fan (OSS) wrote:

> From: Peng Fan <peng.fan@nxp.com>
> 
> After all these board switch to binman, we could use common imximage.cfg
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Reviewed-by: Patrick Wildt <patrick@blueri.se>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH V3 5/5] doc: imx8mq_evk: update doc after using binman
  2021-10-22  2:42 ` [PATCH V3 5/5] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)
  2021-11-11 14:47   ` Patrick Wildt
@ 2022-01-08  2:08   ` Tom Rini
  1 sibling, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-08  2:08 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, u-boot, uboot-imx, Peng Fan

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

On Fri, Oct 22, 2021 at 10:42:20AM +0800, Peng Fan (OSS) wrote:

> From: Peng Fan <peng.fan@nxp.com>
> 
> Update doc after using binman to pack images
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2022-01-08  2:10 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22  2:42 [PATCH V3 0/5] imx8mq: switch to binman Peng Fan (OSS)
2021-10-22  2:42 ` [PATCH V3 1/5] imx: imx8mq_evk: " Peng Fan (OSS)
2021-11-11 14:41   ` Patrick Wildt
2021-11-22  8:58     ` Peng Fan (OSS)
2021-11-11 17:24   ` Heiko Thiery
2021-11-22  8:59     ` Peng Fan (OSS)
2022-01-08  2:08   ` Tom Rini
2021-10-22  2:42 ` [PATCH V3 2/5] imx: imx8mq_phanbell: " Peng Fan (OSS)
2021-11-11 14:45   ` Patrick Wildt
2022-01-08  2:08   ` Tom Rini
2021-10-22  2:42 ` [PATCH V3 3/5] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
2021-11-11 14:46   ` Patrick Wildt
2022-01-08  2:08   ` Tom Rini
2021-10-22  2:42 ` [PATCH V3 4/5] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
2021-11-11 14:46   ` Patrick Wildt
2021-11-11 17:21   ` Heiko Thiery
2021-11-22  8:56     ` Peng Fan (OSS)
2022-01-08  2:08   ` Tom Rini
2021-10-22  2:42 ` [PATCH V3 5/5] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)
2021-11-11 14:47   ` Patrick Wildt
2022-01-08  2:08   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.