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 240F4C54EBC for ; Sat, 7 Jan 2023 21:10:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19A97855FC; Sat, 7 Jan 2023 22:08:37 +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="gVz9Qp78"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A0BE285479; Sat, 7 Jan 2023 22:08:01 +0100 (CET) Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (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 B731F855B7 for ; Sat, 7 Jan 2023 22:07:43 +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-il1-x12c.google.com with SMTP id i16so2289683ilq.9 for ; Sat, 07 Jan 2023 13:07:43 -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=VgE37Wgp5xiuYcUTqdTrt+6vCz7B9AS0jlIxDuUgPkg=; b=gVz9Qp78G0NnOzpmiNk7g9csdaE8m3SG3omqky8nG1tu6tkSDrzetKMOrLgzMlVyHq wwfga6VPJlM7xLLmgKM3YK4dCDr9DczINjAcGjcoSIIhk43PmMeCzBjrb+OB/Aeo8XoO NQQWGirU0R1Cv/5aIKZE3wtTuR4uHkhnSugbg= 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=VgE37Wgp5xiuYcUTqdTrt+6vCz7B9AS0jlIxDuUgPkg=; b=J4lO0rxvFQc39D3QKfcjKKPOmWPnOhO7mfqjkEUFj6YCBgtW8IULXp+YnIlMVqansq IprTgJh3apaJ7D5Kr5gHBYeT2YPVhj8LBldCC8m+2NyI6JrBrK7MERK1j5RitdwdfCgj 5dtlDcpuWyIrtcd3zVgXGDksZieG7JDLjKPyI3i2bOsMsyGz6N44McrSe0gm5tFkRTQV vn+C4+EmM8B2T7z36Lz+4ratu/LCZsKRsYk/ybcVRjmbx5d78qUJDMuArtG+uX36zMDo wa3NrNs4hY6knlGytzaJpLJW0YEmOFq1IOkszzDfYrw+gD6POjJY/IrUL1eJveIw5JR7 BDgQ== X-Gm-Message-State: AFqh2krrT9MCgRSyfuNkkIh2D7zSD7ci/vIh+MPv9REJA8+FhbTqcsp9 rrYz9cDU7FLgcX6Edd/+1Ds6Y0gAeTFdT8dh X-Google-Smtp-Source: AMrXdXv/OvGdJdfzD/EhEKjqvryLoBr+wz0ZIi5djRoD2nxEkSY/0NKhejEnj/JFnzVHX466XisfiQ== X-Received: by 2002:a05:6e02:105:b0:30c:8559:9d33 with SMTP id t5-20020a056e02010500b0030c85599d33mr11012494ilm.3.1673125661793; Sat, 07 Jan 2023 13:07:41 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-71-56-217-229.hsd1.co.comcast.net. [71.56.217.229]) by smtp.gmail.com with ESMTPSA id l10-20020a92d94a000000b0030c00897497sm1465825ilq.19.2023.01.07.13.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Jan 2023 13:07:41 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Roger Quadros , Tom Rini , Alper Nebi Yasak , Peter Geis , Jerome Forissier , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Ivan Mikhaylov , Quentin Schulz , Philippe Reynes Subject: [PATCH v9 11/14] rockchip: Support building the all output files in binman Date: Sat, 7 Jan 2023 14:07:18 -0700 Message-Id: <20230107210721.478062-12-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230107210721.478062-1-sjg@chromium.org> References: <20230107210721.478062-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 --- (no changes since v8) 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