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 C1734C4332F for ; Wed, 21 Dec 2022 23:10:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 006F68546E; Thu, 22 Dec 2022 00:08:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Q6+MSRba"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5DF1B85282; Thu, 22 Dec 2022 00:07:55 +0100 (CET) Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (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 2C91D83A08 for ; Thu, 22 Dec 2022 00:07:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd31.google.com with SMTP id h6so176110iof.9 for ; Wed, 21 Dec 2022 15:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4DfmT4Of0QKuG7qXrYN/C+qH0fu/tDgdtLo4ePpkJyE=; b=Q6+MSRbaDdBpJXarhHjWK0mF9baNInc/D0QTBmLFeoF4ZTpdNky5Qevtu5WkQSl2RD IlZMVZke6gM80ORucWAIMCz42J3xWuv1wlToxGiQTmu73hBquGoG8G61XqWMYP4nQex3 YHNu98vlZnjpBRq3krdkvD0KeXGHie6gjmlGU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4DfmT4Of0QKuG7qXrYN/C+qH0fu/tDgdtLo4ePpkJyE=; b=g/mfdNqQm56Z4C57PqBAPChiwxBHdZhKawTP1fnMmYRu72SOAFuCXx7ZZwcJSLp/2L 0KXGFIICxm54S4rhntSeOPzGxqsS0Va29AmPWFHsfHkUnWM/53T2hL86UCZ3EwG9xKyI JwQ14arMerO31NrRQ5AFNqlupqJ7Mnnq34InC5UsJi9I5m4Oucd/07CocZKnAzvRJlz7 fH08wXJ7OFLfMPN3TRsZVnSSUKEt3QPJ2kcC3SdiYq6jKEXOVjxzV1+ZqRFVrEHSFIUN 0YvehXfWc1sgvr2/+p6IMe08wTY9193CNsN07Q11uGsSP2dxJa610tIQALpjpzfzum8k kmdw== X-Gm-Message-State: AFqh2kp3Lcv1MavvG3pO9XPzCF4IwbYCoyl5yAxpnjwuwCkvZGUbScvG kJ9rBA2p4SmNFGX+bgwgbbixGApOikPnocBF X-Google-Smtp-Source: AMrXdXse5i51A2DkfK9VLD0VCXEkmKdW2GPhbU+9rdE42BYnUbPKTyqYoOk6ypw+g2zzTcPOjDTXag== X-Received: by 2002:a05:6602:398e:b0:6e3:120d:f9ed with SMTP id bw14-20020a056602398e00b006e3120df9edmr2524216iob.19.1671664066541; Wed, 21 Dec 2022 15:07:46 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id c2-20020a5ea802000000b006a175fe334dsm6499433ioa.1.2022.12.21.15.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 15:07:46 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Ivan Mikhaylov , Quentin Schulz , Roger Quadros , Philippe Reynes , Alper Nebi Yasak , Jerome Forissier , Peter Geis Subject: [PATCH v8 10/13] rockchip: Support building the all output files in binman Date: Wed, 21 Dec 2022 16:07:23 -0700 Message-Id: <20221221230726.638740-11-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20221221230726.638740-1-sjg@chromium.org> References: <20221221230726.638740-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean Add the required binman images to replace the Makefile rules which are currently used. This includes subsuming: - tpl/u-boot-tpl-rockchip.bin if TPL is enabled - idbloader.img if either or both of SPL and TPL are enabled - u-boot.itb if SPL_FIT is enabled - u-boot-rockchip.bin if SPL is used, either using u-boot.itb when SPL_FIT is enabled or u-boot.img when it isn't Note that the intermediate files are dropped with binman, since it producing everything in one pass. This means that tpl/u-boot-tpl-rockchip.bin is not created, for example. Note that for some 32-bit rk3288 boards, rockchip-optee.dtsi is included. Signed-off-by: Simon Glass --- Changes in v8: - Make OP-TEE image optional - Specify an entry address for U-Boot Changes in v5: - Rename blob to fit for puma and also SPI image Changes in v3: - Add an offset to the FIT description Changes in v2: - Rename op-tee to tee-os - Drop use of .itb2 arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi | 4 +- arch/arm/dts/rockchip-u-boot.dtsi | 78 +++++++++++++++++++-- 2 files changed, 74 insertions(+), 8 deletions(-) diff --git a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi index d2349ae90e2..088861dbf6d 100644 --- a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi +++ b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi @@ -46,14 +46,14 @@ &binman { simple-bin { - blob { + fit { offset = <((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512)>; }; }; #ifdef CONFIG_ROCKCHIP_SPI_IMAGE simple-bin-spi { - blob { + fit { /* same as u-boot,spl-payload-offset */ offset = <0x80000>; }; diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index fa094b00392..234fc5df433 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -30,14 +30,79 @@ }; }; -#ifdef CONFIG_ARM64 - blob { +#if defined(CONFIG_SPL_FIT) && defined(CONFIG_ARM64) + fit: fit { + description = "FIT image for U-Boot with bl31 (TF-A)"; + #address-cells = <1>; + fit,fdt-list = "of-list"; filename = "u-boot.itb"; + fit,external-offset = ; + offset = ; + images { + u-boot { + description = "U-Boot (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = ; + entry = ; + u-boot-nodtb { + }; + }; + + @atf-SEQ { + fit,operation = "split-elf"; + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + os = "arm-trusted-firmware"; + compression = "none"; + fit,load; + fit,entry; + fit,data; + + atf-bl31 { + }; + }; + @tee-SEQ { + fit,operation = "split-elf"; + description = "TEE"; + type = "tee"; + arch = "arm64"; + os = "tee"; + compression = "none"; + fit,load; + fit,entry; + fit,data; + + tee-os { + optional; + }; + }; + + @fdt-SEQ { + description = "fdt-NAME"; + compression = "none"; + type = "flat_dt"; + }; + }; + + configurations { + default = "@config-DEFAULT-SEQ"; + @config-SEQ { + description = "NAME.dtb"; + fdt = "fdt-SEQ"; + firmware = "u-boot"; + fit,loadables; + }; + }; + }; #else u-boot-img { -#endif offset = ; }; +#endif }; #ifdef CONFIG_ROCKCHIP_SPI_IMAGE @@ -59,7 +124,8 @@ }; #ifdef CONFIG_ARM64 - blob { + fit { + type = "blob"; filename = "u-boot.itb"; #else u-boot-img { @@ -68,6 +134,6 @@ offset = ; }; }; -#endif +#endif /* CONFIG_ROCKCHIP_SPI_IMAGE */ }; -#endif +#endif /* CONFIG_SPL */ -- 2.39.0.314.g84b9a713c41-goog