All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/7] imx8mq: switch to binman
@ 2021-10-08  4:05 Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 1/7] tools: imx8mimage: not abort when mmap fail Peng Fan (OSS)
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-10-08  4:05 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

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

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

Peng Fan (7):
  tools: imx8mimage: not abort when mmap fail
  imx: imx8mq_evk: switch to binman
  imx: imx8mq_phanbell: switch to binman
  imx: pico-imx8mq: switch to use binman
  imx: makefile: drop the use of imx8mimage.sh
  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/Makefile               |  13 +--
 arch/arm/mach-imx/imx8m/Kconfig          |   9 +-
 arch/arm/mach-imx/imx8m/imximage.cfg     |  12 +--
 configs/imx8mq_evk_defconfig             |   3 +-
 configs/imx8mq_phanbell_defconfig        |   3 +-
 configs/pico-imx8mq_defconfig            |   3 +-
 doc/board/nxp/imx8mq_evk.rst             |   3 +-
 tools/imx8mimage.c                       |   3 +-
 12 files changed, 153 insertions(+), 23 deletions(-)
 create mode 100644 arch/arm/dts/imx8mq-u-boot.dtsi

-- 
2.30.0


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

* [PATCH V2 1/7] tools: imx8mimage: not abort when mmap fail
  2021-10-08  4:05 [PATCH V2 0/7] imx8mq: switch to binman Peng Fan (OSS)
@ 2021-10-08  4:05 ` Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 2/7] imx: imx8mq_evk: switch to binman Peng Fan (OSS)
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-10-08  4:05 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

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

When creating flash.bin, the hdmi firmware might not be
copied to U-Boot source tree. Then mkimage will fail.
However we are switching to binman, binman will show the
message if the file not there, and create empty file per
i.MX8MQ binman node. So we not fail mkimage here othersize
CI will fail if hdmi firmware not copied here.

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

diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c
index 11e40ccd94..4eed683396 100644
--- a/tools/imx8mimage.c
+++ b/tools/imx8mimage.c
@@ -271,7 +271,7 @@ static void copy_file(int ifd, const char *datafile, int pad, int offset,
 	if (ptr == MAP_FAILED) {
 		fprintf(stderr, "Can't read %s: %s\n",
 			datafile, strerror(errno));
-		exit(EXIT_FAILURE);
+		goto err_mmap;
 	}
 
 	size = sbuf.st_size - datafile_offset;
@@ -311,6 +311,7 @@ static void copy_file(int ifd, const char *datafile, int pad, int offset,
 	}
 
 	munmap((void *)ptr, sbuf.st_size);
+err_mmap:
 	close(dfd);
 }
 
-- 
2.30.0


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

* [PATCH V2 2/7] imx: imx8mq_evk: switch to binman
  2021-10-08  4:05 [PATCH V2 0/7] imx8mq: switch to binman Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 1/7] tools: imx8mimage: not abort when mmap fail Peng Fan (OSS)
@ 2021-10-08  4:05 ` Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 3/7] imx: imx8mq_phanbell: " Peng Fan (OSS)
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-10-08  4:05 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/imximage.cfg |  11 +++
 configs/imx8mq_evk_defconfig            |   3 +-
 5 files changed, 138 insertions(+), 1 deletion(-)
 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 ccaf106be5..ef3e4b209f 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/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..4e74c6f235 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -18,7 +18,8 @@ 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_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx8mq_evk/imximage.cfg"
 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] 9+ messages in thread

* [PATCH V2 3/7] imx: imx8mq_phanbell: switch to binman
  2021-10-08  4:05 [PATCH V2 0/7] imx8mq: switch to binman Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 1/7] tools: imx8mimage: not abort when mmap fail Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 2/7] imx: imx8mq_evk: switch to binman Peng Fan (OSS)
@ 2021-10-08  4:05 ` Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 4/7] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-10-08  4:05 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/imximage.cfg | 11 +++++++++++
 configs/imx8mq_phanbell_defconfig         |  3 ++-
 4 files changed, 19 insertions(+), 4 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 ef3e4b209f..16c950fcfe 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/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..24922ce2e0 100644
--- a/configs/imx8mq_phanbell_defconfig
+++ b/configs/imx8mq_phanbell_defconfig
@@ -18,7 +18,8 @@ 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_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/google/imx8mq_phanbell/imximage.cfg"
 CONFIG_SD_BOOT=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_BOARD_INIT=y
-- 
2.30.0


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

* [PATCH V2 4/7] imx: pico-imx8mq: switch to use binman
  2021-10-08  4:05 [PATCH V2 0/7] imx8mq: switch to binman Peng Fan (OSS)
                   ` (2 preceding siblings ...)
  2021-10-08  4:05 ` [PATCH V2 3/7] imx: imx8mq_phanbell: " Peng Fan (OSS)
@ 2021-10-08  4:05 ` Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 5/7] imx: makefile: drop the use of imx8mimage.sh Peng Fan (OSS)
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-10-08  4:05 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/imximage.cfg | 11 +++++++++++
 configs/pico-imx8mq_defconfig             |  3 ++-
 4 files changed, 15 insertions(+), 1 deletion(-)
 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 16c950fcfe..1d08a2977f 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -100,6 +100,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/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..c510b0b7cb 100644
