Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-10-04 Thread Michael Walle
Am 2021-10-04 12:31, schrieb Frieder Schrempf: On 30.09.21 23:08, Michael Walle wrote: Printing a warning might scare users, though. I'd prefer to fix the online help, where only "erase and write" is mentioned. Which document are you referring to? I don't really see the "sf" command docume

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-10-04 Thread Frieder Schrempf
On 30.09.21 23:21, Michael Walle wrote: > Am 2021-09-30 18:19, schrieb Frieder Schrempf: >> From: Frieder Schrempf >> >> Currently 'sf update' supports only offsets that are aligned to the >> erase block size of the serial flash. Unaligned offsets result in >> something like: >> >> => sf update ${

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-10-04 Thread Frieder Schrempf
On 30.09.21 23:08, Michael Walle wrote: > Am 2021-09-30 19:17, schrieb Frieder Schrempf: >> On 30.09.21 18:35, Michael Walle wrote: >>> Am 2021-09-30 18:19, schrieb Frieder Schrempf: In order to support unaligned updates, we simply read the first full block and check only the requested pa

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Simon Glass
Hi Frieder, On Thu, 30 Sept 2021 at 10:20, Frieder Schrempf wrote: > > From: Frieder Schrempf > > Currently 'sf update' supports only offsets that are aligned to the > erase block size of the serial flash. Unaligned offsets result in > something like: > > => sf update ${kernel_addr_r} 0x400 ${fi

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Michael Walle
Am 2021-09-30 18:19, schrieb Frieder Schrempf: From: Frieder Schrempf Currently 'sf update' supports only offsets that are aligned to the erase block size of the serial flash. Unaligned offsets result in something like: => sf update ${kernel_addr_r} 0x400 ${filesize} device 0 offset 0x400, siz

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Michael Walle
Am 2021-09-30 19:17, schrieb Frieder Schrempf: On 30.09.21 18:35, Michael Walle wrote: Am 2021-09-30 18:19, schrieb Frieder Schrempf: In order to support unaligned updates, we simply read the first full block and check only the requested part of the block for changes. If necessary, the block is

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Frieder Schrempf
On 30.09.21 18:35, Michael Walle wrote: > Am 2021-09-30 18:19, schrieb Frieder Schrempf: >> In order to support unaligned updates, we simply read the first full >> block and check only the requested part of the block for changes. If >> necessary, the block is erased, the first (unchanged) part of t

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Michael Walle
Am 2021-09-30 18:19, schrieb Frieder Schrempf: In order to support unaligned updates, we simply read the first full block and check only the requested part of the block for changes. If necessary, the block is erased, the first (unchanged) part of the block is written back together with the second

[PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Frieder Schrempf
From: Frieder Schrempf Currently 'sf update' supports only offsets that are aligned to the erase block size of the serial flash. Unaligned offsets result in something like: => sf update ${kernel_addr_r} 0x400 ${filesize} device 0 offset 0x400, size 0x11f758 SPI flash failed in erase step In ord