Specifications
Present UBI devices: ubi0
ubi0
Volumes count: 1
Logical eraseblock size: 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks: 1984 (251920384 bytes, 240.2 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes 128
Count of bad physical eraseblocks: 0
Count of reserved physical eraseblocks: 4
Current maximum erase counter value: 2
Minimum input/output unit size: 2048 bytes
Character device major/minor: 247:0
Present volumes: 0
Volume ID: 0 (on ubi0)
Type: dynamic
Alignment: 1
Size: 1976 LEBs (250904576 bytes, 239.3 MiB)
State: OK
Name: filesystem
Character device major/minor: 247:1
root@generic-armv5te:~#
List which partitions we have mounted, and how many space we have available:
root@generic-armv5te:~# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 315G 148G 152G 50% /
192.168.1.1:/opt/eldk-5.2.1/armv5te/rootfs-lsb-sdk/ 315G 148G 152G 50% /
none 125M 140K 124M 1% /dev
/dev/mmcblk0p2 30M 13M 18M 42% /media/mmcblk0p2
/dev/mmcblk0p3 1.7G 1.2G 493M 71% /media/mmcblk0p3
tmpfs 125M 152K 124M 1% /var/volatile
tmpfs 125M 0 125M 0% /media/ram
/dev/ubi0_0 220M 24K 215M 1% /mnt/filesystem
root@generic-armv5te:~#
9.1.5.3. Creating UBIFS File System Images
9.1.5.3.1. Determining the Parameters of the used Flash Types:
The "mkfs.ubifs" requires a few parameters that describe the specific features of the underlying flash chips.
The easiest way to determine these parameters is to run the "mtdinfo" utility on a running Linux
system./dev/mtd7 is NAND flash:
root@generic-armv5te:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00300000 00020000 "bootloader"
mtd1: 00080000 00020000 "environment"
mtd2: 00080000 00020000 "redundant-environment"
mtd3: 00400000 00020000 "kernel"
mtd4: 0f800000 00020000 "filesystem"
mtd5: 00100000 00010000 "spi32766.0"
root@generic-armv5te:~#
root@generic-armv5te:~# mtdinfo -u /dev/mtd4
mtd4
Name: filesystem
Type: nand
Eraseblock size: 131072 bytes, 128.0 KiB
Amount of eraseblocks: 1984 (260046848 bytes, 248.0 MiB)
Minimum input/output unit size: 2048 bytes
9.1.5.3. Creating UBIFS File System Images 103