Ubi file system production, or "-C" option problem

Source: Internet
Author: User

The following is an analysis record:

------------------------------------------------------------------------------

The parameters of the above command can be extracted from the Ubifs mount information:
Ubi:attaching Mtd5 to Ubi0
Ubi:physical eraseblock size:131072 bytes (+ KiB)//-P: Physical Erase block size
Ubi:logical eraseblock size:129024 Bytes//-E: Logical erase block Size (leb size)
Ubi:smallest Flash I/O unit:2048//-M: Page size
Ubi:sub-page size:512/s: Minimum hardware input/output page size
Ubi:vid Header offset:512 (aligned 512)
Ubi:data offset:2048
Ubi:attached Mtd5 to Ubi0
UBI:MTD device Name: "File System-1"
UBI:MTD Device size:162 MiB
Ubi:number of good pebs:1295//-C: Maximum number of logical erase blocks, typically less than or equal to block count-1
Ubi:number of Bad pebs:1//-c:162*1024*1024/129024 = 1316, 162*1024*1024/(128*1024) = 1296 (Error!!!) )
In our case, the file system can access up to 129024*812=100m space on the volume (feasible!!!) )
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:1295
Ubi:number of PEBs reserved for bad PEB handling:12
Ubi:max/mean Erase counter:2/0
Ubi:image sequence number:936292432
Ubi:background thread "ubi_bgt0d" started, PID 471
------------------------------------------------------------------------------
Ubifs:recovery needed
Ubifs:recovery completed
ubifs:mounted UBI device 0, Volume 0, name "Rootfs"
Ubifs:file system size:163602432 Bytes (159768 KiB, 156 MiB, 1268 Lebs)
Ubifs:journal size:9033728 bytes (8822 KiB, 8 MiB, Lebs)
Ubifs:media format:w4/r0 (Latest is w4/r0)
Ubifs:default Compressor:lzo
ubifs:reserved for root:0 bytes (0 KiB)
vfs:mounted Root (ubifs filesystem) on device 0:12.
Freeing Init memory:164k
Failed to Execute/init. Attempting defaults ...
Init:version 2.86 booting
Starting udevtar:removing leading '/' from member names
------------------------------------------------------------------------------
Cd/devkit8500d/work
/devkit8500d/tools/bin/mkfs.ubifs-r rootfs-m 2048-e 129024-c 1996-o ubifs.img
# ubifs File system image produced by the mkfs.ubifs command can be burned to NAND flash using UBI write command under U-boot
# Use the ubinize command to produce a ubi format image of the actual free space so that the file system image can be written to the board via the Ubiformat command:
# ubinize, with Ubi file system mirrored volume label
/devkit8500d/tools/bin/ubinize-o ubi.img-m 2048-p 128kib-s 512/devkit8500d/tools/bin/ubinize.cfg
#/devkit8500d/tools/bin/ubinize-o ubi.img-m 2048-p 128kib-s 512-o 2048/devkit8500d/tools/bin/ubinize.cfg
cp/devkit8500d/work/ubi.img/mnt/hgfs/ubuntu10.04/dyz/omap3devkit8500/image/
------------------------------------------------------------------------------
/devkit8500d/tools/bin/mkfs.ubifs-m 2048-c 1296-e 129024-r/devkit8500d/work/rootfs-o ubifs.img
/devkit8500d/tools/bin/ubinize-o ubi.img-m 2048-p 128kib-s 512/devkit8500d/tools/bin/ubinize.cfg
Error occurred:
...
UBIFS error (PID 1): Ubifs_get_sb:cannot open "Ubi0:rootfs", error-19
Vfs:cannot Open Root Device "Ubi0:rootfs" or Unknown-block (0,0)
Please append a correct "root=" boot option; Here is the available partitions:
1f00 mtdblock0 (driver?)
...
------------------------------------------------------------------------------
Modify the Ubinize.cfg file
[Ubifs]
Mode=ubi
Image=ubifs.img
Vol_id=0
Vol_size=162mib
Vol_type=dynamic
Vol_name=rootfs
Vol_flags=autoresize
Results:
Failed!!!
------------------------------------------------------------------------------
Reference information for successful times
Omap_vout omap_vout:: Registered and initialized video device 1
ubifs:mounted UBI device 0, Volume 0, name "Rootfs"
Ubifs:file system size:163602432 Bytes (159768 KiB, 156 MiB, 1268 Lebs)//1268 Lebs very IMPORTANT!!!
Ubifs:journal size:9033728 bytes (8822 KiB, 8 MiB, Lebs)
Ubifs:media format:w4/r0 (Latest is w4/r0)
Ubifs:default Compressor:lzo
ubifs:reserved for root:0 bytes (0 KiB)
vfs:mounted Root (ubifs filesystem) on device 0:12.
Freeing Init memory:164k
Failed to Execute/init. Attempting defaults ...
Init:version 2.86 booting
Starting udevtar:removing leading '/' from member names
Re-run:
/devkit8500d/tools/bin/mkfs.ubifs-m 2048-c 1268-e 129024-r/devkit8500d/work/rootfs-o ubifs.img
/devkit8500d/tools/bin/ubinize-o ubi.img-m 2048-p 128kib-s 512/devkit8500d/tools/bin/ubinize.cfg
Results:
Failed!!!
------------------------------------------------------------------------------
/devkit8500d/tools/bin/mkfs.ubifs-m 2048-c 812-e 129024-r/devkit8500d/work/rootfs-o ubifs.img
/devkit8500d/tools/bin/ubinize-o ubi.img-m 2048-p 128kib-s 512/devkit8500d/tools/bin/ubinize.cfg
Success, or the problem of-C
------------------------------------------------------------------------------

Ubi file system production, or "-C" option problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.