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 5B273C433F5 for ; Tue, 15 Feb 2022 11:54:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31EB283A6E; Tue, 15 Feb 2022 12:54:00 +0100 (CET) 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="B3/TX54I"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5793583A41; Tue, 15 Feb 2022 12:53:55 +0100 (CET) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (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 0E07283A69 for ; Tue, 15 Feb 2022 12:53:50 +0100 (CET) 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-ej1-x629.google.com with SMTP id vz16so4206734ejb.0 for ; Tue, 15 Feb 2022 03:53:50 -0800 (PST) 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=jLeErJsENxY3SkTNIOOLlJdG1JLYb/lNMdq290AT2bk=; b=B3/TX54IW9+LzpsGJpIQTlrzUDgltG+vMRH1CqEM46p8ihVMdUHDbRQFHFM3I1ZGnh zqCmQ3LkWzXznk7ttepPnJ2nczt4q9mkynUGUJx44H9KuSNXA77QH6lWkNpl6JKxAHEp SMaedtig6KyHGlA6TdadSkquPWZQzj+tFlhW0r76TAi2C7byYzg+FSeToJUy1DZyk06W DfKCn1wzgtyQpwAm6jhM/BJtvDnjr6URLQZ6/ItsTzOgsf/azBf+E1at3J/N2MyOJXs2 VfpfT1g+CfdkvMEu6nzQOB2U/ut1KJyWXZ1AtNn2+XckVTFfvAioUeyJSoEcp+yoyI3k JJtA== 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=jLeErJsENxY3SkTNIOOLlJdG1JLYb/lNMdq290AT2bk=; b=gPG0vlzWjXTq+4ByGykMxlVDNzbEg/WxuC4db5C0sOHgqyVHN1/reEFSIDlxQMZKPC KkrDO0y7w1dyT5H8kDG0WT0s1NqXzXlfyX3gR22nldm1eW8CasU99zJvzExQ3OwaZzFb EbprR4u11HPoD09tDf8wZTQ6xA2hqEa0m98FpqmVoCHM5S4cj69wpS7J87WZEY+UzVAJ 9S7OK4FsTd0qR45JPpJ6b03vFaH/VYkJmny0mU3R3iObfhQj1pio2j2g+FFT9fmBfZqK ltkbOZ5yQeIXDrCvaWLq+2cHMrRoeA4FVxX1XbDEL0J64PveB+ldRy4AXScPBm/kRjMP ZQIw== X-Gm-Message-State: AOAM532P97mtGbV72JayUuoRMWIDzZD3W2aobENKIBs51Cpa03frikJ2 K1ytByxV4RGqhXLRjR0cXh4= X-Google-Smtp-Source: ABdhPJy/mkWUhtnBgAW/OgumdsaFHWKcJEqePlpurWIV1mXeFZXc7BI5zf/1DMnK4ewpcXhQZCmq8g== X-Received: by 2002:a17:906:7949:: with SMTP id l9mr2682517ejo.296.1644926029710; Tue, 15 Feb 2022 03:53:49 -0800 (PST) Received: from [192.168.0.74] ([178.233.26.119]) by smtp.gmail.com with ESMTPSA id oz23sm1830665ejb.174.2022.02.15.03.53.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Feb 2022 03:53:49 -0800 (PST) Message-ID: Date: Tue, 15 Feb 2022 14:48:24 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 From: Alper Nebi Yasak Subject: Re: [PATCH 22/24] rockchip: Support building the all output files in binman To: Simon Glass , U-Boot Mailing List Cc: huang lin , Jeffy Chen , Kever Yang , Tom Rini , Philippe Reynes , Ivan Mikhaylov References: <20220208185008.35843-1-sjg@chromium.org> <20220208185008.35843-18-sjg@chromium.org> Content-Language: en-US In-Reply-To: <20220208185008.35843-18-sjg@chromium.org> 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 08/02/2022 21:50, Simon Glass wrote: > Add the required binman images to replace the Makefile rules which are > currently used. This includes subsuming: > > - tpl/u-boot-tpl-rockchip.bin if TPL is enabled > - idbloader.img if either or both of SPL and TPL are enabled > - u-boot.itb2 if SPL_FIT is enabled > - u-boot-rockchip.bin if SPL is used, either using u-boot.itb2 when > SPL_FIT is enabled or u-boot.img when it isn't > > For now u-boot.itb2 is used as the FIT filename to avoid conflicting with > the current u-boot.itb file. This will be updated in a future patch. I don't see a u-boot.itb2 anywhere. Something from an earlier revision or does binman append the number to avoid overwriting existing files? > > Note that the intermediate files are dropped with binman, since it > producing everything in one pass. This means that > tpl/u-boot-tpl-rockchip.bin is not created, for example. > > Note that for some 32-bit rk3288 boards, rockchip-optee.dtsi is included. > > Signed-off-by: Simon Glass > --- > > arch/arm/dts/rockchip-u-boot.dtsi | 84 ++++++++++++++++++++++++++++++- > 1 file changed, 82 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi > index eae3ee715d..6246ca12b7 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 = ; > + images { > + u-boot { > + description = "U-Boot (64-bit)"; > + type = "standalone"; > + os = "U-Boot"; > + arch = "arm64"; > + compression = "none"; > + load = ; > + u-boot-nodtb { > + }; > + }; > > + @atf-SEQ { > + fit,operation = "split-elf"; > + description = "ARM Trusted Firmware"; > + type = "firmware"; > + arch = "arm64"; > + os = "arm-trusted-firmware"; > + compression = "none"; > + fit,load; > + fit,entry; > + fit,data; > + > + atf-bl31 { > + }; > + }; > + @tee-SEQ { > + fit,operation = "split-elf"; > + description = "TEE"; > + type = "tee"; > + arch = "arm64"; > + os = "tee"; > + compression = "none"; > + fit,load; > + fit,entry; > + fit,data; > + > + op-tee { > + }; > + }; > + > + @fdt-SEQ { > + description = "fdt-NAME"; > + compression = "none"; > + type = "flat_dt"; > + }; > + }; > + > + configurations { > + default = "@config-DEFAULT-SEQ"; > + @config-SEQ { > + description = "NAME.dtb"; > + fdt = "fdt-SEQ"; > + firmware = "u-boot"; > + fit,loadables; > + }; > + }; > + }; > +#else This should be done for the SPI ROM image in rk3399-u-boot.dtsi as well, and with that my chromebook_kevin can boot into Linux or EFI GRUB quite nicely. I changed the "rksd" parts to "rkspi", and as I wrote on a different patch I had to change the firmware and loadables like so (where I wasn't passing in an op-tee at all): configurations { default = "@config-DEFAULT-SEQ"; @config-SEQ { description = "NAME.dtb"; fdt = "fdt-SEQ"; firmware = "atf-1"; loadables = "u-boot", "atf-2", "atf-3"; }; }; I also had to use the same offset as the u-boot-img there, so maybe this needs the offset below as well. > u-boot-img { > offset = ; > }; > +#endif /* CONFIG_ARM64 */ > }; > }; > #endif