[U-Boot] Porting UBI fixes (specially fastmap's) to U-Boot
Ezequiel Garcia
ezequiel at vanguardiasur.com.ar
Sat Oct 17 20:07:26 CEST 2015
Hi Heiko,
On 9 October 2015 at 09:30, Heiko Schocher <hs at denx.de> wrote:
[..]
>
>
> I just updated the "ubi_sync_with_linux" branch on u-boot-ubi.
>
> It seems UBI/UBIFS now work with the NAND on the aristainetos2
> board, but my stomach says, there are some subtile issues ...
>
> Still needs more testing, also not tested yet UBI on the SPI NOR on
> this board.
>
> If I "nand erase" the mtd device, and try "ubi part ..." it fails
>
> :-(
>
> But If I flash_eraseall under linux the device, and then make
> "ubi part..." in U-Boot, commmand succeeds ...
>
Tested it on my custom AM335x board. Haven't used mainline U-Boot
but cherry-picked the following commits:
linux, compat: add missing definitions for ubi
ubi/ubifs: some bugfixes
ubi,ubifs: sync with linux v4.2
ubi: reset mtd_devs when ubi part fail
Commits apply cleanly except for "linux, compat: add missing
definitions for ubi"
which was trivial to backport anyway.
U-Boot built fine, but there was a warning:
drivers/mtd/ubi/fastmap.c: In function 'ubi_attach_fastmap':
drivers/mtd/ubi/fastmap.c:816:2: warning: pointer targets in passing
argument 3 of 'scan_pool' differ in signedness [-Wpointer-sign]
ret = scan_pool(ubi, ai, fmpl->pebs, pool_size, &max_sqnum, &free);
Just sent this patch which should fix it:
http://patchwork.ozlabs.org/patch/531842/
The board seems to work fine, and I can even to "nand erase" and "ubi
part" without
any problem.
However, I'm still seeing the same warning I had before, when my partition
is attached:
ubi0: default fastmap pool size: 200
ubi0: default fastmap WL pool size: 100
ubi0: attaching mtd1
WARNING in drivers/mtd/ubi/fastmap.c line 846
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=7", size 509 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
ubi0: VID header offset: 512 (aligned 512), data offset: 2048
ubi0: good PEBs: 4072, bad PEBs: 4, corrupted PEBs: 0
ubi0: user volume: 4, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 5/3, WL threshold: 4096, image sequence
number: 2068197800
ubi0: available PEBs: 3504, total reserved PEBs: 568, PEBs reserved
for bad PEB handling: 76
@Richard, any ideas? Do you know which of the fixes should fix that?
--
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
More information about the U-Boot
mailing list