From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF3A5C433EF for ; Thu, 6 Jan 2022 18:51:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C65608307A; Thu, 6 Jan 2022 19:51:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.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 9497383082; Thu, 6 Jan 2022 19:51:41 +0100 (CET) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9E93E82DA1 for ; Thu, 6 Jan 2022 19:51:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qt1-f182.google.com with SMTP id a1so3181605qtx.11 for ; Thu, 06 Jan 2022 10:51:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PRaff9IY+hDs9tphbCVXLL/U0M9ksq0csiu/4xIFXuk=; b=00t0oag2lPMVEKQxKCObtyKTt/o8mmfqrK6kESkBSqnv2PSfEuKS0QQ49j/EXsP8MP 0gsVF5FnnzTw1IYiZ2FpBJe20mzmANxvG9Dig7EfStM1/lx2uW0DrG3E+mQPulbn3xHT GT/JAH3ABhTT4W/PtpcPVZ3TEL4UaK6RHLR86iy6y5LzGmixnNUs08GzhGvzkZL3PbTz 6IYnrGQgka6ngpzaMEJM9Q9pWwhO2evnFy2N7ayFTnU6CBXrdR6WSBrtLBNNaEbeS8/K 39uKhMXo9pw9G3WJYiXMu0N3D3Esc3q4THgHsgDSQR3eJdIY8tf078T/mBBxVn3XzQmB Vrug== X-Gm-Message-State: AOAM533Z1PqRynRS+A1KGJcXJ4Hf+FPAaI4EYXK0r0Up4KU9PIvn0BfM TaZ5k3ltphK8uqyupW6R/Xvd4CIrEw== X-Google-Smtp-Source: ABdhPJyGERJhVmxP6WVtj7MyH+RfuxLydyJbsM+IzorI4zIOV2vrcs2sNEag7Ll5/+Xup0dCC43vHg== X-Received: by 2002:ac8:5e12:: with SMTP id h18mr54249952qtx.143.1641495097156; Thu, 06 Jan 2022 10:51:37 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-819c-10b8-636b-6f84.res6.spectrum.com. [2603:6081:7b01:cbda:819c:10b8:636b:6f84]) by smtp.gmail.com with ESMTPSA id e2sm2115937qty.14.2022.01.06.10.51.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 10:51:36 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Cc: Tim Harvey Subject: [PATCH] Revert "tree: imx: remove old fit generator script" Date: Thu, 6 Jan 2022 13:51:33 -0500 Message-Id: <20220106185133.2375747-1-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.103.2 at phobos.denx.de X-Virus-Status: Clean This reverts commit d9a6f0eed66a39206b13513ec914f14084c3bb73. For right now, it's too close to the release to merge the series that allows for binman to be used to generate the final images, and also not break CI, and then also merge all of the series that convert currently broken platforms to use binman instead. So, bring back this script now and remove it again for real after the release. Suggested-by: Tim Harvey Signed-off-by: Tom Rini --- Makefile | 3 + arch/arm/mach-imx/mkimage_fit_atf.sh | 143 +++++++++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100755 arch/arm/mach-imx/mkimage_fit_atf.sh diff --git a/Makefile b/Makefile index ae9bfab91acf..0c478645c3a7 100644 --- a/Makefile +++ b/Makefile @@ -1343,6 +1343,9 @@ $(U_BOOT_ITS): $(subst ",,$(CONFIG_SPL_FIT_SOURCE)) else ifneq ($(CONFIG_USE_SPL_FIT_GENERATOR),) U_BOOT_ITS := u-boot.its +ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-imx/mkimage_fit_atf.sh") +U_BOOT_ITS_DEPS += u-boot-nodtb.bin +endif ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-rockchip/make_fit_atf.py") U_BOOT_ITS_DEPS += u-boot endif diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh b/arch/arm/mach-imx/mkimage_fit_atf.sh new file mode 100755 index 000000000000..2a17968794c1 --- /dev/null +++ b/arch/arm/mach-imx/mkimage_fit_atf.sh @@ -0,0 +1,143 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0+ +# +# script to generate FIT image source for i.MX8MQ boards with +# ARM Trusted Firmware and multiple device trees (given on the command line) +# +# usage: $0 [ [&2 + exit 0 +else + echo "$BL31 size: " >&2 + stat -c %s $BL31 >&2 +fi + +BL32="tee.bin" + +if [ ! -f $BL32 ]; then + BL32=/dev/null +else + echo "Building with TEE support, make sure your $BL31 is compiled with spd. If you do not want tee, please delete $BL31" >&2 + echo "$BL32 size: " >&2 + stat -c %s $BL32 >&2 +fi + +BL33="u-boot-nodtb.bin" + +if [ ! -f $BL33 ]; then + echo "ERROR: $BL33 file NOT found" >&2 + exit 0 +else + echo "u-boot-nodtb.bin size: " >&2 + stat -c %s u-boot-nodtb.bin >&2 +fi + +for dtname in $* +do + echo "$dtname size: " >&2 + stat -c %s $dtname >&2 +done + + +cat << __HEADER_EOF +/dts-v1/; + +/ { + description = "Configuration to load ATF before U-Boot"; + + images { + uboot@1 { + description = "U-Boot (64-bit)"; + os = "u-boot"; + data = /incbin/("$BL33"); + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = <$BL33_LOAD_ADDR>; + }; +__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 << __HEADER_EOF + atf@1 { + description = "ARM Trusted Firmware"; + os = "arm-trusted-firmware"; + data = /incbin/("$BL31"); + type = "firmware"; + arch = "arm64"; + compression = "none"; + load = <$ATF_LOAD_ADDR>; + entry = <$ATF_LOAD_ADDR>; + }; +__HEADER_EOF + +if [ -f $BL32 ]; then +cat << __HEADER_EOF + tee@1 { + description = "TEE firmware"; + data = /incbin/("$BL32"); + type = "firmware"; + arch = "arm64"; + compression = "none"; + load = <$TEE_LOAD_ADDR>; + entry = <$TEE_LOAD_ADDR>; + }; +__HEADER_EOF +fi + +cat << __CONF_HEADER_EOF + }; + configurations { + default = "config@1"; + +__CONF_HEADER_EOF + +cnt=1 +for dtname in $* +do +if [ -f $BL32 ]; then +cat << __CONF_SECTION_EOF + config@$cnt { + description = "$(basename $dtname .dtb)"; + firmware = "uboot@1"; + loadables = "atf@1", "tee@1"; + fdt = "fdt@$cnt"; + }; +__CONF_SECTION_EOF +else +cat << __CONF_SECTION1_EOF + config@$cnt { + description = "$(basename $dtname .dtb)"; + firmware = "uboot@1"; + loadables = "atf@1"; + fdt = "fdt@$cnt"; + }; +__CONF_SECTION1_EOF +fi +cnt=$((cnt+1)) +done + +cat << __ITS_EOF + }; +}; +__ITS_EOF -- 2.25.1