From mboxrd@z Thu Jan 1 00:00:00 1970 From: Siew Chin Lim Date: Thu, 1 Oct 2020 02:16:00 -0700 Subject: [v2, 02/16] arm: socfpga: soc64: Add FIT generator script for pack itb with ATF In-Reply-To: <20201001091614.184612-1-elly.siew.chin.lim@intel.com> References: <20201001091614.184612-1-elly.siew.chin.lim@intel.com> Message-ID: <20201001091614.184612-3-elly.siew.chin.lim@intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Chee Hong Ang Generate a FIT image for Intel SOCFPGA (64bits) which include U-boot proper, ATF and DTB for U-boot proper. Signed-off-by: Chee Hong Ang Signed-off-by: Siew Chin Lim --- v2: - Move soc64 folder from board/altera to board/intel folder --- board/intel/soc64/fit_spl_atf.sh | 92 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100755 board/intel/soc64/fit_spl_atf.sh diff --git a/board/intel/soc64/fit_spl_atf.sh b/board/intel/soc64/fit_spl_atf.sh new file mode 100755 index 0000000000..40f0e20c05 --- /dev/null +++ b/board/intel/soc64/fit_spl_atf.sh @@ -0,0 +1,92 @@ +#!/bin/sh +# +# SPDX-License-Identifier: GPL-2.0+ +# +# script to generate FIT image source for Stratix 10 and +# Agilex boards with U-Boot proper, ATF and device tree +# for U-Boot proper. +# +# usage: $0 + +BL31="bl31.bin" +if [ ! -f $BL31 ]; then + echo "BL31 file \"$BL31\" NOT found!" >&2 + exit 1 +fi + +BL33="u-boot-nodtb.bin" +if [ ! -f $BL33 ]; then + echo "BL33 file \"$BL33\" NOT found!" >&2 + exit 1 +fi + +if [ -f "$1" ] ; then + DT_NAME="$1" +else + echo "File not found: \"$1\"" >&2 + exit 1 +fi + +cat << __PREAMBLE_EOF +/* + * Copyright (C) 2020 Intel Corporation. All rights reserved + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; + +/ { + description = "FIT image with U-Boot proper, ATF bl31, U-Boot DTB"; + #address-cells = <1>; + +__PREAMBLE_EOF + +cat << __IMAGES_EOF + images { + uboot { + description = "U-Boot SoC64"; + data = /incbin/("$BL33"); + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <0x00200000>; + }; + + atf { + description = "ARM Trusted Firmware"; + data = /incbin/("$BL31"); + type = "firmware"; + os = "arm-trusted-firmware"; + arch = "arm64"; + compression = "none"; + load = <0x00001000>; + entry = <0x00001000>; + }; + + fdt { + description = "U-Boot SoC64 flat device-tree"; + data = /incbin/("$DT_NAME"); + type = "flat_dt"; + compression = "none"; + }; + }; + +__IMAGES_EOF + +cat << __CONFIGS_EOF + configurations { + default = "conf"; + conf { + description = "Intel SoC64 FPGA"; + firmware = "atf"; + loadables = "uboot"; + fdt = "fdt"; + }; + }; +__CONFIGS_EOF + +cat << __END_EOF +}; +__END_EOF -- 2.13.0