Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3892C4320A for ; Mon, 23 Aug 2021 12:13:39 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id AD15061391 for ; Mon, 23 Aug 2021 12:13:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AD15061391 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 258A882F08; Mon, 23 Aug 2021 14:13:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1629720816; bh=V+qgA4nNGbauhqNbyNLrWP9ZNg2sCKuOks+PeKb8AJk=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=i4vYYVRCvoWtuWjKDOEH2Y/rPs4zLSK8nM4aCzziPzYNBWM6Xo0KdgCKx/FSmwsO6 rvpwMpSa8eLslzkpa14pI1rvddCFbhinIEYJjCNwDMSsfdbEqDqdJ1cIfec7tby10j xe+aqWlN564HxRqcNNQ1nG6cds8G8gHqqwcclSCauuFr2eO+aCMJxN106XA/K19uEm aRnjMDQ4sOWbmRGcxnH+3sSHq0t76j4wudC2oQKk108u7WH4olTNiByhH/OAt4Z09q 4l67x+iHZStB1RLVJ0VbFpgNJlJ+F7flEqrzmLEXrXVOvt73TuLXot0MBCM4rgJCf7 iu5ISwIJqaIbw== Received: from localhost.localdomain (unknown [IPv6:2804:14c:485:504a:f281:f900:ccc8:936d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: festevam@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id C0C6E831E7; Mon, 23 Aug 2021 14:13:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1629720814; bh=V+qgA4nNGbauhqNbyNLrWP9ZNg2sCKuOks+PeKb8AJk=; h=From:To:Cc:Subject:Date:From; b=tSSyWR9Y9hg8atISS4MSlSU11qgoMPvWu541MxYwpui1ZsSBYI6Wo0gww82rdVDmm yX3RFdfG1L19/kvfAjsKDUkm3OyPJf5wgm4qbEXUEWSNBalhwV6KQ9zN2yczFaxLFa PBbp7AdborHW8o1SfN5q6CVDbKTcmo7YfRC7fT9+my2WWe9+En56uVRF0WQ3lYleCF ziO1mxkne11i2j3HVPghJ4J/k3RmHMM1fWVaJUJxL6dYWzSUD7ATT6rFd8FImHnNxJ l+WqTmxjCspXf7cmdM5Trka579LI2EiIHaefRfMT0mDPXgq+KzBx9PXv1op16vKZcj eG0jnkaoGo6MQ== From: Fabio Estevam To: sbabic@denx.de Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, hs@denx.de, heiko.thiery@gmail.com, frieder.schrempf@kontron.de, tharvey@gateworks.com, marcel.ziswiler@toradex.com, Fabio Estevam Subject: [PATCH v4] imx8mm-evk: Generate a single bootable flash.bin again Date: Mon, 23 Aug 2021 09:13:20 -0300 Message-Id: <20210823121320.2633307-1-festevam@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 8996e6b7c6a1 ("imx8mm_evk: switch to use binman to pack images"), 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 imx8mm_evk.rst to remove the u-boot.itb copy step. Signed-off-by: Fabio Estevam Reviewed-by: Frieder Schrempf Reviewed-by: Heiko Schocher Reviewed-by: Marcel Ziswiler --- Changes since v3: - Use u-boot-spl-ddr.bin in the LOADER section (Heiko) - Dropped patch 2/2 as it needs improvements. arch/arm/dts/imx8mm-evk-u-boot.dtsi | 17 ++++++++++++++++- .../imx8mm_evk/imximage-8mm-lpddr4.cfg | 2 +- doc/board/freescale/imx8mm_evk.rst | 1 - 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi index f200afac9f..75cd59e545 100644 --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi @@ -150,7 +150,7 @@ }; - flash { + spl { mkimage { args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000"; @@ -217,4 +217,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/board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg b/board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg index b89092a559..90573be5fd 100644 --- a/board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg +++ b/board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg @@ -6,4 +6,4 @@ #define __ASSEMBLY__ BOOT_FROM sd -LOADER mkimage.flash.mkimage 0x7E1000 +LOADER u-boot-spl-ddr.bin 0x7E1000 diff --git a/doc/board/freescale/imx8mm_evk.rst b/doc/board/freescale/imx8mm_evk.rst index 7fd3d72564..b377c4de27 100644 --- a/doc/board/freescale/imx8mm_evk.rst +++ b/doc/board/freescale/imx8mm_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/sdc bs=1024 seek=384 conv=sync Boot ---- -- 2.25.1