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=-21.0 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,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 AF5E6C4338F for ; Tue, 17 Aug 2021 03:56:34 +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 7A79660241 for ; Tue, 17 Aug 2021 03:56:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7A79660241 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 A256382903; Tue, 17 Aug 2021 05:56:30 +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=1629172590; bh=82s+V0BivtlfyD+j4+jLPFd192fChbOg7H2QbEAVGg8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=gc0rRkRwzMw9tYpR/jg/xpJ84ZDaa2FgsSIDrIl27Uy2LG/GW1NkNNRMe1LJe8vq0 r/bjubRWnKArCoYKjnQF0mCfM5FrDtLRRQmgcxEWtymXk4fxfMtUsR3pDEBiukLj9X LbQcAMv9iqPB0wLewH9blFdI9wWMMdEG/SkCUwNzgvJK0kwlGom7yrTtvmaH9nxyZK 09LAgUZiL9XdRTxpDYWEGRmG4O4qzlwwVom1tIE2Av5NvaxS5W9hq2wabu4LDrSh0g 9hS+GJDDvzMeeX4dGdRTfvN4vNSxz1J7L3ngqax/4cGBFxOFI0sQUXfdNipAMJsmvL v5vqzW5iOiDSA== Received: from [192.168.1.107] (87-97-28-105.pool.digikabel.hu [87.97.28.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: hs@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 1C9EA80C87; Tue, 17 Aug 2021 05:56:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1629172589; bh=82s+V0BivtlfyD+j4+jLPFd192fChbOg7H2QbEAVGg8=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=fiwPgGmdmrz6UpHedeaPfzEgVYs0mVmzf9Qe2QOIYWEEu3lStIf5qCEHG+58Kqc0f rRBurvTP6ap+WyP+B+2cfEq+bbgnCv/yAI8BxN5OVIUqzkyGuaM8yfIvvpMgZYpeMs Ug8bTvaWRrYrDXnBCqVOutWG0uWQ9mbmRRWfTR4SfL4YXPOdG8IWooWOQOzMXEC/hn 6/1+U/y4bfBGwvlFgnWXLqqfWC8vBmbinmSxawqoVyvzMRTq1y3wPI1i87FL87L5OE KUyieFke6WPzDRRP/r2H8shvfS/g75eqQAwp4Ss4dD88fjVo2aDcenx9vw89PE3sQC HJwWx3HTVmiaA== Subject: Re: [RFC] imx8mm-evk: Generate a bootable flash.bin again To: Fabio Estevam , sbabic@denx.de Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, heiko.thiery@gmail.com, frieder.schrempf@kontron.de, tharvey@gateworks.com References: <20210816152132.306399-1-festevam@denx.de> From: Heiko Schocher Message-ID: <01dda5ff-e70c-cc20-183d-376f3d2104f7@denx.de> Date: Tue, 17 Aug 2021 05:56:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210816152132.306399-1-festevam@denx.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Reply-To: hs@denx.de 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 Hello Fabio, On 16.08.21 17:21, Fabio Estevam wrote: > After the convesion 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 image because the extra u-boot.itb is now required. > > Generate a final flash.bin image that can be used again as a single > bootable image to keep the original behavior. > > Suggested-by: Heiko Schocher > Signed-off-by: Fabio Estevam > --- > arch/arm/dts/imx8mm-evk-u-boot.dtsi | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi > index f200afac9f..ad3056c7c8 100644 > --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi > +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi > @@ -217,4 +217,19 @@ > }; > }; > }; > + > + imx-boot { > + filename = "flash.bin"; I am unsure here, if it makes sense to overwrite flash.bin with the binary which contains SPL and u-boot.itb. May others want to use them (as I currently use them for signing them) Why not imx-boot as image name as in NXP sources? (Thats why I named it so in my "fast example approach") > + pad-byte = <0x00>; > + > + spl: blob-ext@1 { > + offset = <0x0>; > + filename = "flash.bin"; > + }; > + > + uboot: blob-ext@2 { > + offset = <0x57c00>; > + filename = "u-boot.itb"; > + }; > + }; > }; > regarding the question, if we can make a generic file .. for example on the imx8mp-phyboard-pollux-rdk u-boot is at offset 0x60000 in QSPI NOR ( for QSPI boot of course) So, there should be something like this: + imx-boot { + filename = "imx-boot"; + pad-byte = <0x00>; + + qspiheader: blob-ext@2 { + offset = <0x400>; + filename = "qspiheader.bin"; + }; + + spl: blob-ext@2 { + offset = <0x1000>; + filename = "flash.bin"; + }; + + uboot: blob-ext@3 { + offset = <0x60000>; + filename = "u-boot.itb"; + }; + }; On sd card boot it is without qspiheader and offsets -0x1000, so may we make a imx-boot and imx-boot-qspi ? + imx-boot { + filename = "imx-boot"; + pad-byte = <0x00>; + + spl: blob-ext@1 { + offset = <0x0>; + filename = "flash.bin"; + }; + + uboot: blob-ext@2 { + offset = <0x59000>; + filename = "u-boot.itb"; + }; + }; + imx-boot-qspi { + filename = "imx-boot-qspi"; + pad-byte = <0x00>; + + qspiheader: blob-ext@2 { + offset = <0x400>; + filename = "qspiheader.bin"; + }; + + imx-boot: blob-ext@2 { + offset = <0x1000>; + filename = "imx-boot"; + }; + }; And of course we must add a possibility to create qspi header. I have here local some python script, but not sure how to integrate this to binman. And it would be very cool, to sign the image with binman! bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de