[PATCH] ARM: stm32: Add script to install U-Boot from SD/eMMC to SPI NOR on DH STM32MP15xx DHSOM

Marek Vasut marex at denx.de
Thu Oct 17 02:14:24 CEST 2024


On 10/16/24 7:59 PM, Patrick DELAUNAY wrote:

Hello Patrick,

>>> b) you are using "sf" command and not "mtd" to udpate SPI NOR ?
>>>
>>>
>>> the MTD command allows to use the MTD partition name, defined in DT,
>>> so no need to know offset in script (and avoid "sf probe")
>>>
>>> mtd erase fsbl1; mtd write fsbl1 ${loadaddr1} 0 ${filesize1} \
>>> mtd erase fsbl2; mtd write fsbl2 ${loadaddr1} 0 ${filesize1} \
>>> mtd erase uboot; mtd write uboot ${loadaddr} 0 ${filesize}
>> Can you also do 'sf update' alike operation with 'mtd' command? I 
>> don't think you can. The 'sf update' often does significantly speed up 
>> the SPI NOR update process, because SPI NOR erase operation is very 
>> slow, while SPI NOR read operation is fast, so if the update can read 
>> and then skip many blocks which are already in the SPI NOR and erase 
>> and write only the changed blocks, the update is often very fast too.
> 
> 
> Good point....
> 
> an improve place for MTD command
> 
> I will try to propose something for mtd command
> 
> 
> and for the patch
> 
> 
> Applied to u-boot-stm/master, thanks!
btw look at doc/README.dfutftp , I use that to update R-Car boards which 
also require multiple blobs at various offsets in HyperFlash (HF behaves 
like a regular Parallel NOR). I can generate a fitImage which contains 
the blobs and their offsets and then run dfu tftp to download the 
fitImage from TFTP server and install the blobs automatically.


More information about the U-Boot mailing list