Skip to contentSkip to conversation

ubi part failing on NAND

U-Boot Jeff Angielski 3 participants 8 messages Dec 17, 2009 – Dec 21, 2009

lore
Share & tools
lore
#0 lore raw

The "ubi part" command is failing for me on my PowerPC 85xx board. I am not trying to do anything special, just create the partitions and volumes so that I can try writing an ubi.img. It spits out enough information that it looks like it did work but it prints out an error nonetheless.

And of course there is the long standing issue of the reported MTD number not making any sense. But previous posts have discounted this as an issue.

Here is the snippet of the error:

UBI error: ubi_init: cannot attach mtd2
UBI: mtd2 is detached from ubi0
UBI error: ubi_init: UBI error: cannot initialize UBI, error -17 UBI init error -17

Here is a cleaned up version of the session log:

=> mtdparts

device nor0 <f8000000.nor>, # parts = 8

  #: name                size            offset          mask_flags
  0: config              0x00020000      0x00000000      0
  1: kernel              0x00260000      0x00020000      0
  2: fdt                 0x00020000      0x00280000      0
  3: tinyfs              0x00600000      0x002a0000      0
  4: rootfs              0x076a0000      0x008a0000      0
  5: u-boot-env-r        0x00020000      0x07f40000      1
  6: u-boot-env          0x00020000      0x07f60000      1
  7: u-boot              0x00080000      0x07f80000      1

device nand0 <f4000000.nand>, # parts = 2

  #: name                size            offset          mask_flags
  0: fs1                 0x20000000      0x00000000      0
  1: fs2                 0x20000000      0x20000000      0

=> nand erase 0x0 0x40000000

NAND erase: device 0 whole chip

Skipping bad block at  0x01200000
Skipping bad block at  0x0e880000
Skipping bad block at  0x1cd80000
Skipping bad block at  0x2b300000
Skipping bad block at  0x323c0000
Skipping bad block at  0x364c0000
Skipping bad block at  0x37cc0000

Erasing at 0x3ffc0000 -- 100% complete.
OK

=> ubi part fs1
Creating 1 MTD partitions on "nand0":
0x000000000000-0x000020000000 : "mtd=0"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size: 262144 bytes (256 KiB)
UBI: logical eraseblock size: 253952 bytes
UBI: smallest flash I/O unit: 4096
UBI: VID header offset: 4096 (aligned 4096)
UBI: data offset: 8192
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd2 to ubi0
UBI: MTD device name: "mtd=0"
UBI: MTD device size: 512 MiB
UBI: number of good PEBs: 2045
UBI: number of bad PEBs: 3
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 2021
UBI: total number of reserved PEBs: 24
UBI: number of PEBs reserved for bad PEB handling: 20
UBI: max/mean erase counter: 0/0
UBI error: ubi_init: cannot attach mtd2
UBI: mtd2 is detached from ubi0
UBI error: ubi_init: UBI error: cannot initialize UBI, error -17 UBI init error -17
exit not allowed from main input shell.

My last sync with the denx git was when 2.6.31 was released. Here is my version:
=> ver

U-Boot 2009.08-00213-gfdf80f7 (Dec 17 2009 - 12:57:07)

Jeff Angielski
The PTR Group
www.theptrgroup.com

#1 lore raw

Jeff,

Quoted 9 lines · On Thursday 17 December 2009 22:09:03 Jeff Angielski wrote:

The "ubi part" command is failing for me on my PowerPC 85xx board. I am not trying to do anything special, just create the partitions and volumes so that I can try writing an ubi.img. It spits out enough information that it looks like it did work but it prints out an error nonetheless.

And of course there is the long standing issue of the reported MTD number not making any sense. But previous posts have discounted this as an issue.

Patches to fix/change this are welcome. :)

Quoted 6 lines

Here is the snippet of the error:

UBI error: ubi_init: cannot attach mtd2
UBI: mtd2 is detached from ubi0
UBI error: ubi_init: UBI error: cannot initialize UBI, error -17 UBI init error -17

-17 == EEXIST. Looking at the code (build.c) shows that ubi_attach_mtd_dev() is returning this error code in case the MTD device is already attached. Even though the UBI implementation should handle this without any problems. I have to admit that I'm a bit out of ideas what's going wrong in your case. I just checked again and UBI works fine for me with the latest version:

=> mtdparts

device nand0 <nand>, # parts = 3

 #: name                size            offset          mask_flags
 0: bootloader          0x00100000      0x00000000      0         
 1: rootfs              0x01000000      0x00100000      0         
 2: ubifs               0x02f00000      0x01100000      0         

