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 97809C433EF for ; Sat, 8 Jan 2022 14:58:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B9ECA8373B; Sat, 8 Jan 2022 15:58:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=blueri.se 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 C85CE8377A; Sat, 8 Jan 2022 15:58:19 +0100 (CET) Received: from ams.blueri.se (ams.blueri.se [IPv6:2a03:6000:6f70:601::204]) (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 22368836C5 for ; Sat, 8 Jan 2022 15:58:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=blueri.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick@blueri.se Received: from ryzen.fritz.box (p5b211402.dip0.t-ipconnect.de [91.33.20.2]) by ams.blueri.se (OpenSMTPD) with ESMTPSA id a939fce5 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 8 Jan 2022 15:58:16 +0100 (CET) Date: Sat, 8 Jan 2022 15:58:14 +0100 From: Patrick Wildt To: Fabio Estevam Cc: Frieder Schrempf , Heiko Schocher , Marcel Ziswiler , Heiko Thiery , Peng Fan , Tom Rini , Stefano Babic , u-boot@lists.denx.de Subject: [PATCH] imx8mq: Generate a single bootable flash.bin again Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 at phobos.denx.de X-Virus-Status: Clean After the conversion to binman in commit c1ecd03d90c7 ("imx: imx8mq_evk: switch to binman"), it is necessary to flash both flash.bin and u-boot.itb to get a bootable system. Prior to this commit, only flash.bin was needed. Such new requirement breaks existing distro mechanisms to generate the final binary because the extra u-boot.itb is now required. Generate a final flash.bin that can be used again as a single bootable binary to keep the original behavior. After this change the SPL binary is called spl.bin, which is a more descriptive name for its purpose, and can still be used standalone (for example, for secure boot purposes). Also update imx8mq_evk.rst to remove the u-boot.itb copy step. This is a cherry-pick of 028abfd9b157 ("imx8mm-evk: Generate a single bootable flash.bin again") adjusted to apply to i.MX8MQ. Signed-off-by: Patrick Wildt --- arch/arm/dts/imx8mq-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/mach-imx/imx8m/imximage.cfg | 2 +- doc/board/nxp/imx8mq_evk.rst | 1 - 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi index 2c10e9b645..8a6075c77b 100644 --- a/arch/arm/dts/imx8mq-u-boot.dtsi +++ b/arch/arm/dts/imx8mq-u-boot.dtsi @@ -50,7 +50,9 @@ }; }; - flash { + spl { + filename = "spl.bin"; + mkimage { args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000"; @@ -119,4 +121,19 @@ }; }; }; + + imx-boot { + filename = "flash.bin"; + pad-byte = <0x00>; + + spl: blob-ext@1 { + offset = <0x0>; + filename = "spl.bin"; + }; + + uboot: blob-ext@2 { + offset = <0x57c00>; + filename = "u-boot.itb"; + }; + }; }; diff --git a/arch/arm/mach-imx/imx8m/imximage.cfg b/arch/arm/mach-imx/imx8m/imximage.cfg index 9c6eaf0a6d..2a3f959183 100644 --- a/arch/arm/mach-imx/imx8m/imximage.cfg +++ b/arch/arm/mach-imx/imx8m/imximage.cfg @@ -8,4 +8,4 @@ FIT BOOT_FROM sd SIGNED_HDMI signed_hdmi.bin -LOADER mkimage.flash.mkimage 0x7e1000 +LOADER u-boot-spl-ddr.bin 0x7e1000 diff --git a/doc/board/nxp/imx8mq_evk.rst b/doc/board/nxp/imx8mq_evk.rst index 92eeda79aa..aa1ecfb47a 100644 --- a/doc/board/nxp/imx8mq_evk.rst +++ b/doc/board/nxp/imx8mq_evk.rst @@ -50,7 +50,6 @@ Burn the flash.bin to MicroSD card offset 33KB: .. code-block:: bash $sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=notrunc - $sudo dd if=u-boot.itb of=/dev/sd[x] bs=1024 seek=384 conv=notrunc Boot ---- -- 2.34.1