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 C7344C433EF for ; Thu, 19 May 2022 11:39:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 91DA883D61; Thu, 19 May 2022 13:39:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Gxqn4Q+s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B8BE783D7E; Thu, 19 May 2022 13:39:17 +0200 (CEST) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 BBA8083D9B for ; Thu, 19 May 2022 13:39:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ed1-x52a.google.com with SMTP id p26so6643928eds.5 for ; Thu, 19 May 2022 04:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=fh+wbaTOEiPD6KWeeYziI3MajjSeiaDIz4MvR5k1zPM=; b=Gxqn4Q+sSi71ZUtQVgqFqtV6FOQ2fdG19SJlxQHvmTeL66YaDTLq3QPalLr+zCEChA bUGZut7d688SCusDvGvJBE0iMBdNaqDYIVwfoihRhMNG133X0OEWxrSe6ucmGHksfzL6 p0/sZYWkgPeojiR97diELIfAJ02tqUEh2mk/WDqWjhjGNSo6RtsYOZZQqr6sTVHuIUYQ Td+zkbI385iB9eFuwgY9AUXhBD3SZO+QjqwyYtn/Fq1jHv4gZDoh0LmSnE8Wo2/FtIrV UngiaYV9cIzE8tS77k3S2ULmgoNeiHVP1wFon8N6NC6isPPsw6uf1Y2cQ8ImJn6Z2sNI EGPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=fh+wbaTOEiPD6KWeeYziI3MajjSeiaDIz4MvR5k1zPM=; b=zbqLCv4ZKQRVRZtz2to7Yg0T/K65Mtl/g653CuO6QoCheYwE+PfZ1OKLzFvJsclxxi W4an/bxUZ94eIFzCSPEACFP3yWVhj3sOa1IZmX3JBHpu8S1Vrz5MQ8GFfFqirabREHb2 nwWauM72ZW07g+lMT01ZaLOdTXnPRwDSrO37I+A6G/K5TlyzA80FQ61QNwCxmq037SoS jJEPCIA6mExH/Y6tox9OC1eFYdOqICt2AgArbwwdNz7nDBYePE7pYwfb5aPAQR8k6qsR I4tmdKfzQsHHRYejqhJLf6Q+SfO/cY9Z98OXtFh6nt6xwrheuG0uLdYhlvkFqMUPT1xc HG9g== X-Gm-Message-State: AOAM530CiuKGv6ruV2crcoFT5JYXL9nYBOk2KSfADR35+gfYZxU2Rl8/ +hdCTdPAFrtYUR67ieZwbwI= X-Google-Smtp-Source: ABdhPJw5iU/Ood4kmqXNVZIWg1jNe23hkNP+C1Xb09NGfnqurl38XQSkgTicYgeSh0HdfJW+gpgMDQ== X-Received: by 2002:a05:6402:90d:b0:428:c1ad:1e74 with SMTP id g13-20020a056402090d00b00428c1ad1e74mr4810452edz.345.1652960350389; Thu, 19 May 2022 04:39:10 -0700 (PDT) Received: from [192.168.0.74] ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id 6-20020a170906024600b006f3ef214e70sm1921385ejl.214.2022.05.19.04.39.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 May 2022 04:39:09 -0700 (PDT) Message-ID: Date: Thu, 19 May 2022 14:35:44 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 From: Alper Nebi Yasak Subject: Re: [RFC PATCH v2 0/8] Build Rockchip final images using binman To: Andrew Abbott Cc: Jagan Teki , Johan Jonker , Simon Glass , Samuel Dionne-Riel , Peter Robinson , Kever Yang , Philipp Tomsich , Andre Przywara , Bharat Gooty , Bin Meng , Fabio Estevam , Heiko Thiery , Heinrich Schuchardt , Klaus Goger , Levin Du , =?UTF-8?Q?Marek_Beh=c3=ban?= , "Marty E. Plummer" , Michal Simek , Quentin Schulz , Rayagonda Kokatanur , Rick Chen , Sean Anderson , Suniel Mahesh , U-Boot Mailing List References: <20220516110712.178958-1-andrew@mirx.dev> Content-Language: en-US In-Reply-To: <20220516110712.178958-1-andrew@mirx.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 16/05/2022 14:07, Andrew Abbott wrote: > My original goal was to produce SPI images for Rockchip platforms (specifically > for me, ROCKPro64, and in the future ROCK64). Looking into it, it seemed nicer > to just switch the SD/MMC image generation over to binman as well in the > process. > > This is my attempt to move Rockchip final full image generation to binman, > adding the option to make full SPI images as well. > > Other questions: > > - I noticed that ATF generation for ARM64 Rockchip is done via a Python script > instead of binman. I don't currently know how to change that over to binman, > but is that something worth pursuing as part of this? Simon was working on that in [1] (see patches 22-26 which weren't applied), but images produced by that don't exactly work (see comments on earlier versions [2]). Then, things got stalled/postponed because of various issues in binman AFAICT. The crux of the problem there is the binman-wise design of splitting bl31.elf into parts and putting them into the FIT. I have some weird ideas about generic mechanisms that would allow us to do it nicely, but nothing I could flesh out. Recently I've been thinking we might be able to sidestep it by putting the unsplit ELF directly into FIT (as a new IH_TYPE_ELF for mkimage?) and do the split-loading at runtime. I didn't have time to experiment on that, though. I'd appreciate it if you tried, but don't worry about it if you don't have the time. [1] binman: rockchip: Migrate from rockchip SPL_FIT_GENERATOR script https://lore.kernel.org/u-boot/20220306031917.3005215-1-sjg@chromium.org/ [2] rockchip: Support building the all output files in binman https://lore.kernel.org/u-boot/CAPnjgZ37wnb4r7zkkBMfAeGDir147R4kxMwUWAE0nj6iSYdZBQ@mail.gmail.com/ > Please give me your feedback! > > 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. > - Remove note from docs about different offsets in SPI flash for > different SoCs - this was a bad assumption on my part, it doesn't work > this way. > - Update name of SD/MMC image in the docs from u-boot-rockchip-sdmmc.bin > to u-boot-rockchip.bin. > > Andrew Abbott (8): > binman: mkimage: Support ':'-separated inputs > rockchip: Add binman definitions for final images > soc: rockchip: Include common U-Boot dtsi file > board: rockchip: Move SPI U-Boot offset to config > rockchip: Remove obsolete Makefile targets > rockchip: Enable binman for ARM64 > doc: rockchip: Update for new binman image generation > board: rockpro64: Enable building SPI image > > Kconfig | 4 +- > Makefile | 31 ++---------- > arch/arm/Kconfig | 2 +- > arch/arm/dts/rk3308-u-boot.dtsi | 2 + > arch/arm/dts/rk3328-u-boot.dtsi | 2 + > arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi | 1 - > arch/arm/dts/rk3368-u-boot.dtsi | 1 + > arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 4 -- > arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi | 1 - > arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 4 -- > arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 -- > arch/arm/dts/rk3568-u-boot.dtsi | 2 + > arch/arm/dts/rockchip-u-boot.dtsi | 53 ++++++++++++++++++-- > arch/arm/mach-rockchip/Kconfig | 7 ++- > arch/arm/mach-rockchip/rk3399/Kconfig | 1 + > configs/lion-rk3368_defconfig | 1 + > configs/pinebook-pro-rk3399_defconfig | 1 + > configs/puma-rk3399_defconfig | 2 +- > configs/roc-pc-rk3399_defconfig | 1 + > configs/rockpro64-rk3399_defconfig | 1 + > doc/board/rockchip/rockchip.rst | 29 +++-------- > tools/binman/etype/mkimage.py | 33 +++++++----- > 22 files changed, 100 insertions(+), 87 deletions(-) >