Re: [PATCH] ARM: imx6: dh-imx6: Add update_sf script to install U-Boot into SF

2022-01-15 Thread Fabio Estevam
On Sat, Nov 27, 2021 at 11:52 PM 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.
>
> Signed-off-by: Marek Vasut 
> Cc: Christoph Niedermaier 
> Cc: Stefano Babic 

Reviewed-by: Fabio Estevam 


Re: [PATCH] ARM: imx6: dh-imx6: Add update_sf script to install U-Boot into SF

2021-12-18 Thread Peng Fan (OSS)




On 2021/11/28 10:52, 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.

Signed-off-by: Marek Vasut 
Cc: Christoph Niedermaier 
Cc: Stefano Babic 


Acked-by: Peng Fan 


---
  include/configs/dh_imx6.h | 4 
  1 file changed, 4 insertions(+)

diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
index ee56eb691ad..8183e7debd4 100644
--- a/include/configs/dh_imx6.h
+++ b/include/configs/dh_imx6.h
@@ -82,6 +82,10 @@
"ramdisk_addr_r=0x1800\0" \
"scriptaddr=0x1400\0" \
"fdtfile=imx6q-dhcom-pdk2.dtb\0"\
+   "update_sf=" /* Erase SPI NOR and install U-Boot from SD */   \
+   "load mmc 0:1 ${loadaddr} /boot/u-boot-with-spl.imx && "\
+   "sf probe && sf erase 0x0 0xa && "\
+   "sf write ${loadaddr} 0x400 ${filesize}\0"\
BOOTENV
  
  #define CONFIG_BOOTCOMMAND		"run distro_bootcmd"