From patchwork Mon Aug 17 04:34:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ang, Chee Hong" X-Patchwork-Id: 1345601 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BVLnV6Hzpz9sTH for ; Mon, 17 Aug 2020 14:35:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB6DE82209; Mon, 17 Aug 2020 06:34:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 063A4821F8; Mon, 17 Aug 2020 06:34:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 07D19821AF for ; Mon, 17 Aug 2020 06:34:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=chee.hong.ang@intel.com IronPort-SDR: 0rkj4PSB+TMXdL+lTbN+1KCDdGExSRKWYJ56eg3sLpnjf9bcq+RVmeNHVmfHcbLBy7MeVpr71E QTbugHEPG1Qw== X-IronPort-AV: E=McAfee;i="6000,8403,9715"; a="155729066" X-IronPort-AV: E=Sophos;i="5.76,322,1592895600"; d="scan'208";a="155729066" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2020 21:34:47 -0700 IronPort-SDR: Ay/G5lzKVU3bOdorRqKiKNZKVi7Y8RcOv2Q63nbEfYUE6xc55zIEd6PhQLJEzF+Bxrf/EYqS7J V1wEA11VMT2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,322,1592895600"; d="scan'208";a="328499668" Received: from ppglcf0010.png.intel.com ([10.226.229.26]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2020 21:34:45 -0700 From: Chee Hong Ang To: u-boot@lists.denx.de Cc: Marek Vasut , Simon Goldschmidt , Tom Rini , Ching Liang See , Ley Foon , Chee Hong Ang , Tien Fong , Siew Chin Subject: [PATCH v1 02/16] arm: socfpga: soc64: Add FIT generator script for pack itb with ATF Date: Mon, 17 Aug 2020 12:34:17 +0800 Message-Id: <20200817043431.28718-3-chee.hong.ang@intel.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20200817043431.28718-1-chee.hong.ang@intel.com> References: <20200817043431.28718-1-chee.hong.ang@intel.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Ley Foon Tan --- board/altera/soc64/fit_spl_atf.sh | 91 +++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 board/altera/soc64/fit_spl_atf.sh diff --git a/board/altera/soc64/fit_spl_atf.sh b/board/altera/soc64/fit_spl_atf.sh new file mode 100755 index 0000000000..482ca36f9b --- /dev/null +++ b/board/altera/soc64/fit_spl_atf.sh @@ -0,0 +1,91 @@ +#!/bin/sh +# +# SPDX-License-Identifier: GPL-2.0+ +# +# script to generate FIT image source for 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