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 2DAB0C4332F for ; Sat, 17 Dec 2022 16:13:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 32003853AD; Sat, 17 Dec 2022 17:12:07 +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="m3WFDDHy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7BCB4853AA; Sat, 17 Dec 2022 17:11:58 +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 BE5E981A10 for ; Sat, 17 Dec 2022 17:11:55 +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 x11so2739234ilo.13 for ; Sat, 17 Dec 2022 08:11:55 -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=YeZwjK9GLPZOgzNsLGbedUrUc9dqk1HzmPrjBy4YwIY=; b=m3WFDDHyEQOyXE8hezppy2EKtTcmRmuC6lLcyxxrIGqtOCq8fQgl5l6WpOMiiVML2w s2VX/DLzSB5dhEswRTwnseahfNFJppC+XjqqAbgNpV7yr1UmPlqMPcdy00FrqersREGh YZoBIhsd7ffWOGv36kwAAeqVExeSgjIJAeeS4= 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=YeZwjK9GLPZOgzNsLGbedUrUc9dqk1HzmPrjBy4YwIY=; b=1S4CG486IJL5bLmLr7xrovJ0hA27AXKmfpmCCPGNN3vvCDEpFgnkhmrdMv6Z5voXOi 6cbDpYqqHnL93SZ68c7FLsmABeK36qJLy16/qFiP53fD6bHMUsC+15YKr8PibgeErmg8 Iecq2cQvWtfBDGcdW5RFP3nqstMlc9d5OCL9rEHGldDzCnCKa01cqw93+yPZjZK9Gxy+ 7+H+BLtsk+psZrq9eWltvpkGwqKd59/0sdU3NtJ0eyXNBpKtxcprYHMR5FF0jlKcnmFE ZEn96UxxljEsBRbW9gPYxSITgrwHcQesccSs9bMCqHaUPRS6d3b3J7+ZSSAyne2a5bh7 9m2g== X-Gm-Message-State: ANoB5plzAtBPhl3EFUpdGfekFUqY0fivDjUtAUHmkTGyEk0V/xR2hdVN 5ulGjm7N6UrhZqu50vrTFtj4pQYf23f+8nDO X-Google-Smtp-Source: AA0mqf7KUh7AJQCut7F+8cod4e2sWPh03jkgpIXB3Fmg0xhO95uClEj9nZaJYenAQszOx1Wodq9TbQ== X-Received: by 2002:a05:6e02:1a4b:b0:302:b5d0:d090 with SMTP id u11-20020a056e021a4b00b00302b5d0d090mr25543550ilv.25.1671293515217; Sat, 17 Dec 2022 08:11:55 -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 o5-20020a056e02092500b00302f958e71dsm1652817ilt.49.2022.12.17.08.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 08:11:55 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Peter Geis , Jerome Forissier , Tom Rini , Philippe Reynes , Alper Nebi Yasak , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Quentin Schulz , Ivan Mikhaylov , Roger Quadros Subject: [PATCH v6 09/12] rockchip: Support building the all output files in binman Date: Sat, 17 Dec 2022 09:11:14 -0700 Message-Id: <20221217161117.61699-10-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20221217161117.61699-1-sjg@chromium.org> References: <20221217161117.61699-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 v5) 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 | 76 +++++++++++++++++++-- 2 files changed, 72 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 f8335c74a74..906098fae07 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 584f21eb5bf..22dfbbb3661 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -30,14 +30,77 @@ }; }; -#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 = ; + 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 { + }; + }; + + @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 +122,8 @@ }; #ifdef CONFIG_ARM64 - blob { + fit { + type = "blob"; filename = "u-boot.itb"; #else u-boot-img { @@ -68,6 +132,6 @@ offset = ; }; }; -#endif +#endif /* CONFIG_ROCKCHIP_SPI_IMAGE */ }; -#endif +#endif /* CONFIG_SPL */ -- 2.39.0.314.g84b9a713c41-goog