UBI: ignore/overwrite old data/PEBs after flashing
Artem Bityutskiy
dedekind1 at gmail.com
Mon Oct 20 06:47:25 PDT 2014
On Thu, 2014-10-16 at 15:51 +0200, Rafał Miłecki wrote:
> Unfortunately this won't work if we flash the same firmware twice (it
> will contain the same sequence). Imagine someone flashing a stable
> OpenWrt release, then breaking something and flashing the same image
> again. It'll contain the same sequence number and my magic driver
> won't clean the old data :(
Yes, flashing with ubiformat would be fine, because it changes the
sequence number on-the-fly. With industial flashers, you'd need to erase
the flash.
Now you say you do not have the erase operation. You idea of a
"IMAGE_ENDS_HERE" bit seems to be nice, and you could implement it, but
you should think about the fastmap case too. Probably you need to do
nothing, because fastmap will only refer the PEBs within the image, and
the PEBs outside of the image will be scheduled for erasure. But you
should verify this.
Artem.
More information about the linux-mtd
mailing list