[U-Boot] UBIFS - Reading superblock error
DATACOM - Mallmann
mallmann at datacom.ind.br
Tue Mar 31 19:06:28 CEST 2009
Hi,
I'm trying to use UBI and UBIFS over a nand device. I want to create a
mtd partition in u-boot (with ubi part command), save a ubifs image
(with mkfs.ubifs), mount and load it with ubifs commands. The commands
that I used are listed bellow:
(environment)
mtdids=nand0=nand
mtdparts=mtdparts=nand:64m(allstuff)
partition=nand0,0
mtddevnum=0
mtddevname=allstuff
=> ubi part nand allstuff
Creating 1 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x04000000 : "mtd=0"
UBI: attaching mtd0 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 mtd0 to ubi0
UBI: MTD device name: "mtd=0"
UBI: MTD device size: 64 MiB
UBI: number of good PEBs: 4096
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: 4052
UBI: total number of reserved PEBs: 44
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 0/0
=> ubi create vol
Creating dynamic volume vol of size 64313344
=> ubi info l
UBI: volume information dump:
UBI: vol_id 0
UBI: reserved_pebs 4052
UBI: alignment 1
UBI: data_pad 0
UBI: vol_type 3
UBI: name_len 3
UBI: usable_leb_size 15872
UBI: used_ebs 4052
UBI: used_bytes 64313344
UBI: last_eb_bytes 15872
UBI: corrupted 0
UBI: upd_marker 0
UBI: name vol
UBI: volume information dump:
UBI: vol_id 2147479551
UBI: reserved_pebs 2
UBI: alignment 1
UBI: data_pad 0
UBI: vol_type 3
UBI: name_len 13
UBI: usable_leb_size 15872
UBI: used_ebs 2
UBI: used_bytes 31744
UBI: last_eb_bytes 2
UBI: corrupted 0
UBI: upd_marker 0
UBI: name layout volume
tftp 1000000 image.ubifs vol ${filesize}
=> ubi write 1000000 vol ${filesize}
Volume "vol" found at volume id 0
=> ubifsmount vol
UBIFS error (pid 0): ubifs_check_node: bad node length 4100
UBIFS error (pid 0): ubifs_check_node: bad node at LEB 0:0
UBIFS error (pid 0): ubifs_read_node: expected node type 6
Error reading superblock on volume 'ubi:vol'!
image.ubifs was generated with the follow command:
mkfs.ubifs -r /ubifs -m 256 -c 2180 -e 16KiB -v -g 3 -o image.ubifs
(/ubifs contains a kernel+ramdisk cramfs image.)
My question is if the error was in image.ubifs creation or some u-boot
configuration. I can't find where u-boot takes this 4100 length from. By
the way, is a volume created in u-boot able to be used in linux kernel
in read-write mode?
Thanks in advance,
Marcelo
More information about the U-Boot
mailing list