Hi,

I am trying to use UBIFS in my project and we are using the davinci nand driver 
with a flash part that has page size of 2048, block size of 128KiB and size of 
128MiB. I have done following to boot the kernel with a UBIFS rootfs.

sudo mkfs.ubifs -r arago-rootfs-ubi -m 2048 -e 129024 -c 960 -o ubifs.img -x 
zlib

2) Boot up Linux using rootfs that has ubi mtdutils

3) ubinize the image using the following ubi.cfg from the target.

[ubifs]
mode=ubi
image=ubifs.img
vol_id=0
vol_size=110MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize

> ubinize -o ubi1.img  -m 2048 -p 128KiB -s 512 ubi.cfg


4) erase the partition and flash it
>flash_erase /dev/mtd3 0 0
>nandwrite -p /dev/mtd3 /ubi1.img

5) reboot and setup following env variables in u-boot

setenv bootargs 'console=ttyS0,115200n8 root=ubi0:rootfs ubi.mtd=3 rw 
rootfstype=ubifs'
saveenv
boot

See following during boot:-

davinci_nand davinci_nand.0: controller rev. 2.5
UBI: attaching mtd3 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: max. sequence number:       0
UBI: volume 0 ("rootfs") re-sized from 894 to 963 LEBs
UBI: attached mtd3 to ubi0
UBI: MTD device name:            "filesystem"
UBI: MTD device size:            122 MiB
UBI: number of good PEBs:        976
UBI: number of bad PEBs:         4
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 976
UBI: number of PEBs reserved for bad PEB handling: 9
UBI: max/mean erase counter: 1/0
UBI: image sequence number:  1997956010
UBI: background thread "ubi_bgt0d" started, PID 248

And then


I get the following ECC error:-

VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size:   122830848 bytes (119952 KiB, 117 MiB, 952 LEBs)
UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: zlib
UBIFS: reserved for root:  0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:12.
Freeing init memory: 124K
modprobe: FATAL: Could not load 
/lib/modules/3.2.0-00103-gee5968d-dirty/modules.dep: No such fil
e or directory

modprobe: FATAL: Could not load 
/lib/modules/3.2.0-00103-gee5968d-dirty/modules.dep: No such fil
e or directory

INIT: version 2.86 booting
Please wait: booting...
Starting udev
WARNING: -e needs -E or -F
UBI error: ubi_io_read: error -74 (ECC error) while reading 76 bytes from PEB 
62:104104, read 76
 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 81 bytes from PEB 
62:106240, read 81
 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 75 bytes from PEB 
62:108416, read 75
 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 32 bytes from PEB 
62:110560, read 32
 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 77 bytes from PEB 
62:111992, read 77
 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 77 bytes from PEB 
62:114256, read 77
 bytes
udevd (310): /proc/310/oom_adj is deprecated, please use 
/proc/310/oom_score_adj instead.

And then I reboot again, Kernel panic with due to ECC error and Kernel is 
unable to mount the rootfs.

And then I see that subpage write has problem with davinci NAND driver from the 
following post and tried disabling
The subpage write as suggested in the post 
http://davinci-linux-open-source.1494791.n2.nabble.com/UBI-crashes-fixing-NAND-subpage-writes-td5485828.html

But that also gave me the same result. Any suggestion on how to fix this?


Thanks.

Murali Karicheri
Software Design Engineer
email: [email protected]
Phone: (301) 407 9583


_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to