All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: sbabic@denx.de, festevam@gmail.com
Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 2/7] imx: imx8mq_evk: switch to binman
Date: Mon, 16 Aug 2021 11:48:42 +0800	[thread overview]
Message-ID: <20210816034847.22767-2-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20210816034847.22767-1-peng.fan@oss.nxp.com>

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            |   4 +-
 5 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 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 50132c833e..6d604c6c24 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -13,8 +13,8 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
 CONFIG_SPL_LOAD_FIT=y
-CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg"
+# 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


  reply	other threads:[~2021-08-16  3:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16  3:48 [PATCH 1/7] tools: imx8mimage: not abort when mmap fail Peng Fan (OSS)
2021-08-16  3:48 ` Peng Fan (OSS) [this message]
2021-08-16  3:48 ` [PATCH 3/7] imx: imx8mq_phanbell: switch to binman Peng Fan (OSS)
2021-08-16  3:48 ` [PATCH 4/7] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
2021-08-16  3:48 ` [PATCH 5/7] imx: makefile: drop the use of imx8mimage.sh Peng Fan (OSS)
2021-08-19 10:32   ` Frieder Schrempf
2021-08-20 13:45     ` Marcel Ziswiler
2021-10-20 12:20   ` sbabic
2021-08-16  3:48 ` [PATCH 6/7] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
2021-08-16  3:48 ` [PATCH 7/7] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)
2021-10-20 12:20 ` [PATCH 1/7] tools: imx8mimage: not abort when mmap fail sbabic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210816034847.22767-2-peng.fan@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=festevam@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.