[U-Boot] [PATCH v1 6/7] dfu, nand, ubi: fix erasing after write finish
Heiko Schocher
hs at denx.de
Wed May 25 08:21:57 CEST 2016
Hello Scott,
Am 25.05.2016 um 07:33 schrieb Scott Wood:
> On 05/25/2016 12:07 AM, Heiko Schocher wrote:
>> writting to ubi nand partitions need after write ends an erase
>> of the remaining sectors. This fail, if dfu write size was not
>> a multiple of erasesize, example log:
>>
>> Failure erase: -1
>>
>> Fix this error.
>>
>> Signed-off-by: Heiko Schocher <hs at denx.de>
>
> Why don't you just erase the whole partition up front?
Good question ... I think the reason is that if we erase a big partition
at once on dfu start, dfu-util rans into timeout ... but may I am wrong ...
IIRC at the end of a DFU transfer DFU protocol sends a "flush" to the
device ... where we currently erase the remaining sectors ... we need
this on an ubi partition, else there may remain old used UBI sectors ...
(BTW: we need an "ubi format" command ...)
@Lukasz? Am I correct? Or could we simple erase before writting?
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
More information about the U-Boot
mailing list