1
votes

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.

2
How are you writing the image file to flash? Are you using Linux or U-Boot or ??? See free-electrons.com/blog/creating-flashing-ubi-ubifs-imagessawdust
Update: Sorry for not writing back, but I found another issue, namely the rootfs haven't been flashed on the nor flash but on the spi flash, have to modify the device tree first and will update this topic another time if I achieved this.h0ch5tr4355
Do you solve the problem? I have the same question: stackoverflow.com/questions/69620588/…MaxRas

2 Answers

1
votes

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.

0
votes

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.