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 0D704C433FE for ; Tue, 30 Nov 2021 10:32:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BD85D83093; Tue, 30 Nov 2021 11:32:04 +0100 (CET) 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=1638268325; bh=Bcz9LuAGveLEuD2Vs2Szi/8uXd4MU+AljMY1h8LmtPE=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=xLjN6N7D68TiPk06+igqIPXtUyfoXSlWFb6ymUP5bH7rKNTcuezMtvdx3qNYfPQRk Ow19lYyp+NkOBxlaCL0ArSejeoNquJua06xbUJBNDUVuFvQFq4AvxB+mUwIWKmNSfe LGJ1BOIC/wIhOQneHojmNict1TfFpThH9G7DFzEEMpkoUdiIwdm0lxQZ85Y/vDiBPv 8GfeGueSttbp5yyqjah2B8ui1tqkvabWKCPaxgS5fQQOHm4EQw5r7E8VePeLdg+n1R rGSG20X5d+orO+Mtrex1GR3gN5533lAA9R1CWO16SBWol/xJNP1T50iv3rB5uOmeE7 iZlmxrCliOPqA== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 6336983090; Tue, 30 Nov 2021 11:32:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1638268322; bh=Bcz9LuAGveLEuD2Vs2Szi/8uXd4MU+AljMY1h8LmtPE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=YXdL4FZpJvk+YuNk8YuqQcCWxl1qyxx9R2kuKnBTaAezAkkU9UDk8/KmVeZHszLL5 H/PGh+WHBGEIuutlE60CXWMZDd2PUG5ZJrySt9vAZqxgHLSg/7tbkHVaGlxQegv2Y8 qtG0i4nqfXA6Fg28ga4jSUv0rIOoUhRdDZ2HPKM8HtIcPwWb2LRSq4FXPeBRQeHKC9 TNzvZh55ov6LAT0WxYrLBU1Ltzm4H8kDkerQDklF0wGkJhjJFSocqWZ2O8PsdVVOCa llHxBKazFXL9s76xvStVn472ZURtrxLmWTEHumoH7q7SQgYXu/WYwQiroOSZmege3x 3KzpwVKGgjlVQ== Message-ID: <778d3181-cb45-c92b-43ad-5347f3eb668c@denx.de> Date: Tue, 30 Nov 2021 11:32:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH] ARM: stm32: Add update_sf script to install U-Boot into SF on DHSOM Content-Language: en-US To: Patrice CHOTARD , Patrick DELAUNAY , u-boot@lists.denx.de References: <20211113022513.231840-1-marex@denx.de> <58d2b299-09df-cc4f-88bd-7a6a895b25a6@foss.st.com> From: Marek Vasut In-Reply-To: <58d2b299-09df-cc4f-88bd-7a6a895b25a6@foss.st.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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 On 11/30/21 11:28, Patrice CHOTARD wrote: > HI Marek > > On 11/15/21 12:23 PM, Patrick DELAUNAY wrote: >> Hi Marek, >> >> On 11/13/21 3:25 AM, Marek Vasut wrote: >>> Add script to read U-Boot from SD card and write it to matching >>> locations in the SPI NOR, thus making the SPI NOR bootable. The >>> script erases the entire SPI NOR, including U-Boot environment, >>> to make sure the installation is clean. To retain environment >>> from current running U-Boot, run 'saveenv' after running the >>> 'update_sf' script. >>> >>> Signed-off-by: Marek Vasut >>> Cc: Patrice Chotard >>> Cc: Patrick Delaunay >>> --- >>>   include/configs/stm32mp15_dh_dhsom.h | 12 +++++++++++- >>>   1 file changed, 11 insertions(+), 1 deletion(-) >>> >>> diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h >>> index bac9e8388a7..b68e153f10b 100644 >>> --- a/include/configs/stm32mp15_dh_dhsom.h >>> +++ b/include/configs/stm32mp15_dh_dhsom.h >>> @@ -9,7 +9,17 @@ >>>   #define __CONFIG_STM32MP15_DH_DHSOM_H__ >>>     #define STM32MP_BOARD_EXTRA_ENV \ >>> -    "usb_pgood_delay=1000\0" >>> +    "usb_pgood_delay=1000\0" \ >>> +    "update_sf=" /* Erase SPI NOR and install U-Boot from SD */    \ >>> +        "setexpr loadaddr1 ${loadaddr} + 0x1000000 && "        \ >>> +        "load mmc 0:4 ${loadaddr1} /boot/u-boot-spl.stm32 && "    \ >>> +        "env set filesize1 ${filesize} && "            \ >>> +        "load mmc 0:4 ${loadaddr} /boot/u-boot.itb && "        \ >>> +        "sf probe && sf erase 0 0x200000 && "            \ >>> +        "sf update ${loadaddr1} 0 ${filesize1} && "        \ >>> +        "sf update ${loadaddr1} 0x40000 ${filesize1} && "    \ >>> +        "sf update ${loadaddr} 0x80000 ${filesize} && "        \ >>> +        "env set filesize1 && env set loadaddr1\0" >>>     #include >>> >> >> >> >> Reviewed-by: Patrick Delaunay >> >> Thanks >> Patrick >> >> >> > Applied to u-boot-stm32/next I would prefer if all this stuff went into 2022.01 , it is isolated to the DH boards after all and it was posted before rc2.