active partition: nand0,0 - (bootloader) 0x00100000 @ 0x00000000

defaults:
mtdids : nand0=nand
mtdparts: mtdparts=nand:1m(bootloader),16m(rootfs),-(ubifs) => nand erase 1100000 2f00000

NAND erase: device 0 offset 0x1100000, size 0x2f00000 Erasing at 0x3ffc000 -- 100% complete.
OK
=> ubi part ubifs
Creating 1 MTD partitions on "nand0":
0x000001100000-0x000004000000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 16384 bytes (16 KiB)
UBI: logical eraseblock size: 15872 bytes
UBI: smallest flash I/O unit: 512
UBI: sub-page size: 256
UBI: VID header offset: 256 (aligned 256)
UBI: data offset: 512
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=2"
UBI: MTD device size: 47 MiB
UBI: number of good PEBs: 3008
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 92
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 2974
UBI: total number of reserved PEBs: 34
UBI: number of PEBs reserved for bad PEB handling: 30
UBI: max/mean erase counter: 0/0
=> mtdparts

device nand0 <nand>, # parts = 3

 #: name                size            offset          mask_flags
 0: bootloader          0x00100000      0x00000000      0         
 1: rootfs              0x01000000      0x00100000      0         
 2: ubifs               0x02f00000      0x01100000      0         

active partition: nand0,0 - (bootloader) 0x00100000 @ 0x00000000

defaults:
mtdids : nand0=nand
mtdparts: mtdparts=nand:1m(bootloader),16m(rootfs),-(ubifs) => nand erase 100000 1000000

NAND erase: device 0 offset 0x100000, size 0x1000000 Erasing at 0x10fc000 -- 100% complete.
OK
=> ubi part rootfs
UBI: mtd1 is detached from ubi0
Creating 1 MTD partitions on "nand0":
0x000000100000-0x000001100000 : "mtd=1"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 16384 bytes (16 KiB)
UBI: logical eraseblock size: 15872 bytes
UBI: smallest flash I/O unit: 512
UBI: sub-page size: 256
UBI: VID header offset: 256 (aligned 256)
UBI: data offset: 512
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=1"
UBI: MTD device size: 16 MiB
UBI: number of good PEBs: 1024
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 92
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 1010
UBI: total number of reserved PEBs: 14
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 0/0
=>

Perhaps you should try the latest version as well. Could be that this is a bug already fixed now. Otherwise you need to debug this problem yourself, since I can't reproduce it here.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#2 lore raw

Jeff, what is the size of your allocateble memory. Had to increase it to 4MB to get it working.

Quoted 137 lines · Stefan Roese

Jeff,

Quoted 9 lines · On Thursday 17 December 2009 22:09:03 Jeff Angielski wrote:

The "ubi part" command is failing for me on my PowerPC 85xx board. ?I am not trying to do anything special, just create the partitions and volumes so that I can try writing an ubi.img. ?It spits out enough information that it looks like it did work but it prints out an error nonetheless.

And of course there is the long standing issue of the reported MTD number not making any sense. ?But previous posts have discounted this as an issue.

Patches to fix/change this are welcome. :)

Quoted 6 lines

Here is the snippet of the error:

UBI error: ubi_init: cannot attach mtd2
UBI: mtd2 is detached from ubi0
UBI error: ubi_init: UBI error: cannot initialize UBI, error -17 UBI init error -17

-17 == EEXIST. Looking at the code (build.c) shows that ubi_attach_mtd_dev() is returning this error code in case the MTD device is already attached. Even though the UBI implementation should handle this without any problems. I have to admit that I'm a bit out of ideas what's going wrong in your case. I just checked again and UBI works fine for me with the latest version:

=> mtdparts

device nand0 <nand>, # parts = 3
?#: name ? ? ? ? ? ? ? ?size ? ? ? ? ? ?offset ? ? ? ? ?mask_flags ?0: bootloader ? ? ? ? ?0x00100000 ? ? ?0x00000000 ? ? ?0 ?1: rootfs ? ? ? ? ? ? ?0x01000000 ? ? ?0x00100000 ? ? ?0 ?2: ubifs ? ? ? ? ? ? ? 0x02f00000 ? ? ?0x01100000 ? ? ?0

active partition: nand0,0 - (bootloader) 0x00100000 @ 0x00000000

defaults:
mtdids ?: nand0=nand
mtdparts: mtdparts=nand:1m(bootloader),16m(rootfs),-(ubifs) => nand erase 1100000 2f00000

