Create an image using the configuration file and directly burn it into ubi Image

Source: Internet
Author: User

Write the configuration file. The advantage is that multiple. IMG files are merged into one. IMG and then burned together. A single. IMG can be used with mkfs. ubifs.
The content of the configuration file ubinize. cfg is: (the configuration file can be written in ubinize-help)
[Ubifs1]
Mode = ubi
Image = ubifs1.img
Vol_id = 0
Vol_size = 20mib
Vol_type = dynamic
Vol_name = test1
Vol_flags = autoresize
[Ubifs2]
Mode = ubi
Image = ubifs2.img
Vol_id = 1
Vol_size = 20mib
Vol_type = dynamic
Vol_name = Test2

Ubinize-O ubifs. IMG-M 512-P 16kib-s 256 ubinize. cfg
When ubiformat-Q/dev/mtd3-F ubifs. IMG is formatted, the volume information has been written
Then ubiattach/dev/ubi_ctrl-M 3,
Mount your partition.

For example,
1. Create img
Mkfs. ubifs-M 512-e 15872-C 30000-r/work/root_file ubifs1.img
Mkfs. ubifs-M 512-e 15872-C 30000-r/work/root_file ubifs2.img
2. Write configuration file
[Ubifs1]
Mode = ubi
Image = ubifs1.img
Vol_id = 0
Vol_size = 20mib
Vol_type = dynamic
Vol_name = test1
Vol_flags = autoresize
[Ubifs2]
Mode = ubi
Image = ubifs2.img
Vol_id = 1
Vol_size = 20mib
Vol_type = dynamic
Vol_name = Test2

3. Ubinize-O ubifs. IMG-M 512-P 16kib-s 256 ubinize. cfg
Ubiformat-Q/dev/mtd3-F ubifs. img
Ubiattach/dev/ubi_ctrl-M 3
Mount-T ubifs ubi0_0/mnt, umount/mnt
Mount-T ubifs ubi0_1/mnt

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.