From patchwork Fri Jul 15 15:36:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1656960 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LkwTn2NWGz9s09 for ; Sat, 16 Jul 2022 01:37:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 387E28156B; Fri, 15 Jul 2022 17:37:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net 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 382D38156B; Fri, 15 Jul 2022 17:37:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9518E80909 for ; Fri, 15 Jul 2022 17:37:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 1A64F1C0008; Fri, 15 Jul 2022 15:37:11 +0000 (UTC) From: Quentin Schulz To: Cc: bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, jagan@amarulasolutions.com, xypron.glpk@gmx.de, pali@kernel.org, jbx6244@gmail.com, hanetzer@startmail.com, knaerzche@gmail.com, vagrant@debian.org, heiko.thiery@gmail.com, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [RFC PATCH 1/8] rockchip: generate idbloader.img content for u-boot-rockchip.bin with binman for ARM Date: Fri, 15 Jul 2022 17:36:48 +0200 Message-Id: <20220715153655.955874-2-foss+uboot@0leil.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220715153655.955874-1-foss+uboot@0leil.net> References: <20220715153655.955874-1-foss+uboot@0leil.net> MIME-Version: 1.0 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 From: Quentin Schulz idbloader.img content - currently created by way of Makefile - can be created by binman directly. So let's do that for Rockchip ARM platforms. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Makefile | 2 +- arch/arm/dts/rockchip-u-boot.dtsi | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 98867fbe06..ec6a13fd05 100644 --- a/Makefile +++ b/Makefile @@ -1000,7 +1000,7 @@ endif else ifeq ($(CONFIG_SPL),y) # Generate these inputs for binman which will create the output files -INPUTS-y += idbloader.img u-boot.img +INPUTS-y += u-boot.img endif endif endif diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index eae3ee715d..0362c97e0b 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -17,9 +17,20 @@ filename = "u-boot-rockchip.bin"; pad-byte = <0xff>; - blob { - filename = "idbloader.img"; + mkimage { + args = "-n", CONFIG_SYS_SOC, "-T", "rksd"; +#ifndef CONFIG_TPL + u-boot-spl { + }; }; +#else + u-boot-tpl { + }; + }; + + u-boot-spl { + }; +#endif u-boot-img { offset = ; From patchwork Fri Jul 15 15:36:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1656961 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LkwV02Z2Qz9s09 for ; Sat, 16 Jul 2022 01:37:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D07328215A; Fri, 15 Jul 2022 17:37:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net 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 3F2E781E76; Fri, 15 Jul 2022 17:37:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4820281877 for ; Fri, 15 Jul 2022 17:37:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 906AA1C000A; Fri, 15 Jul 2022 15:37:16 +0000 (UTC) From: Quentin Schulz To: Cc: bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, jagan@amarulasolutions.com, xypron.glpk@gmx.de, pali@kernel.org, jbx6244@gmail.com, hanetzer@startmail.com, knaerzche@gmail.com, vagrant@debian.org, heiko.thiery@gmail.com, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [RFC PATCH 2/8] rockchip: generate u-boot-rockchip.bin with binman for ARM64 boards Date: Fri, 15 Jul 2022 17:36:49 +0200 Message-Id: <20220715153655.955874-3-foss+uboot@0leil.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220715153655.955874-1-foss+uboot@0leil.net> References: <20220715153655.955874-1-foss+uboot@0leil.net> MIME-Version: 1.0 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 From: Quentin Schulz This allows to build u-boot-rockchip.bin binary with binman for Rockchip ARM64 boards instead of the legacy Makefile way. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Makefile | 28 ++-------------------------- arch/arm/Kconfig | 2 +- arch/arm/dts/rockchip-u-boot.dtsi | 5 +++++ 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index ec6a13fd05..d4f53afc66 100644 --- a/Makefile +++ b/Makefile @@ -994,8 +994,7 @@ ifeq ($(CONFIG_ARCH_ROCKCHIP),y) # On ARM64 this target is produced by binman so we don't need this dep ifeq ($(CONFIG_ARM64),y) ifeq ($(CONFIG_SPL),y) -# TODO: Get binman to generate this too -INPUTS-y += u-boot-rockchip.bin +INPUTS-y += u-boot.itb endif else ifeq ($(CONFIG_SPL),y) @@ -1488,29 +1487,6 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE $(call if_changed,pad_cat) -ifeq ($(CONFIG_ARCH_ROCKCHIP),y) - -# TPL + SPL -ifeq ($(CONFIG_SPL)$(CONFIG_TPL),yy) -MKIMAGEFLAGS_u-boot-tpl-rockchip.bin = -n $(CONFIG_SYS_SOC) -T rksd -tpl/u-boot-tpl-rockchip.bin: tpl/u-boot-tpl.bin FORCE - $(call if_changed,mkimage) -idbloader.img: tpl/u-boot-tpl-rockchip.bin spl/u-boot-spl.bin FORCE - $(call if_changed,cat) -else -MKIMAGEFLAGS_idbloader.img = -n $(CONFIG_SYS_SOC) -T rksd -idbloader.img: spl/u-boot-spl.bin FORCE - $(call if_changed,mkimage) -endif - -ifeq ($(CONFIG_ARM64),y) -OBJCOPYFLAGS_u-boot-rockchip.bin = -I binary -O binary \ - --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff -u-boot-rockchip.bin: idbloader.img u-boot.itb FORCE - $(call if_changed,pad_cat) -endif # CONFIG_ARM64 - -endif # CONFIG_ARCH_ROCKCHIP ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy) MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE) @@ -2213,7 +2189,7 @@ CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \ tools/version.h u-boot* MLO* SPL System.map fit-dtb.blob* \ u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \ lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \ - idbloader.img flash.bin flash.log defconfig keep-syms-lto.c \ + flash.bin flash.log defconfig keep-syms-lto.c \ mkimage-out.spl.mkimage mkimage.spl.mkimage imx-boot.map \ itb.fit.fit itb.fit.itb itb.map spl.map diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9898c7d68e..4b2464c197 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1973,7 +1973,7 @@ config ARCH_STM32MP config ARCH_ROCKCHIP bool "Support Rockchip SoCs" select BLK - select BINMAN if SPL_OPTEE || (SPL && !ARM64) + select BINMAN if SPL_OPTEE || SPL select DM select DM_GPIO select DM_I2C diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index 0362c97e0b..aef6c379e2 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -32,7 +32,12 @@ }; #endif +#ifdef CONFIG_ARM64 + blob { + filename = "u-boot.itb"; +#else u-boot-img { +#endif offset = ; }; }; From patchwork Fri Jul 15 15:36:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1656962 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LkwVD6NSyz9s09 for ; Sat, 16 Jul 2022 01:37:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C836E830B6; Fri, 15 Jul 2022 17:37:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net 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 600AF8215B; Fri, 15 Jul 2022 17:37:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D6BC3819AA for ; Fri, 15 Jul 2022 17:37:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 3E8631C0002; Fri, 15 Jul 2022 15:37:21 +0000 (UTC) From: Quentin Schulz To: Cc: bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, jagan@amarulasolutions.com, xypron.glpk@gmx.de, pali@kernel.org, jbx6244@gmail.com, hanetzer@startmail.com, knaerzche@gmail.com, vagrant@debian.org, heiko.thiery@gmail.com, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [RFC PATCH 3/8] rockchip: remove unneeded CONFIG_SPL_PAD_TO Date: Fri, 15 Jul 2022 17:36:50 +0200 Message-Id: <20220715153655.955874-4-foss+uboot@0leil.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220715153655.955874-1-foss+uboot@0leil.net> References: <20220715153655.955874-1-foss+uboot@0leil.net> MIME-Version: 1.0 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 From: Quentin Schulz Since binman takes care of setting the appropriate offset for the SPL payload, there's no need to define this variable anymore. Moreover, it is technically incorrect since the padding is different depending on whether the first stage bootloader is for a SPI flash or MMC storage medium. Finally, this allows to use the CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR config option without redefining CONFIG_SPL_PAD_TO in other board header files. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- arch/arm/dts/rockchip-u-boot.dtsi | 2 +- include/configs/rockchip-common.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index aef6c379e2..fc28ce5187 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -38,7 +38,7 @@ #else u-boot-img { #endif - offset = ; + offset = <((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512)>; }; }; }; diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h index 0c08776ae2..40d5a02fc8 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -9,8 +9,6 @@ #define CONFIG_SYS_NS16550_MEM32 -/* ((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512) */ -#define CONFIG_SPL_PAD_TO 8355840 #ifndef CONFIG_SPL_BUILD From patchwork Fri Jul 15 15:36:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1656963 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LkwVT5s9Zz9s09 for ; Sat, 16 Jul 2022 01:38:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 58E0A80FA1; Fri, 15 Jul 2022 17:37:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net 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 5282281F69; Fri, 15 Jul 2022 17:37:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 45B5B82A56 for ; Fri, 15 Jul 2022 17:37:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 93D361C0003; Fri, 15 Jul 2022 15:37:25 +0000 (UTC) From: Quentin Schulz To: Cc: bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, jagan@amarulasolutions.com, xypron.glpk@gmx.de, pali@kernel.org, jbx6244@gmail.com, hanetzer@startmail.com, knaerzche@gmail.com, vagrant@debian.org, heiko.thiery@gmail.com, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [RFC PATCH 4/8] rockchip: pad u-boot-rockchip.bin correctly Date: Fri, 15 Jul 2022 17:36:51 +0200 Message-Id: <20220715153655.955874-5-foss+uboot@0leil.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220715153655.955874-1-foss+uboot@0leil.net> References: <20220715153655.955874-1-foss+uboot@0leil.net> MIME-Version: 1.0 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 From: Quentin Schulz On MMC storage media, the TPL/SPL needs to be flashed at offset 32KB. Instead of requesting the user to put the input the appropriate offsets, let's create u-boot-rockchip.bin with the padding already added. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- arch/arm/dts/rockchip-u-boot.dtsi | 3 ++- doc/board/rockchip/rockchip.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index fc28ce5187..4cd243514e 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -18,6 +18,7 @@ pad-byte = <0xff>; mkimage { + offset = <(32 * 1024)>; /* 32KB */ args = "-n", CONFIG_SYS_SOC, "-T", "rksd"; #ifndef CONFIG_TPL u-boot-spl { @@ -38,7 +39,7 @@ #else u-boot-img { #endif - offset = <((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512)>; + offset = <(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)>; }; }; }; diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst index 4ca7b00b1f..1995882244 100644 --- a/doc/board/rockchip/rockchip.rst +++ b/doc/board/rockchip/rockchip.rst @@ -179,7 +179,7 @@ To write an image that boots from a SD card (assumed to be /dev/sda): .. code-block:: bash - sudo dd if=u-boot-rockchip.bin of=/dev/sda seek=64 + sudo dd if=u-boot-rockchip.bin of=/dev/sda sync eMMC From patchwork Fri Jul 15 15:36:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1656964 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LkwVj3t7dz9s09 for ; Sat, 16 Jul 2022 01:38:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 97B8681F69; Fri, 15 Jul 2022 17:37:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net 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 CD5B583C51; Fri, 15 Jul 2022 17:37:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5A91981E51 for ; Fri, 15 Jul 2022 17:37:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 2FB061C0002; Fri, 15 Jul 2022 15:37:30 +0000 (UTC) From: Quentin Schulz To: Cc: bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, jagan@amarulasolutions.com, xypron.glpk@gmx.de, pali@kernel.org, jbx6244@gmail.com, hanetzer@startmail.com, knaerzche@gmail.com, vagrant@debian.org, heiko.thiery@gmail.com, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [RFC PATCH 5/8] rockchip: simplify binman image dependencies addition to INPUTS Date: Fri, 15 Jul 2022 17:36:52 +0200 Message-Id: <20220715153655.955874-6-foss+uboot@0leil.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220715153655.955874-1-foss+uboot@0leil.net> References: <20220715153655.955874-1-foss+uboot@0leil.net> MIME-Version: 1.0 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 From: Quentin Schulz By factoring SPL check in the first condition, this makes the checks a bit less convoluted and more readable. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d4f53afc66..ad95cd0c96 100644 --- a/Makefile +++ b/Makefile @@ -990,19 +990,14 @@ ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy) INPUTS-y += u-boot-with-dtb.bin endif -ifeq ($(CONFIG_ARCH_ROCKCHIP),y) -# On ARM64 this target is produced by binman so we don't need this dep +ifeq ($(CONFIG_ARCH_ROCKCHIP)$(CONFIG_SPL),yy) +# Binman image dependencies ifeq ($(CONFIG_ARM64),y) -ifeq ($(CONFIG_SPL),y) INPUTS-y += u-boot.itb endif else -ifeq ($(CONFIG_SPL),y) -# Generate these inputs for binman which will create the output files INPUTS-y += u-boot.img endif -endif -endif INPUTS-$(CONFIG_X86) += u-boot-x86-start16.bin u-boot-x86-reset16.bin \ $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \ From patchwork Fri Jul 15 15:36:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1656965 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LkwVw4TYTz9s09 for ; Sat, 16 Jul 2022 01:38:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9728D83666; Fri, 15 Jul 2022 17:37:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net 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 5824B80192; Fri, 15 Jul 2022 17:37:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BBF3783AE2 for ; Fri, 15 Jul 2022 17:37:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 427981C0008; Fri, 15 Jul 2022 15:37:34 +0000 (UTC) From: Quentin Schulz To: Cc: bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, jagan@amarulasolutions.com, xypron.glpk@gmx.de, pali@kernel.org, jbx6244@gmail.com, hanetzer@startmail.com, knaerzche@gmail.com, vagrant@debian.org, heiko.thiery@gmail.com, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [RFC PATCH 6/8] rockchip: allow to build SPI images even without HAS_ROM option Date: Fri, 15 Jul 2022 17:36:53 +0200 Message-Id: <20220715153655.955874-7-foss+uboot@0leil.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220715153655.955874-1-foss+uboot@0leil.net> References: <20220715153655.955874-1-foss+uboot@0leil.net> MIME-Version: 1.0 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 From: Quentin Schulz This prepares for the creation of a u-boot-rockchip-spi.bin image similar to u-boot-rockchip.bin to the exception it's destined for SPI-NOR flashes instead of MMC storage medium. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- arch/arm/dts/rk3288-u-boot.dtsi | 2 +- arch/arm/dts/rk3399-u-boot.dtsi | 2 +- arch/arm/mach-rockchip/Kconfig | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm/dts/rk3288-u-boot.dtsi b/arch/arm/dts/rk3288-u-boot.dtsi index 9eb696b141..e411445ed6 100644 --- a/arch/arm/dts/rk3288-u-boot.dtsi +++ b/arch/arm/dts/rk3288-u-boot.dtsi @@ -56,7 +56,7 @@ }; }; -#ifdef CONFIG_ROCKCHIP_SPI_IMAGE +#if defined(CONFIG_ROCKCHIP_SPI_IMAGE) && defined(CONFIG_HAS_ROM) &binman { rom { filename = "u-boot.rom"; diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi index 716b9a433a..3c1a15fe51 100644 --- a/arch/arm/dts/rk3399-u-boot.dtsi +++ b/arch/arm/dts/rk3399-u-boot.dtsi @@ -60,7 +60,7 @@ }; -#ifdef CONFIG_ROCKCHIP_SPI_IMAGE +#if defined(CONFIG_ROCKCHIP_SPI_IMAGE) && defined(CONFIG_HAS_ROM) &binman { rom { filename = "u-boot.rom"; diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index c561a77e6a..b46cea2f91 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -425,12 +425,10 @@ 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 a SPI-flash image containing U-Boot. The image + is built by binman. U-Boot sits near the start of the image. config LNX_KRNL_IMG_TEXT_OFFSET_BASE default SYS_TEXT_BASE From patchwork Fri Jul 15 15:36:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1656966 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LkwW806Jqz9s09 for ; Sat, 16 Jul 2022 01:38:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 46E2983AB7; Fri, 15 Jul 2022 17:38:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net 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 D52A08362A; Fri, 15 Jul 2022 17:37:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B628881E76 for ; Fri, 15 Jul 2022 17:37:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id B0A061C0009; Fri, 15 Jul 2022 15:37:38 +0000 (UTC) From: Quentin Schulz To: Cc: bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, jagan@amarulasolutions.com, xypron.glpk@gmx.de, pali@kernel.org, jbx6244@gmail.com, hanetzer@startmail.com, knaerzche@gmail.com, vagrant@debian.org, heiko.thiery@gmail.com, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [RFC PATCH 7/8] binman: add support for skipping file concatenation for mkimage Date: Fri, 15 Jul 2022 17:36:54 +0200 Message-Id: <20220715153655.955874-8-foss+uboot@0leil.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220715153655.955874-1-foss+uboot@0leil.net> References: <20220715153655.955874-1-foss+uboot@0leil.net> MIME-Version: 1.0 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 From: Quentin Schulz Some image types handled by mkimage require the datafiles to be passed independently (-d data1:data2) for specific handling of each. A concatenation of datafiles prior to passing them to mkimage wouldn't work. That is the case for rksd and rkspi for example, which require page alignment (plus some weird hack for rkspi) plus size data of each stage to be embedded in the mkimage header. This adds the ability to tell binman to pass the datafiles without prior concatenation to mkimage, by adding the multiple-data-files boolean property to the mkimage node. Cc: Quentin Schulz Signed-off-by: Quentin Schulz Reviewed-by: Simon Glass --- tools/binman/entries.rst | 22 +++++++++++++++++++ tools/binman/etype/mkimage.py | 41 +++++++++++++++++++++++++++++++---- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/tools/binman/entries.rst b/tools/binman/entries.rst index ae4305c99e..60c89aec59 100644 --- a/tools/binman/entries.rst +++ b/tools/binman/entries.rst @@ -1101,6 +1101,9 @@ Entry: mkimage: Binary produced by mkimage Properties / Entry arguments: - datafile: Filename for -d argument + - multiple-data-files: boolean to tell binman to pass all files as + datafiles to mkimage instead of creating a temporary file the result + of datafiles concatenation - args: Other arguments to pass The data passed to mkimage is collected from subnodes of the mkimage node, @@ -1117,6 +1120,25 @@ This calls mkimage to create an imximage with u-boot-spl.bin as the input file. The output from mkimage then becomes part of the image produced by binman. +To pass all datafiles untouched to mkimage:: + + mkimage { + args = "-n rk3399 -T rkspi"; + multiple-data-files; + + u-boot-tpl { + }; + + u-boot-spl { + }; + }; + +This calls mkimage to create a Rockchip RK3399-specific first stage +bootloader, made of TPL+SPL. Since this first stage bootloader requires to +align the TPL and SPL but also some weird hacks that is handled by mkimage +directly, binman is told to not perform the concatenation of datafiles prior +to passing the data to mkimage. + To use CONFIG options in the arguments, use a string list instead, as in this example which also produces four arguments:: diff --git a/tools/binman/etype/mkimage.py b/tools/binman/etype/mkimage.py index 5f6def2287..52297c23ea 100644 --- a/tools/binman/etype/mkimage.py +++ b/tools/binman/etype/mkimage.py @@ -16,6 +16,9 @@ class Entry_mkimage(Entry): Properties / Entry arguments: - datafile: Filename for -d argument + - multiple-data-files: boolean to tell binman to pass all files as + datafiles to mkimage instead of creating a temporary file the result + of datafiles concatenation - args: Other arguments to pass The data passed to mkimage is collected from subnodes of the mkimage node, @@ -32,6 +35,25 @@ class Entry_mkimage(Entry): file. The output from mkimage then becomes part of the image produced by binman. + To pass all datafiles untouched to mkimage:: + + mkimage { + args = "-n rk3399 -T rkspi"; + multiple-data-files; + + u-boot-tpl { + }; + + u-boot-spl { + }; + }; + + This calls mkimage to create a Rockchip RK3399-specific first stage + bootloader, made of TPL+SPL. Since this first stage bootloader requires to + align the TPL and SPL but also some weird hacks that is handled by mkimage + directly, binman is told to not perform the concatenation of datafiles prior + to passing the data to mkimage. + To use CONFIG options in the arguments, use a string list instead, as in this example which also produces four arguments:: @@ -46,16 +68,27 @@ class Entry_mkimage(Entry): def __init__(self, section, etype, node): super().__init__(section, etype, node) self._args = fdt_util.GetArgs(self._node, 'args') + self._multiple_data_files = fdt_util.GetBool(self._node, 'multiple-data-files') self._mkimage_entries = OrderedDict() self.align_default = None self.ReadEntries() def ObtainContents(self): # Use a non-zero size for any fake files to keep mkimage happy - data, input_fname, uniq = self.collect_contents_to_file( - self._mkimage_entries.values(), 'mkimage', 1024) - if data is None: - return False + fake_size = 1024 + if self._multiple_data_files: + fnames = [] + uniq = self.GetUniqueName() + for entry in self._mkimage_entries.values(): + if not entry.ObtainContents(fake_size=fake_size): + return False + fnames.append(entry.GetDefaultFilename()) + input_fname = ":".join(fnames) + else: + data, input_fname, uniq = self.collect_contents_to_file( + self._mkimage_entries.values(), 'mkimage', fake_size) + if data is None: + return False output_fname = tools.get_output_filename('mkimage-out.%s' % uniq) if self.mkimage.run_cmd('-d', input_fname, *self._args, output_fname) is not None: From patchwork Fri Jul 15 15:36:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1656967 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LkwWM0rJtz9s09 for ; Sat, 16 Jul 2022 01:38:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6EDF783AD1; Fri, 15 Jul 2022 17:38:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net 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 F094D83D18; Fri, 15 Jul 2022 17:37:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 71D7883660 for ; Fri, 15 Jul 2022 17:37:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id A7AA91C0002; Fri, 15 Jul 2022 15:37:43 +0000 (UTC) From: Quentin Schulz To: Cc: bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, jagan@amarulasolutions.com, xypron.glpk@gmx.de, pali@kernel.org, jbx6244@gmail.com, hanetzer@startmail.com, knaerzche@gmail.com, vagrant@debian.org, heiko.thiery@gmail.com, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [RFC PATCH 8/8] rockchip: add u-boot-rockchip-spi.bin image for booting from SPI-NOR flash Date: Fri, 15 Jul 2022 17:36:55 +0200 Message-Id: <20220715153655.955874-9-foss+uboot@0leil.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220715153655.955874-1-foss+uboot@0leil.net> References: <20220715153655.955874-1-foss+uboot@0leil.net> MIME-Version: 1.0 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 From: Quentin Schulz This new image is similar to u-boot-rockchip.bin except that it's destined to be flashed on SPI-NOR flashes. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- arch/arm/dts/rockchip-u-boot.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index 4cd243514e..d378d9d57b 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -42,5 +42,34 @@ offset = <(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)>; }; }; + +#ifdef CONFIG_ROCKCHIP_SPI_IMAGE + simple-bin-spi { + filename = "u-boot-rockchip-spi.bin"; + pad-byte = <0xff>; + + mkimage { + args = "-n", CONFIG_SYS_SOC, "-T", "rkspi"; +#ifdef CONFIG_TPL + multiple-data-files; + + u-boot-tpl { + }; +#endif + u-boot-spl { + }; + }; + +#ifdef CONFIG_ARM64 + blob { + filename = "u-boot.itb"; +#else + u-boot-img { +#endif + /* Sync with u-boot,spl-payload-offset if present */ + offset = ; + }; + }; +#endif }; #endif