Flashing UBIFS over fastboot
dedekind1 at gmail.com
Sun Nov 28 09:55:52 EST 2010
On Sun, 2010-11-28 at 17:46 +0900, Leo Barnes wrote:
> Hello again,
> New problem:
> On Fri, Nov 26, 2010 at 10:58 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> > I think you can hack ubinize and teach it to add OOB bytes.
> I have now managed to transform a UBIFS image so that it is flashable
> by fastboot. The system then boots once without any trouble (at least
> any immediate trouble), but when I reboot, it refuses to start. I have
> narrowed the problem down to the fact that fastboot does not strip
> trailing 0xFF pages from the blocks and instead writes them as usual.
> As explained in the FAQ this has some nasty consequences. I have no
> way (currently at least) of modifying how fastboot works on the
> device. Is it somehow possible to fill these pages with dummy data and
> tell UBI/UBIFS that it is ok to discard this data when the block is
> erased sometime in the future? Or is there any other way of doing it?
I guess for data and indexing eraseblocks you can just pad the left
space with UBIFS padding nodes (struct ubifs_pad_node).
But then there are special UBIFS areas which go before the data area.
Things might me trickier there. I am not sure the padding node trick
will work there, but it might. If this does not work for some areas,
they can be tricked a different way.
The other ugly option would be to make UBI do ubi_leb_change() for each
eraseblock after scanning. Or only for those which have 0xFFs at the
But I do not have ready solution for this.
> If UBI/UBIFS clones/remaps a block, does it strip empty trailing
Yes, it does, this is why ubi_leb_change() will work.
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd