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 0BA7EC433EF for ; Sun, 6 Mar 2022 03:10:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0DB1D83D22; Sun, 6 Mar 2022 04:09:32 +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="Zr4dEEEH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E27D583BD4; Sun, 6 Mar 2022 04:08:39 +0100 (CET) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 8796483B83 for ; Sun, 6 Mar 2022 04:08:29 +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@google.com Received: by mail-ot1-x32e.google.com with SMTP id l25-20020a9d7a99000000b005af173a2875so10485992otn.2 for ; Sat, 05 Mar 2022 19:08:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FHyWEAEEIjidjXbFKCI1emLIxOQquIxGXJ+t7vKP8ZI=; b=Zr4dEEEHSlCfkirGnBV0LmTJlERSExMOcQaimup5ZGFkEXjDNQAzUlMVoDrRltWTHH K53FHyhDooVv5OWDuMIHzSUqyh6YK4rniC7rYIZT5+txKxvVUT6skeh0LCgAC+BOPdEg VQM6NHTPMscJt237Y9oOBTknkQhXha8ViR/2o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FHyWEAEEIjidjXbFKCI1emLIxOQquIxGXJ+t7vKP8ZI=; b=7fXqdFqaKZSZiamtp5ZS3mnJ2k3GTCgtmmibzAaiWkfjgbhq9vSwcv5AOthf71WVBr Nlw7AC127PuTLYurtRCcf598mXcRpOKoNJpqdm9SHP8wTG0svY4/Khj67UxA+jq+hQzD oGX2RGJEUQWwSvT4w+VCDHdIhhkHyEPLnVQ+ZAHaAX9m9w1i++Iv3eoVHFaA6bwHe9II 9TGQQWufAYNNIev7ydzNjZPssay7i1XzULafI5+7EhzUfXUwSYq+4Y/jSvKsG2Zr59q2 9TPwEvPUQb/z4vASy+e7PrghR2GrcT98nOyZcJXnyNqV6Q2fyTo7me03WIye7bduL3w7 LSDQ== X-Gm-Message-State: AOAM532Yssx1z/0L8FOk+Ns7Uss7QxHVsjkIKHuJtbsXNyBUlN0gA2El 0Zt0S2sLlfRo0J8cScpPg//La65P0KcCdrqAM1VqlQ== X-Google-Smtp-Source: ABdhPJyKakXmwt4Dtg7ObwvK2ETsoi+QUK9xEqBSXNqj83yYGKgA2RfPMdWpcjiv+k1+BmyezTVBJQ9HON++UsW01S8= X-Received: by 2002:a9d:20ca:0:b0:5ad:3241:47f0 with SMTP id x68-20020a9d20ca000000b005ad324147f0mr2715121ota.269.1646536107962; Sat, 05 Mar 2022 19:08:27 -0800 (PST) MIME-Version: 1.0 References: <20220223230040.159317-1-sjg@chromium.org> <20220223230040.159317-24-sjg@chromium.org> In-Reply-To: From: Simon Glass Date: Sat, 5 Mar 2022 20:08:16 -0700 Message-ID: Subject: Re: [PATCH v2 23/25] rockchip: Support building the all output files in binman To: Peter Geis Cc: Alper Nebi Yasak , U-Boot Mailing List , Ivan Mikhaylov , Tom Rini , Philippe Reynes , huang lin , Jeffy Chen , Kever Yang Content-Type: text/plain; charset="UTF-8" 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 Hi Peter, Alper, On Thu, 3 Mar 2022 at 15:34, Peter Geis wrote: > > On Thu, Mar 3, 2022 at 4:17 PM Alper Nebi Yasak > wrote: > > > > On 03/03/2022 01:16, Peter Geis wrote: > > > On Wed, Feb 23, 2022 at 6:04 PM Simon Glass wrote: > > >> 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 = ; > > > > > > You need: > > > offset = ; > > > here or the image is located at the wrong location. > > > > Thanks for confirming this. > > > > > The image produced is not functional however, because it swaps the > > > firmware node with the loadable-1 node. > > > Working image: > > > Configuration 0 (config_1) > > > Description: rk3399-pinephone-pro.dtb > > > Kernel: unavailable > > > Firmware: atf_1 > > > FDT: fdt_1 > > > Loadables: uboot > > > atf_2 > > > atf_3 > > > > > > Non working image produced from this: > > > Configuration 0 (config-1) > > > Description: rk3399-rockpro64.dtb > > > Kernel: unavailable > > > Firmware: u-boot > > > FDT: fdt-1 > > > Loadables: atf-1 > > > atf-2 > > > atf-3 > > > > And also this. I encountered the same things on rk3399-gru-kevin, > > mentioned them in my reply [1] to v1 but I guess Simon missed it. > > > > [1] My reply to v1 of this patch > > https://lore.kernel.org/u-boot/d50a7e13-7113-8c95-1861-cbc6c1000755@gmail.com/ > > Yes, that's the solution I ended up with as well. > Funnily enough, it seems loadables has a limit of five items, meaning > the newest rk356x ATF images which have four binaries, u-boot, and > optee trigger an error. > > > > > > Also, it still doesn't support passing two separate files to mkimage > > > at the same time, required for proper support of rk33xx_SPI generation > > > and for rk35xx in general. > > > > I got v1 of this booting from SPI, but on a board that doesn't use TPL. > > I see in doc/boards/rockchip.rst that one would indeed pass TPL+SPL to > > mkimage as two different files. I don't know how they're processed or > > anything about the rksd/rkspi formats though. > > RKSPI mode splits the image up into 2048 chunks, and pads each chunk > with 2048 of blank space. > For some reason the rk32/rk33 bootrom SPI code reads only 2048 out of > each 4096 chunk. > Delightfully this seems to have been fixed in rk35xx. > > > > > > Please see my standalone patch for what I hacked together to get that working: > > > http://patchwork.ozlabs.org/project/uboot/patch/20220301024826.1228290-1-pgwipeout@gmail.com/ > > > Note: those images are not functional either due to this issue. > > > > > > A wishlist item would be for it to produce the original idbloader.img > > > and u-boot.itb files, at least for now. Thanks for all the info. I look forward to kevin being supported...but I should try jerry as well. I hope to get this series applied soon and review the various follow-on patches. It would be great to sort things out this we as there are quite a few deficiencies in all of this, as you have found. But for now I will hold off on the rockchip-specific patches, until binman FIT is a bit better. Regards, Simon