From patchwork Fri Jul 22 11:35:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1659531 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) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lq7l33JYQz9sGV for ; Fri, 22 Jul 2022 22:18:39 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AEABE83FC0; Fri, 22 Jul 2022 14:18:11 +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 98F1E82DA1; Fri, 22 Jul 2022 13:35: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 autolearn=ham autolearn_force=no version=3.4.2 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) (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 3F08A83F92 for ; Fri, 22 Jul 2022 13:35:51 +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 2098610000E; Fri, 22 Jul 2022 11:35:42 +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, alpernebiyasak@gmail.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, jbx6244@gmail.com, deepakdas.linux@gmail.com, linux@alxd.me, mail@david-bauer.net, peterwillcn@gmail.com, heiko@sntech.de, w.egorov@phytec.de, pbrobinson@gmail.com, sunil@amarulasolutions.com, ldevulder@suse.com, akash@openedev.com, banglang.huang@foxmail.com, matwey.kornilov@gmail.com, michael@amarulasolutions.com, xypron.glpk@gmx.de, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [PATCH v2 2/7] rockchip: generate u-boot-rockchip.bin with binman for ARM64 boards Date: Fri, 22 Jul 2022 13:35:00 +0200 Message-Id: <20220722113505.3875669-3-foss+uboot@0leil.net> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220722113505.3875669-1-foss+uboot@0leil.net> References: <20220722113505.3875669-1-foss+uboot@0leil.net> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 22 Jul 2022 14:18:05 +0200 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 f780bfe211..7761a10b11 100644 --- a/Makefile +++ b/Makefile @@ -999,8 +999,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) @@ -1493,29 +1492,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) @@ -2218,7 +2194,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 d4fc83318a..64e90575d1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1960,7 +1960,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 = ; }; };