简体   繁体   中英

How can I set a ubifs generated by yocto as rootfs?

I try to set UBIFS as the rootfs on a board.

These are my mtd devices when I use a bootable filesystem:

cat /proc/mtd
mtd0: 08000000 00020000 "fe8000000.flash"
mtd1: 00100000 00010000 "u-boot"
mtd2: 00500000 00010000 "kernel"
mtd3: 00100000 00010000 "dtb"
mtd4: 00900000 00010000 "file system"

I flashed both (tried both methods) the .ubifs file and the .ubi file, which is generated by yocto, into the correct space ( mtd4 ) and tried to boot from u-boot with that command (also tried multiple versions):

setenv bootargs root=ubi0_0 rw ubi.mtd=4,2048 noinitrd rootfstype=ubifs ip=[...] console=[...]

But I get always errors like:

UBI error: ubi_open_volume: cannot open device 0, volume 0, error -19

or

UBIFS error (pid1): ubifs_mount: cannot open "ubi0_0", error -19

Has unlike me someone experience with UBIFS and knows what I am doing wrong. Links to good manuals or something else are also highly appreciated as I can't find very much for UBI.

Choosing the commandline as for example:

setenv bootargs 'console=ttyAS0,115200 rw init=/bin/devinit coprocessor_mem=4m@0x40000000,4m@0x40400000 printk=1 nwhwconf=device:eth0,hwaddr:00:80:E1:12:40:61 rw ip=172.100.100.249:172.100.100.174:172.100.100.174:255.255.0.0:LINUX7109:eth0:off bigphysarea=6000 stmmaceth=msglvl:0,phyaddr:2,watchdog:5000 ubi.mtd=6 rootfstype=ubifs root=ubi0:rootfs'

Please refer the following link for the bootargs parameter as defined above.

Try changing the bootargs parameter from:

root=ubi0_0

To:

root=ubi0:rootfs

If you haven't already found it, MTD has a great FAQ on this subject.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM