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 8C2D4C43334 for ; Mon, 25 Jul 2022 11:06:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 99AA9841AA; Mon, 25 Jul 2022 13:05:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C491784193; Mon, 25 Jul 2022 13:05:37 +0200 (CEST) Received: from mx1.tinet.cat (mx1.tinet.org [195.77.216.146]) (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 40D788419E for ; Mon, 25 Jul 2022 13:05:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xdrudis@tinet.cat X-ASG-Debug-ID: 1658747131-163e7b333914c120001-4l7tJC Received: from smtp01.tinet.cat (smtp.tinet.org [195.77.216.131]) by mx1.tinet.cat with ESMTP id LsciFeCcS2Q3QZiA; Mon, 25 Jul 2022 13:05:31 +0200 (CEST) X-Barracuda-Envelope-From: xdrudis@tinet.cat X-Barracuda-Effective-Source-IP: smtp.tinet.org[195.77.216.131] X-Barracuda-Apparent-Source-IP: 195.77.216.131 Received: from begut (99.red-79-152-185.dynamicip.rima-tde.net [79.152.185.99]) by smtp01.tinet.cat (Postfix) with ESMTPSA id 2DCF6605D0A0; Mon, 25 Jul 2022 13:05:31 +0200 (CEST) Date: Mon, 25 Jul 2022 13:05:29 +0200 From: Xavier Drudis Ferran To: Quentin Schulz Cc: Johan Jonker , Quentin Schulz , bharat.gooty@broadcom.com, kever.yang@rock-chips.com, jagan@amarulasolutions.com, andy.yan@rock-chips.com, hl@rock-chips.com, chenjh@rock-chips.com, manivannan.sadhasivam@linaro.org, nick@khadas.com, klaus.goger@theobroma-systems.com, jernej.skrabec@gmail.com, deepakdas.linux@gmail.com, linux@alxd.me, mail@david-bauer.net, peterwillcn@gmail.com, u-boot@lists.denx.de Subject: Re: [PATCH v2 1/7] rockchip: generate idbloader.img content for u-boot-rockchip.bin with binman for ARM Message-ID: <20220725110529.GB2029@begut> X-ASG-Orig-Subj: Re: [PATCH v2 1/7] rockchip: generate idbloader.img content for u-boot-rockchip.bin with binman for ARM References: <20220722113505.3875669-1-foss+uboot@0leil.net> <20220722113505.3875669-2-foss+uboot@0leil.net> <794bbfad-6579-ce3a-5faa-c8f758221196@gmail.com> <435a3e47-eb02-2543-e911-62e7c2cfe0c9@theobroma-systems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <435a3e47-eb02-2543-e911-62e7c2cfe0c9@theobroma-systems.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Barracuda-Connect: smtp.tinet.org[195.77.216.131] X-Barracuda-Start-Time: 1658747131 X-Barracuda-URL: https://webmail.tinet.cat:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1946 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.7025 1.0000 1.3879 X-Barracuda-Spam-Score: 1.39 X-Barracuda-Spam-Status: No, SCORE=1.39 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=6.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.99619 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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 Note: I removed a few recipients from Cc: with a quite random criteria, just to avoid error messages from the list software that there were too many addresses in Cc:. I hope those will get it from the list anyway and sorry if this is a problem. > I'm sure I'm just missing out on something obvious but cannot find it right > now. > I have an issue with the assumption of what u-boot-rockchip.bin is supposed > to be. What does it actually represent? > > I have three possible boot media on my board: SPI-NOR, eMMC and SD Card. > Both MMC devices can use the same offsets and images, so that's fine for me > to have something like u-boot-rockchip-mmc.bin. > However, SPI-NOR has a different offset for U-Boot proper than MMC devices. > It would be ridiculous to have two defconfigs with the only difference being > the value of SPL_PAD_TO option. Hence why there's a u-boot-rockchip-spi.bin > image now and also why I argue in this patch series that using SPL_PAD_TO is > incorrect. I replaced SPL_PAD_TO with the formula that was originally used > to define the padding, see https://source.denx.de/u-boot/u-boot/-/commit/79030a486128bdb6888059113711a6ae66ff89c5. > I understand this change is not ok, but I cannot use SPL_PAD_TO either. I > would like to have some opinion/answer on what I asked in the paragraph > above. The difference between u-boot-rockchip-mmc.bin and u-boot-rockchip-spi.bin is not only the offset. The image for SPI has the parts loaded by bootrom (tpl and spl) written in 8Kb chunks separated by 8Kb empty space (or something like this, I don't remember). That's why there are different -T rksd and -T rkspi options to mkimage. This is so at least for RK3399. I have no idea whether nand images need this special format or not, or whether it depends on the SoC model or what. If it's only the offset, then maybe we can avoid a 3rd image and reuse the MMC one. I don't know.