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 B4C1BC433EF for ; Mon, 25 Apr 2022 00:04:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7F76883DE1; Mon, 25 Apr 2022 02:04:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=mirx.dev Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mirx.dev header.i=@mirx.dev header.b="FdLWWvOg"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="h2njmttp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 733DE83AC6; Mon, 25 Apr 2022 02:04:11 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EEE5D83BC7 for ; Mon, 25 Apr 2022 02:04:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=mirx.dev Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andrew@mirx.dev Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 923723201F88; Sun, 24 Apr 2022 20:04:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 24 Apr 2022 20:04:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirx.dev; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1650845043; x=1650931443; bh=2A KfAVC3/GdI/eSNa0MP8quxxQQwyD02/7D2/QLTsUs=; b=FdLWWvOgJ47izkG63h Y+Be0IbjlgmaebYnKs9gGArD/Xe1j4dPXN+v5oPDNtdSoXQcw/GPfaO1Y4bmvvNz VUg/K1Zcoe4IYnFgwh2T3e5+gdLUW+Bgj4tik3AD5Yl6zrkNBYtK6EheIOOZ8rtZ LM2ucgs+kbd0BnAn/CrWcfLyDIxa85yN8BM6lyJY9OS8U3kGYwQ3u2CLwGlmVMT6 ozn1+oFt5AUsE+r31WEWV6bPctRYAELt8ma9nsb0eUvdQoV7nQwgwBjHkqq7LAir ZhaWkPJoyMMo5bSKrrn15Wvjqrn1q+8VS875piYJXI0A2REZQpz14HJL/aIke8cu vzbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1650845043; x=1650931443; bh=2AKfAVC3/GdI/eSNa0MP8quxxQQwyD02/7D 2/QLTsUs=; b=h2njmttphpQNMVgI3SgREGbmjCBKdh7B5G8EqG1EZl+Q52c42MC oVzw186j0vhWkgJIFRDss5clpQUYoSKHA5HfTbVSS3JnAFzqpz0xl9R4i+qNarM4 9g+9F8AyTxV0MzapBLwZDA8qeFve4A0y3AiJjfx8CKyn2yLn4PHGaU9BHw3tRQAK 8wRRWNLwfCI9JA2NAYeD3ztz648NImLvkjJfraRi0jlEyI8BqkeLOPlNiHKl2Rh9 C7UjzSahXVfTnXM6gMdRKrr9Es2pBbtvT9Bh7RNHR65gKtlZB+3XnMKwkgu7alYt adljjsmsC/vbWpK230074d1DdvknHiVR/DA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddtgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetnhgurhgv ficutegssghothhtuceorghnughrvgifsehmihhrgidruggvvheqnecuggftrfgrthhtvg hrnhepleeigeejjeegvdejjeetheevheetgedvffdtteegvdeltdejgeehkeekfeeviedt necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnug hrvgifsehmihhrgidruggvvh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Apr 2022 20:03:59 -0400 (EDT) From: Andrew Abbott To: u-boot@lists.denx.de Cc: Andrew Abbott , Simon Glass , Philipp Tomsich , Kever Yang , Peter Robinson , Akash Gajjar , Jagan Teki , Samuel Dionne-Riel Subject: [RFC PATCH 2/8] rockchip: Add binman definitions for final images Date: Mon, 25 Apr 2022 10:03:23 +1000 Message-Id: <20220425000329.28124-3-andrew@mirx.dev> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220425000329.28124-1-andrew@mirx.dev> References: <20220425000329.28124-1-andrew@mirx.dev> 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.5 at phobos.denx.de X-Virus-Status: Clean Currently, building for Rockchip targets produces: - idbloader.img - rksd-formatted TPL with SPL appended; or - rksd-formatted SPL - u-boot.itb - U-Boot Proper FIT image - u-boot-rockchip.bin - idbloader.img + u-boot.itb, padded the correct amount for SD/MMC usage. For RK3399 targets: - u-boot.rom - SPI image specific to the bob Chromebook target (see c4cea2bbf995764f325a907061c22ecd6768cf7b). This commit adds binman definitions to produce these images: - idbloader.img - u-boot-rockchip-sdmmc.bin - [TPL + ] SPL all rksd-formatted + u-boot.itb padded for SD/MMC usage. - u-boot-rockchip-spi.bin - [TPL + ] SPL all rkspi-formatted + u-boot.itb padded for SPI usage. This commit also generalizes the CONFIG_ROCKCHIP_SPI_IMAGE config setting - it now means to generate a generic SPI flash image, in addition to the generic SD/MMC image. Signed-off-by: Andrew Abbott --- Question: Does this break/not play nicely with rockchip-optee generation? It creates u-boot.itb for rk3288 targets. That would need to run before what I've implemented here? --- arch/arm/dts/rockchip-u-boot.dtsi | 59 +++++++++++++++++++++++++++---- arch/arm/mach-rockchip/Kconfig | 7 ++-- 2 files changed, 56 insertions(+), 10 deletions(-) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index eae3ee715d..05d79e6c55 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -13,17 +13,64 @@ #ifdef CONFIG_SPL &binman { - simple-bin { - filename = "u-boot-rockchip.bin"; - pad-byte = <0xff>; + sdmmc-idbloader { + filename = "idbloader.img"; - blob { - filename = "idbloader.img"; + mkimage { + args = "-n", CONFIG_SYS_SOC, "-T", "rksd"; + +#ifdef CONFIG_TPL + u-boot-tpl {}; +#endif + u-boot-spl {}; }; + }; + + sdmmc-image { + filename = "u-boot-rockchip-sdmmc.bin"; + pad-byte = <0xff>; + + idbloader { + filename = "idbloader.img"; + type = "blob"; + }; - u-boot-img { +#ifdef CONFIG_ARM64 + u-boot-fit { + filename = "u-boot.itb"; + type = "blob"; offset = ; }; +#else + u-boot-img {}; +#endif }; }; + +#ifdef CONFIG_ROCKCHIP_SPI_IMAGE +&binman { + spi-image { + filename = "u-boot-rockchip-spi.bin"; + pad-byte = <0xff>; + + mkimage { + args = "-n", CONFIG_SYS_SOC, "-T", "rkspi"; + +#ifdef CONFIG_TPL + u-boot-tpl {}; +#endif + u-boot-spl {}; + }; + +#ifdef CONFIG_ARM64 + blob { + filename = "u-boot.itb"; + offset = ; + }; +#else + u-boot-img {}; #endif + }; +}; +#endif // CONFIG_ROCKCHIP_SPI_IMAGE +#endif // CONFIG_SPL diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 18aff5480b..7149b9a530 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -415,12 +415,11 @@ config SPL_MMC config ROCKCHIP_SPI_IMAGE bool "Build a SPI image for rockchip" - depends on HAS_ROM help Some Rockchip SoCs support booting from SPI flash. Enable this - option to produce a 4MB SPI-flash image (called u-boot.rom) - containing U-Boot. The image is built by binman. U-Boot sits near - the start of the image. + option to produce an SPI-flash image (called u-boot-rockchip-spi.bin) + containing TPL (if enabled) and SPL, and U-Boot proper at the offset + CONFIG_SYS_SPI_U_BOOT_OFFS. The image is built by binman. config LNX_KRNL_IMG_TEXT_OFFSET_BASE default SYS_TEXT_BASE -- 2.35.3