[U-Boot] [PATCH 04/12] imx: introduce mkimage_fit.sh

Peng Fan peng.fan at nxp.com
Wed Aug 9 09:16:15 UTC 2017


Introduce mkimage_fit.sh which is modifed from
board/sunxi/mksunxi_fit_atf.sh.
ATF is dropped and modified for arm32 arch.

Signed-off-by: Peng Fan <peng.fan at nxp.com>
Cc: Stefano Babic <sbabic at denx.de>
Cc: Fabio Estevam <fabio.estevam at nxp.com>
---
 arch/arm/mach-imx/mkimage_fit.sh | 63 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100755 arch/arm/mach-imx/mkimage_fit.sh

diff --git a/arch/arm/mach-imx/mkimage_fit.sh b/arch/arm/mach-imx/mkimage_fit.sh
new file mode 100755
index 0000000..18628de
--- /dev/null
+++ b/arch/arm/mach-imx/mkimage_fit.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# script to generate FIT image source for 32-bit imx boards with
+# multiple device trees (given on the command line)
+#
+# usage: $0 <dt_name> [<dt_name> [<dt_name] ...]
+
+cat << __HEADER_EOF
+/dts-v1/;
+
+/ {
+	description = "Configuration to load ATF before U-Boot";
+	#address-cells = <1>;
+
+	images {
+		uboot at 1 {
+			description = "U-Boot (32-bit)";
+			data = /incbin/("u-boot-nodtb.bin");
+			type = "standalone";
+			arch = "arm32";
+			compression = "none";
+			load = <0x17800000>;
+		};
+__HEADER_EOF
+
+cnt=1
+for dtname in $*
+do
+	cat << __FDT_IMAGE_EOF
+		fdt@$cnt {
+			description = "$(basename $dtname .dtb)";
+			data = /incbin/("$dtname");
+			type = "flat_dt";
+			compression = "none";
+		};
+__FDT_IMAGE_EOF
+	cnt=$((cnt+1))
+done
+
+cat << __CONF_HEADER_EOF
+	};
+	configurations {
+		default = "config at 1";
+
+__CONF_HEADER_EOF
+
+cnt=1
+for dtname in $*
+do
+	cat << __CONF_SECTION_EOF
+		config@$cnt {
+			description = "$(basename $dtname .dtb)";
+			firmware = "uboot at 1";
+			fdt = "fdt@$cnt";
+		};
+__CONF_SECTION_EOF
+	cnt=$((cnt+1))
+done
+
+cat << __ITS_EOF
+	};
+};
+__ITS_EOF
-- 
2.6.2



More information about the U-Boot mailing list