--- a/configs/pico-imx8mq_defconfig
+++ b/configs/pico-imx8mq_defconfig
@@ -17,7 +17,8 @@ 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_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/technexion/pico-imx8mq/imximage.cfg"
 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] 9+ messages in thread

* [PATCH V2 5/7] imx: makefile: drop the use of imx8mimage.sh
  2021-10-08  4:05 [PATCH V2 0/7] imx8mq: switch to binman Peng Fan (OSS)
                   ` (3 preceding siblings ...)
  2021-10-08  4:05 ` [PATCH V2 4/7] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
@ 2021-10-08  4:05 ` Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 6/7] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
  2021-10-08  4:05 ` [PATCH V2 7/7] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)
  6 siblings, 0 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-10-08  4:05 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

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

After switch to use binman, no need to use the bash script
to check file exsiting or not. And there is bug that
the script will be executed everytime Makefile is used which is
confusing people.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/mach-imx/Makefile | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 63e28c635e..bfff79f88c 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -114,8 +114,7 @@ endif
 DEPFILE_EXISTS := $(shell $(CPP) $(cpp_flags) -x c -o u-boot-dtb.cfgout $(srctree)/$(IMX_CONFIG); if [ -f u-boot-dtb.cfgout ]; then $(CNTR_DEPFILES) u-boot-dtb.cfgout; echo $$?; fi)
 else ifeq ($(CONFIG_ARCH_IMX8M), y)
 IMAGE_TYPE := imx8mimage
-IMX8M_DEPFILES := $(srctree)/tools/imx8m_image.sh
-DEPFILE_EXISTS := $(shell $(CPP) $(cpp_flags) -x c -o spl/u-boot-spl.cfgout $(srctree)/$(IMX_CONFIG);if [ -f spl/u-boot-spl.cfgout ]; then $(IMX8M_DEPFILES) spl/u-boot-spl.cfgout 0; echo $$?; fi)
+DEPFILE_EXISTS := 0
 else
 IMAGE_TYPE := imximage
 DEPFILE_EXISTS := 0
@@ -150,16 +149,18 @@ endif
 
 ifdef CONFIG_ARM64
 ifeq ($(CONFIG_ARCH_IMX8M), y)
-SPL:
+
+SPL: spl/u-boot-spl.bin spl/u-boot-spl.cfgout FORCE
 
 MKIMAGEFLAGS_flash.bin = -n spl/u-boot-spl.cfgout \
 		   -T $(IMAGE_TYPE) -e $(CONFIG_SPL_TEXT_BASE)
 flash.bin: MKIMAGEOUTPUT = flash.log
 
+spl/u-boot-spl.cfgout: $(IMX_CONFIG) FORCE
+	$(Q)mkdir -p $(dir $@)
+	$(call if_changed_dep,cpp_cfg)
+
 spl/u-boot-spl-ddr.bin: spl/u-boot-spl.bin spl/u-boot-spl.cfgout FORCE
-ifeq ($(DEPFILE_EXISTS),0)
-	$(IMX8M_DEPFILES) spl/u-boot-spl.cfgout 1
-endif
 
 flash.bin: spl/u-boot-spl-ddr.bin u-boot.itb FORCE
 	$(call if_changed,mkimage)
-- 
2.30.0


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

* [PATCH V2 6/7] imx: imx8mq use common imximage.cfg
  2021-10-08  4:05 [PATCH V2 0/7] imx8mq: switch to binman Peng Fan (OSS)
                   ` (4 preceding siblings ...)
  2021-10-08  4:05 ` [PATCH V2 5/7] imx: makefile: drop the use of imx8mimage.sh Peng Fan (OSS)
@ 2021-10-08  4:05 ` Peng Fan (OSS)
  2021-10-21 10:37   ` Stefano Babic
  2021-10-08  4:05 ` [PATCH V2 7/7] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)
  6 siblings, 1 reply; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-10-08  4:05 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/imximage.cfg   | 11 -----------
 board/google/imx8mq_phanbell/imximage.cfg | 11 -----------
 board/technexion/pico-imx8mq/imximage.cfg | 11 -----------
 configs/imx8mq_evk_defconfig              |  2 +-
 configs/imx8mq_phanbell_defconfig         |  2 +-
 configs/pico-imx8mq_defconfig             |  2 +-
 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/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/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/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
diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
index 4e74c6f235..412d05e41a 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -19,7 +19,7 @@ CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
 CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx8mq_evk/imximage.cfg"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg"
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_LATE_INIT=y
 CONFIG_SPL_BOARD_INIT=y
diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig
index 24922ce2e0..3a6e428617 100644
--- a/configs/imx8mq_phanbell_defconfig
+++ b/configs/imx8mq_phanbell_defconfig
@@ -19,7 +19,7 @@ CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
 CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/google/imx8mq_phanbell/imximage.cfg"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg"
 CONFIG_SD_BOOT=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_BOARD_INIT=y
diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig
index c510b0b7cb..3db75826c1 100644
--- a/configs/pico-imx8mq_defconfig
+++ b/configs/pico-imx8mq_defconfig
@@ -18,7 +18,7 @@ CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
 CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/technexion/pico-imx8mq/imximage.cfg"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg"
 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] 9+ messages in thread

* [PATCH V2 7/7] doc: imx8mq_evk: update doc after using binman
  2021-10-08  4:05 [PATCH V2 0/7] imx8mq: switch to binman Peng Fan (OSS)
                   ` (5 preceding siblings ...)
  2021-10-08  4:05 ` [PATCH V2 6/7] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
@ 2021-10-08  4:05 ` Peng Fan (OSS)
  6 siblings, 0 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-10-08  4:05 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] 9+ messages in thread