NAND erase: device 0 offset 0x1100000, size 0x2f00000 Erasing at 0x3ffc000 -- 100% complete.
OK
=> ubi part ubifs
Creating 1 MTD partitions on "nand0":
0x000001100000-0x000004000000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: ? 16384 bytes (16 KiB)
UBI: logical eraseblock size: ? ?15872 bytes
UBI: smallest flash I/O unit: ? ?512
UBI: sub-page size: ? ? ? ? ? ? ?256
UBI: VID header offset: ? ? ? ? ?256 (aligned 256)
UBI: data offset: ? ? ? ? ? ? ? ?512
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name: ? ? ? ? ? ?"mtd=2"
UBI: MTD device size: ? ? ? ? ? ?47 MiB
UBI: number of good PEBs: ? ? ? ?3008
UBI: number of bad PEBs: ? ? ? ? 0
UBI: max. allowed volumes: ? ? ? 92
UBI: wear-leveling threshold: ? ?4096
UBI: number of internal volumes: 1
UBI: number of user volumes: ? ? 0
UBI: available PEBs: ? ? ? ? ? ? 2974
UBI: total number of reserved PEBs: 34
UBI: number of PEBs reserved for bad PEB handling: 30
UBI: max/mean erase counter: 0/0
=> mtdparts

device nand0 <nand>, # parts = 3
?#: name ? ? ? ? ? ? ? ?size ? ? ? ? ? ?offset ? ? ? ? ?mask_flags ?0: bootloader ? ? ? ? ?0x00100000 ? ? ?0x00000000 ? ? ?0 ?1: rootfs ? ? ? ? ? ? ?0x01000000 ? ? ?0x00100000 ? ? ?0 ?2: ubifs ? ? ? ? ? ? ? 0x02f00000 ? ? ?0x01100000 ? ? ?0

active partition: nand0,0 - (bootloader) 0x00100000 @ 0x00000000

defaults:
mtdids ?: nand0=nand
mtdparts: mtdparts=nand:1m(bootloader),16m(rootfs),-(ubifs) => nand erase 100000 1000000

NAND erase: device 0 offset 0x100000, size 0x1000000 Erasing at 0x10fc000 -- 100% complete.
OK
=> ubi part rootfs
UBI: mtd1 is detached from ubi0
Creating 1 MTD partitions on "nand0":
0x000000100000-0x000001100000 : "mtd=1"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: ? 16384 bytes (16 KiB)
UBI: logical eraseblock size: ? ?15872 bytes
UBI: smallest flash I/O unit: ? ?512
UBI: sub-page size: ? ? ? ? ? ? ?256
UBI: VID header offset: ? ? ? ? ?256 (aligned 256)
UBI: data offset: ? ? ? ? ? ? ? ?512
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name: ? ? ? ? ? ?"mtd=1"
UBI: MTD device size: ? ? ? ? ? ?16 MiB
UBI: number of good PEBs: ? ? ? ?1024
UBI: number of bad PEBs: ? ? ? ? 0
UBI: max. allowed volumes: ? ? ? 92
UBI: wear-leveling threshold: ? ?4096
UBI: number of internal volumes: 1
UBI: number of user volumes: ? ? 0
UBI: available PEBs: ? ? ? ? ? ? 1010
UBI: total number of reserved PEBs: 14
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 0/0
=>

Perhaps you should try the latest version as well. Could be that this is a bug already fixed now. Otherwise you need to debug this problem yourself, since I can't reproduce it here.

Cheers,
Stefan

--
DENX Software Engineering GmbH, ? ? ?MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, ?Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw
Quoted 2 lines · On Friday 18 December 2009 13:35:26 hedwin wrote:

Jeff, what is the size of your allocateble memory. Had to increase it to
4MB to get it working.

I've got 1MByte for my test on Kilauea. This should be enough. There is already a compile-time check in the UBI code:

#if (CONFIG_SYS_MALLOC_LEN < (512 << 10))
#error Malloc area too small for UBI, increase CONFIG_SYS_MALLOC_LEN to >= 512k #endif

Please let me know if this really is not enough. But for me, 1MB is working.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#4 lore raw
Quoted 8 lines · Stefan Roese
Quoted 2 lines · On Friday 18 December 2009 13:35:26 hedwin wrote:

Jeff, what is the size of your allocateble memory. Had to increase it to
4MB to get it working.

I've got 1MByte for my test on Kilauea. This should be enough. There is already a compile-time check in the UBI code:

Quoted 5 lines

#if (CONFIG_SYS_MALLOC_LEN < (512 << 10))
#error Malloc area too small for UBI, increase CONFIG_SYS_MALLOC_LEN to >= 512k #endif

