From patchwork Wed Feb 23 23:00:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1596963 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=G0eK1qIJ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K3s751mWYz9sG5 for ; Thu, 24 Feb 2022 10:04:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C864A83D3E; Thu, 24 Feb 2022 00:03:18 +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="G0eK1qIJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6276F83CDA; Thu, 24 Feb 2022 00:01:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 AEA0383CE8 for ; Thu, 24 Feb 2022 00:01:17 +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-ot1-x335.google.com with SMTP id w3-20020a056830060300b005ad10e3becaso129811oti.3 for ; Wed, 23 Feb 2022 15:01:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=765SzsMBbEL2SFVOkX9Cx7EqTImlqeKYxqBWkduPVjE=; b=G0eK1qIJgT5908X7Y3lSBTygeRCmEjzqIrk9iGuAfunAsSkYWpb8V5u2o3B1J8LYbP vUAzPTRw8SSKLXWgx0nuQc3NJf+4dcUwEqkgc0ayunkoSq+h/US4gsz8QKabcnYI9ooT kNye4spLE/cCzBrU/DVyPP4B8jqrVG4rbT22c= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=765SzsMBbEL2SFVOkX9Cx7EqTImlqeKYxqBWkduPVjE=; b=yTkFdAA2PxQFPI/LEsVutm+ng2yB2ntct14iUjOY7bQd3w5AlT1AZTxTjx4QumgmnO xIkYI8JwicRX0sz4IkjNzieRJLfFWV8PuGdJWwmPJdB7+/W+UEQ0b5Fy1dMZZrDemvp6 x3vZGRVWa7s+SCczq3+wzMcaUTSkFHc0vszqJY6MUzuwf+fc4lBoRJvqRYEPKz36RZu1 A8bGQ+ixiMvmYw6/qHQnq/gooMyc9Jh/32yBtXsLvlfn6APDHJLRZeEeFxndPZ06aAzW lmDvNvIIhZTCCfzU8vJVDOr3sQgGmoYuSU2tuLn6uphQpW18FWelHUzGNoKPG/81C2o9 wS5w== X-Gm-Message-State: AOAM532U6Wy2+7+WSOTOBYnMQIeykRalbjdHdU9mKOi/qBLwGwzCV3K5 AkbMCO18BUXZl8zYZjRh1vazJugt8izTZw== X-Google-Smtp-Source: ABdhPJwHP2QjYPPtHVTspdWonhMSsD2zngNoTayHerxCuLXtFqKQbzQmge7C/v3C8MiK59c3URgBhA== X-Received: by 2002:a9d:615c:0:b0:5a3:32b8:9689 with SMTP id c28-20020a9d615c000000b005a332b89689mr700150otk.213.1645657276272; Wed, 23 Feb 2022 15:01:16 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id o2sm427507otl.9.2022.02.23.15.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 15:01:16 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Ivan Mikhaylov , Tom Rini , Philippe Reynes , Roger Quadros , Alper Nebi Yasak , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich Subject: [PATCH v2 23/25] rockchip: Support building the all output files in binman Date: Wed, 23 Feb 2022 16:00:38 -0700 Message-Id: <20220223230040.159317-24-sjg@chromium.org> X-Mailer: git-send-email 2.35.1.574.g5d30c73bfb-goog In-Reply-To: <20220223230040.159317-1-sjg@chromium.org> References: <20220223230040.159317-1-sjg@chromium.org> MIME-Version: 1.0 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.5 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 v2: - Rename op-tee to tee-os - Drop use of .itb2 arch/arm/dts/rockchip-u-boot.dtsi | 84 ++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index eae3ee715d..64e4466489 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -17,13 +17,93 @@ filename = "u-boot-rockchip.bin"; pad-byte = <0xff>; - blob { - filename = "idbloader.img"; +#ifdef CONFIG_TPL + mkimage { + args = "-n", CONFIG_SYS_SOC, "-T", "rksd"; + + u-boot-tpl { + }; + }; + + u-boot-spl { }; +#elif defined(CONFIG_SPL) /* SPL only */ + mkimage { + args = "-n", CONFIG_SYS_SOC, "-T", "rksd"; + + u-boot-spl { + }; + }; +#endif +#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"; + fit,external-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 { offset = ; }; +#endif /* CONFIG_ARM64 */ }; }; #endif