Specifications
UBI: available PEBs: 1961
UBI: total number of reserved PEBs: 23
UBI: number of PEBs reserved for bad PEB handling: 19
UBI: max/mean erase counter: 1/0
=>
Now that the UBI device is attached, this device can be accessed using the following commands:
ubi info Display volume and ubi layout information
ubi createvol Create UBI volume on UBI device
ubi removevol Remove UBI volume from UBI device
ubi read Read data from UBI volume to memory
ubi write Write data from memory to UBI volume
For example display volume and ubi layout information with ubi info:
=> ubi info l
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 126976
UBI: used_ebs 2
UBI: used_bytes 253952
UBI: last_eb_bytes 2
UBI: corrupted 0
UBI: upd_marker 0
UBI: name layout volume
=>
There is another set of commands to access UBIFS file systems:
ubifsmount - mount UBIFS volume
ubifsls - list files in a directory
ubifsload - load file from an UBIFS filesystem
First, we have to mount the UBIFS file system:
=> ubifsmount filesystem
UBIFS: mounted UBI device 0, volume 0, name "filesystem"
UBIFS: mounted read-only
UBIFS: file system size: 247603200 bytes (241800 KiB, 236 MiB, 1950 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root: 0 bytes (0 KiB)
=>
after successfully mounted we can access it:
=> ubifsls
30 Tue Oct 02 14:57:09 2012 date_of_creation
30 Tue Oct 02 14:57:11 2012 date_of_modification
16 Tue Oct 02 14:57:08 2012 README
=> ubifsload 0x42000000 date_of_creation
Loading file 'date_of_creation' to addr 0x42000000 with size 30 (0x0000001e)...
Done
=> md 0x42000000
42000000: 20657554 2074634f 31203220 37353a36 Tue Oct 2 16:57
42000010: 2039303a 54534543 31303220 00000a32 :09 CEST 2012...
5.9.3.6. UBI Usage in U-Boot 56