Please let me know if this really is not enough. But for me, 1MB is working.

As per Hedwin's suggestion I increased my CONFIG_SYS_MALLOC_LEN to 4MB and the error disappeared. Thanks Hedwin! And now the UBI output matches my part (e.g. PEB size).

=> nand erase 0x0 0x40000000

=> ubi part fs1
Creating 1 MTD partitions on "nand0":
0x000000000000-0x000020000000 : "mtd=0"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size: 262144 bytes (256 KiB)
UBI: logical eraseblock size: 253952 bytes
UBI: smallest flash I/O unit: 4096
UBI: VID header offset: 4096 (aligned 4096)
UBI: data offset: 8192
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd2 to ubi0
UBI: MTD device name: "mtd=0"
UBI: MTD device size: 512 MiB
UBI: number of good PEBs: 2045
UBI: number of bad PEBs: 3
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 2021
UBI: total number of reserved PEBs: 24
UBI: number of PEBs reserved for bad PEB handling: 20
UBI: max/mean erase counter: 0/0
=>

Signature · 3 lines
Jeff Angielski
The PTR Group
www.theptrgroup.com
#5 lore raw

A bit on the reason why this amount of memory is needed.

I had the same problem jeff mentions. After tracing where dlmalloc allocates its memory chunks I found out that it started allocating memory in code space. Overwritting code space eventually resultated in uboot crashing. Looking into dlmalloc I did not find any code that checks whether it allocates memory outside its boundary.

Since I use a 2009.01 release I need to verify this against the latest release.

There is also another problem with ubi. If you repeat the following statements more than once uboot also crashed.

nand erase /aPartition
ubi part nand /aPartition
ubi create aVolume

I did not check yet if this is also an allocation problem or something totally different.

Hedwin

Quoted 58 lines · Jeff Angielski
Quoted 10 lines · Stefan Roese
Quoted 3 lines · On Friday 18 December 2009 13:35:26 hedwin wrote:

Jeff, what is the size of your allocateble memory. Had to increase it to ?4MB to get it working.

I've got 1MByte for my test on Kilauea. This should be enough. There is already a compile-time check in the UBI code:

Quoted 7 lines

#if (CONFIG_SYS_MALLOC_LEN < (512 << 10))
#error Malloc area too small for UBI, increase CONFIG_SYS_MALLOC_LEN to >= 512k
#endif

Please let me know if this really is not enough. But for me, 1MB is working.

As per Hedwin's suggestion I increased my CONFIG_SYS_MALLOC_LEN to 4MB and the error disappeared. ?Thanks Hedwin! ?And now the UBI output matches my part (e.g. PEB size).

=> nand erase 0x0 0x40000000

=> ubi part fs1
Creating 1 MTD partitions on "nand0":
0x000000000000-0x000020000000 : "mtd=0"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size: ? 262144 bytes (256 KiB)
UBI: logical eraseblock size: ? ?253952 bytes
UBI: smallest flash I/O unit: ? ?4096
UBI: VID header offset: ? ? ? ? ?4096 (aligned 4096)
UBI: data offset: ? ? ? ? ? ? ? ?8192
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd2 to ubi0
UBI: MTD device name: ? ? ? ? ? ?"mtd=0"
UBI: MTD device size: ? ? ? ? ? ?512 MiB
UBI: number of good PEBs: ? ? ? ?2045
UBI: number of bad PEBs: ? ? ? ? 3
UBI: max. allowed volumes: ? ? ? 128
UBI: wear-leveling threshold: ? ?4096
UBI: number of internal volumes: 1
UBI: number of user volumes: ? ? 0
UBI: available PEBs: ? ? ? ? ? ? 2021
UBI: total number of reserved PEBs: 24
UBI: number of PEBs reserved for bad PEB handling: 20
UBI: max/mean erase counter: 0/0
=>

--
Jeff Angielski
The PTR Group
www.theptrgroup.com

#6 lore raw
In reply to Jeff Angielski
Quoted 11 lines · On Friday 18 December 2009 16:07:40 Jeff Angielski wrote:
Quoted 10 lines · Stefan Roese
Quoted 2 lines · On Friday 18 December 2009 13:35:26 hedwin wrote:

Jeff, what is the size of your allocateble memory. Had to increase it to
4MB to get it working.

I've got 1MByte for my test on Kilauea. This should be enough. There is already a compile-time check in the UBI code:

#if (CONFIG_SYS_MALLOC_LEN < (512 << 10))
#error Malloc area too small for UBI, increase CONFIG_SYS_MALLOC_LEN to

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

= 512k #endif

Please let me know if this really is not enough. But for me, 1MB is working.

