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 00089C433F5 for ; Mon, 16 May 2022 11:09:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1B05B8421D; Mon, 16 May 2022 13:09:06 +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="jenKpXdf"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="h1ngFdJL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1087F84199; Mon, 16 May 2022 13:08:29 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 E84DD840DA for ; Mon, 16 May 2022 13:08:18 +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 compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 917583200919; Mon, 16 May 2022 07:08:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 16 May 2022 07:08:17 -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=1652699296; x=1652785696; bh=1J pE0JO1Yo7XUNEgP2JFtJ/U1yXTMdI8rkeSWlc219A=; b=jenKpXdfotPekJXWmK JX+N67qO/LOmH949UIete+5GodvufilK9PX9z8jC5rIQYGIIZs9Fkz1EPEOGHOVd 6GnQLpmcT4ERQY2ktI2uokdhS3cNDgPfJnVkgCw+kKZQP9m8wdDprDfOSFv1ezXK CVJw/6YwY1CcX9z8dQAU3Zzxi0ClJH++mb4u0MGO2zDfDfsEFckCcNuOaUD9l9FD 1UEFR3BdPQV9Whz8ysD9RI322ZI+BYwrWBsawdPxttI9f2rnkKMX3lYzwUrZpd6G weQAjzkdMKYaNwgvu6LTWdzMBeGxsnwdYLGTixIbxJ+FFRTtR7MFGOvOnA+DSGfx BuQw== 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= 1652699296; x=1652785696; bh=1JpE0JO1Yo7XUNEgP2JFtJ/U1yXTMdI8rke SWlc219A=; b=h1ngFdJLypgaws3R7Yj0d8/Xu7Q3pQO9984fwKAfle7zvA59aEl H5YECnJtIECzYG6+znXB8cqmxNnnjXlNV6y13s+dZdczhZW74NbUrmRsnlHP6Ihh 88OxHVN56iZ/M1ESUrVnDsPwYC8iKyCifacpLzfpGt/9ZVWPnm1olDsXE58MClTF jVhgO2V0hfqUDDjIz6g/4Xb4vGPf+TSLOPRc1VqntHFXGNNFhmVbHnOJazj85g4w XX/1U3150ZzWUgp7IeVU7xtFAHGUZHobo5QJXMF8rTEo7erIxAcGERHzs2HQVAOf GVZwshFT4/WwqxkZCIzEEu0WFjLe/Kg0O/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrheehgdefgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetnhgurhgv ficutegssghothhtuceorghnughrvgifsehmihhrgidruggvvheqnecuggftrfgrthhtvg hrnhepleeigeejjeegvdejjeetheevheetgedvffdtteegvdeltdejgeehkeekfeeviedt necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnug hrvgifsehmihhrgidruggvvh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 May 2022 07:08:12 -0400 (EDT) From: Andrew Abbott To: U-Boot Mailing List Cc: Jagan Teki , Johan Jonker , Simon Glass , Samuel Dionne-Riel , Peter Robinson , Kever Yang , Philipp Tomsich , Andrew Abbott , Philipp Tomsich Subject: [RFC PATCH v2 2/8] rockchip: Add binman definitions for final images Date: Mon, 16 May 2022 21:07:06 +1000 Message-Id: <20220516110712.178958-3-andrew@mirx.dev> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220516110712.178958-1-andrew@mirx.dev> References: <20220516110712.178958-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 - rksd-formatted [TPL + ] SPL, as before. - u-boot-rockchip.bin - [TPL + ] SPL all rksd-formatted + u-boot.itb padded for SD/MMC usage, as before. - 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? Changes in v2: - Revert u-boot-rockchip-sdmmc.bin name to u-boot-rockchip.bin, to keep the name the same as before. - Fix whitespace issues. arch/arm/dts/rockchip-u-boot.dtsi | 53 +++++++++++++++++++++++++++++-- arch/arm/mach-rockchip/Kconfig | 7 ++-- 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index eae3ee715d..9354b0f5a7 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 { + sdmmc-idbloader { + 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.bin"; pad-byte = <0xff>; - blob { + 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.36.0