* Re: [PATCH V2 6/7] imx: imx8mq use common imximage.cfg
  2021-10-08  4:05 ` [PATCH V2 6/7] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
@ 2021-10-21 10:37   ` Stefano Babic
  0 siblings, 0 replies; 9+ messages in thread
From: Stefano Babic @ 2021-10-21 10:37 UTC (permalink / raw)
  To: Peng Fan (OSS), sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

Hi Peng,

On 08.10.21 06:05, 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>
> ---
>   arch/arm/mach-imx/imx8m/imximage.cfg      | 12 +++---------
>   board/freescale/imx8mq_evk/imximage.cfg   | 11 -----------
>   board/google/imx8mq_phanbell/imximage.cfg | 11 -----------
>   board/technexion/pico-imx8mq/imximage.cfg | 11 -----------
>   configs/imx8mq_evk_defconfig              |  2 +-
>   configs/imx8mq_phanbell_defconfig         |  2 +-
>   configs/pico-imx8mq_defconfig             |  2 +-
>   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/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/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/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
> diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
> index 4e74c6f235..412d05e41a 100644
> --- a/configs/imx8mq_evk_defconfig
> +++ b/configs/imx8mq_evk_defconfig
> @@ -19,7 +19,7 @@ CONFIG_FIT=y
>   CONFIG_FIT_EXTERNAL_OFFSET=0x3000
>   CONFIG_SPL_LOAD_FIT=y
>   # CONFIG_USE_SPL_FIT_GENERATOR is not set
> -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx8mq_evk/imximage.cfg"
> +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg"

Have we not switched to CONFIG_IMX_CONFIG ?

Regards,
Stefano

>   CONFIG_BOARD_EARLY_INIT_F=y
>   CONFIG_BOARD_LATE_INIT=y
>   CONFIG_SPL_BOARD_INIT=y
> diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig
> index 24922ce2e0..3a6e428617 100644
> --- a/configs/imx8mq_phanbell_defconfig
> +++ b/configs/imx8mq_phanbell_defconfig
> @@ -19,7 +19,7 @@ CONFIG_FIT=y
>   CONFIG_FIT_EXTERNAL_OFFSET=0x3000
>   CONFIG_SPL_LOAD_FIT=y
>   # CONFIG_USE_SPL_FIT_GENERATOR is not set
> -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/google/imx8mq_phanbell/imximage.cfg"
> +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg"
>   CONFIG_SD_BOOT=y
>   CONFIG_BOARD_EARLY_INIT_F=y
>   CONFIG_SPL_BOARD_INIT=y
> diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig
> index c510b0b7cb..3db75826c1 100644
> --- a/configs/pico-imx8mq_defconfig
> +++ b/configs/pico-imx8mq_defconfig
> @@ -18,7 +18,7 @@ CONFIG_FIT=y
>   CONFIG_FIT_EXTERNAL_OFFSET=0x3000
>   CONFIG_SPL_LOAD_FIT=y
>   # CONFIG_USE_SPL_FIT_GENERATOR is not set
> -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/technexion/pico-imx8mq/imximage.cfg"
> +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg"
>   CONFIG_BOARD_EARLY_INIT_F=y
>   CONFIG_BOARD_LATE_INIT=y
>   CONFIG_SPL_BOARD_INIT=y
> 


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

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

end of thread, other threads:[~2021-10-21 10:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  4:05 [PATCH V2 0/7] imx8mq: switch to binman Peng Fan (OSS)
2021-10-08  4:05 ` [PATCH V2 1/7] tools: imx8mimage: not abort when mmap fail Peng Fan (OSS)
2021-10-08  4:05 ` [PATCH V2 2/7] imx: imx8mq_evk: switch to binman Peng Fan (OSS)
2021-10-08  4:05 ` [PATCH V2 3/7] imx: imx8mq_phanbell: " Peng Fan (OSS)
2021-10-08  4:05 ` [PATCH V2 4/7] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
2021-10-08  4:05 ` [PATCH V2 5/7] imx: makefile: drop the use of imx8mimage.sh Peng Fan (OSS)
2021-10-08  4:05 ` [PATCH V2 6/7] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
2021-10-21 10:37   ` Stefano Babic
2021-10-08  4:05 ` [PATCH V2 7/7] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)

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.