As per Hedwin's suggestion I increased my CONFIG_SYS_MALLOC_LEN to 4MB and the error disappeared. Thanks Hedwin! And now the UBI output matches my part (e.g. PEB size).

Hmmm. Must be because my test platform used a small page NAND device. I'll give it a try on a large page NAND soon. The code must be lacking a check for malloc failure.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#7 lore raw
In reply to hedwin
Quoted 2 lines · hedwin

Jeff, what is the size of your allocateble memory. Had to increase it to 4MB to get it working.

#define CONFIG_SYS_MALLOC_LEN (1024 * 1024)

I'll try increasing it to see if that helps.

Quoted 138 lines · Stefan Roese
Quoted 135 lines

Jeff,

Quoted 9 lines · On Thursday 17 December 2009 22:09:03 Jeff Angielski wrote:

The "ubi part" command is failing for me on my PowerPC 85xx board. I am not trying to do anything special, just create the partitions and volumes so that I can try writing an ubi.img. It spits out enough information that it looks like it did work but it prints out an error nonetheless.

And of course there is the long standing issue of the reported MTD number not making any sense. But previous posts have discounted this as an issue.

Patches to fix/change this are welcome. :)

Quoted 6 lines

Here is the snippet of the error:

UBI error: ubi_init: cannot attach mtd2
UBI: mtd2 is detached from ubi0
UBI error: ubi_init: UBI error: cannot initialize UBI, error -17 UBI init error -17

-17 == EEXIST. Looking at the code (build.c) shows that ubi_attach_mtd_dev() is returning this error code in case the MTD device is already attached. Even though the UBI implementation should handle this without any problems. I have to admit that I'm a bit out of ideas what's going wrong in your case. I just checked again and UBI works fine for me with the latest version:

=> mtdparts

device nand0 <nand>, # parts = 3

 #: name                size            offset          mask_flags
 0: bootloader          0x00100000      0x00000000      0
 1: rootfs              0x01000000      0x00100000      0
 2: ubifs               0x02f00000      0x01100000      0

active partition: nand0,0 - (bootloader) 0x00100000 @ 0x00000000

defaults:
mtdids : nand0=nand
mtdparts: mtdparts=nand:1m(bootloader),16m(rootfs),-(ubifs) => nand erase 1100000 2f00000

NAND erase: device 0 offset 0x1100000, size 0x2f00000 Erasing at 0x3ffc000 -- 100% complete.
OK
=> ubi part ubifs
Creating 1 MTD partitions on "nand0":
0x000001100000-0x000004000000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 16384 bytes (16 KiB)
UBI: logical eraseblock size: 15872 bytes
UBI: smallest flash I/O unit: 512
UBI: sub-page size: 256
UBI: VID header offset: 256 (aligned 256)
UBI: data offset: 512
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=2"
UBI: MTD device size: 47 MiB
UBI: number of good PEBs: 3008
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 92
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 2974
UBI: total number of reserved PEBs: 34
UBI: number of PEBs reserved for bad PEB handling: 30
UBI: max/mean erase counter: 0/0
=> mtdparts

device nand0 <nand>, # parts = 3

 #: name                size            offset          mask_flags
 0: bootloader          0x00100000      0x00000000      0
 1: rootfs              0x01000000      0x00100000      0
 2: ubifs               0x02f00000      0x01100000      0

active partition: nand0,0 - (bootloader) 0x00100000 @ 0x00000000

defaults:
mtdids : nand0=nand
mtdparts: mtdparts=nand:1m(bootloader),16m(rootfs),-(ubifs) => nand erase 100000 1000000

NAND erase: device 0 offset 0x100000, size 0x1000000 Erasing at 0x10fc000 -- 100% complete.
OK
=> ubi part rootfs
UBI: mtd1 is detached from ubi0
Creating 1 MTD partitions on "nand0":
0x000000100000-0x000001100000 : "mtd=1"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 16384 bytes (16 KiB)
UBI: logical eraseblock size: 15872 bytes
UBI: smallest flash I/O unit: 512
UBI: sub-page size: 256
UBI: VID header offset: 256 (aligned 256)
UBI: data offset: 512
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=1"
UBI: MTD device size: 16 MiB
UBI: number of good PEBs: 1024
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 92
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 1010
UBI: total number of reserved PEBs: 14
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 0/0
=>

Perhaps you should try the latest version as well. Could be that this is a bug already fixed now. Otherwise you need to debug this problem yourself, since I can't reproduce it here.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Signature · 3 lines
Jeff Angielski
The PTR Group
www.theptrgroup.com