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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC994C433EF for ; Mon, 15 Nov 2021 11:23:43 +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 48DB761C32 for ; Mon, 15 Nov 2021 11:23:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 48DB761C32 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=foss.st.com 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 4194E8366A; Mon, 15 Nov 2021 12:23:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="LkNAyKu3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 27AFD82E88; Mon, 15 Nov 2021 12:23:38 +0100 (CET) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (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 D498D8366A for ; Mon, 15 Nov 2021 12:23:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=595306832a=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1AF7WXWU010463; Mon, 15 Nov 2021 12:23:34 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=5Gch/QbSTrXRkVv+CyVml1Ce5rglQkYycgQaD7sHSco=; b=LkNAyKu3X5xmQaTuyH3wiwVBIJXAMEg3P+Wjl7IW2FR3lRdyXdboK0bJPK66eCZM9auE qfEKw4uB7umuJ9b5oXtsiggj6MVYguwUK5X1lsJvS27pshka7WBPWoXDEgOvESC+bFhz OjhVL1TTA6v5VHK35b27g7be9lCxQmxNIoBM0daBs4AvdQA7S2EtV5O6tiqD6v+ErxkS DxAIn02INjX0iQUoPBb8UObXUrYfvGbRWbdh0QlQVJeUCPQbsBmkcE3GDk4h0BlnfcJS hIoh91UW1WRLNSjEhKsBfO2H9eZg0UKurv5al/1cn0MRwbMucGztraVV87yR6mAo05cj Wg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3cbk8j1fbd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Nov 2021 12:23:34 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 96BA110002A; Mon, 15 Nov 2021 12:23:33 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 8F55C22D193; Mon, 15 Nov 2021 12:23:33 +0100 (CET) Received: from lmecxl0994.lme.st.com (10.75.127.50) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Mon, 15 Nov 2021 12:23:33 +0100 Subject: Re: [PATCH] ARM: stm32: Add update_sf script to install U-Boot into SF on DHSOM To: Marek Vasut , CC: Patrice Chotard References: <20211113022513.231840-1-marex@denx.de> From: Patrick DELAUNAY Message-ID: Date: Mon, 15 Nov 2021 12:23:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211113022513.231840-1-marex@denx.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-15_10,2021-11-15_01,2020-04-07_01 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 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 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