Hi all,
1) First of all, my system details:
HW: AM1808-EVM from LogicPD rev.A
sdk: 05.03.02.00
psp: 03.21.00.04
mtd-utils: 1.4.9
2) Kernel enabled/disabled support for UBIFS:
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_RESERVE=1
# CONFIG_MTD_UBI_GLUEBI is not set
# UBI debugging options
# CONFIG_MTD_UBI_DEBUG is not set
CONFIG_UBIFS_FS=y
# CONFIG_UBIFS_FS_XATTR is not set
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
# CONFIG_UBIFS_FS_DEBUG is not set
3) Here are the steps I followed on the NFS-booted target in order to create the ubifs image from a rootfs directory
and write it to nand:
target$ mkfs.ubifs -r rootfs -m 2048 -e 129024 -c 4096 ubifs.img
target$ cat ubinize.cfg
[ubifs]
mode=ubi
image=ubifs.img
vol_id=0
vol_size=256MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
target$ ubinize -o rootfs.ubifs.img -m 2048 -p 128KiB -s 512 ubinize.cfg
target$ ubiformat /dev/mtd4 -s 512 -f rootfs.ubifs.img
ubiformat: mtd4 (nand), size 531890176 bytes (507.2 MiB), 4058 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 4057 -- 100 % complete
ubiformat: 4051 eraseblocks have valid erase counter, mean value is 0
ubiformat: 7 bad eraseblocks found, numbers: 1531, 2871, 3022, 4054, 4055, 4056, 4057
ubiformat: flashing eraseblock 149 -- 100 % complete
ubiformat: formatting eraseblock 4057 -- 100 % complete
target$ ubiattach /dev/ubi_ctrl -m 4
UBI: attaching mtd4 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 error: ubi_io_write: error -5 while writing 512 bytes to PEB 4053:512, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 2147479551:0, PEB 4053
UBI: try another PEB
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 4052:512, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 2147479551:0, PEB 4052
UBI: try another PEB
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 4051:512, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 2147479551:0, PEB 4051
UBI: try another PEB
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 4050:512, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 2147479551:0, PEB 4050
UBI warning: ubi_ro_mode: switch to read-only mode
UBI error: autoresize: cannot auto-resize volume 0
ubiattach: error!: cannot attach mtd4
error 30 (Read-only file system)
Please, can anyone help me ?