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....@nxp.com> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> --- V2: none 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@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@1"; + +__CONF_HEADER_EOF + +cnt=1 +for dtname in $* +do + cat << __CONF_SECTION_EOF + config@$cnt { + description = "$(basename $dtname .dtb)"; + firmware = "uboot@1"; + fdt = "fdt@$cnt"; + }; +__CONF_SECTION_EOF + cnt=$((cnt+1)) +done + +cat << __ITS_EOF + }; +}; +__ITS_EOF -- 2.6.2 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot