This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

can't boot with ubifs on evmdm365

Hello everybody,

I want to use ubifs as the root filesystem on my evmdm365 board. But on the boot process I get lots of  "ubi_io_read: error -74". Here is my approach:

After booting with nfs I attached /dev/mtd4 to the ubi device 0. Then I created volume "rootfs" to ubi device 0 and created an ubifs image of the filesystem with mkfs.ubifs and wrote it directly via mkfs.ubifs to the volume. To test it I mounted it to /mnt/nand without any problems. So I changed the kernel parameters in u-boot to:

ubi.mtd=4 rootfstype=ubifs root=ubi0:rootfs

The errors occur when ubi wants to attach the mtd device. But the PEB size, LEB size and so on are all ok. I get:

UBI: attaching mtd4 to ubi0

UBI: physical eraseblock size: 131072 bytes (128KiB)

UBI: logical eraseblock size: 129024 bytes

UBI: smallest flash I/O unit: 2048

UBI: sub-page size: 512

UBI: VID header offset: 512 (aligned 512)

UBI: data offset: 2048

UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 0:0, read 64 bytes

UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 1:0, read 64 bytes

UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 4:0, read 64 bytes

UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 4102:0, read 64 bytes

UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 4103:0, read 64 bytes

UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 4104:0, read 64 bytes

...

UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 5060:0, read 64 bytes

UBI: attached mtd4 to ubi0

UBI: MTD device name: "filesystem2"

UBI: MTD device size 1516 MiB

UBI: number of good PEBs: 12108

UBI: number of bad PEBs: 20

...

Then the boot process continues and I get the UBI error messages with error -74 in between. Although the boot process finishes an I see the logon screen it is impossible to logon because I get continuous UBI error messages. What could be the reason for the error messages?

By the way, before flashing the ubifs image to mtd4, the device was erased with "flash_eraseall /dev/mtd4". And before that, I formatted the device with ubiformat.

Regards,

Matthias

  • I find some information on the MTD website about this error message (http://www.linux-mtd.infradead.org/faq/ubi.html) but I can't solve the problem. When I boot with nfs and create a ubi volume I can mount it with no problems. After reboot and mount it again, I get the error messages again. Also with an empty flash. I will try to use the flash without sub-pages. My previous configuration was 2048 Byte page size and 512 Byte sub-page size. So I want to change it to do not use sub-pages for writing the VID header.

    Regards,

    Matthias

    PS: When I looked into the datasheet of the NAND flash device I see no information about sub-pages and the page size is specified with 4k + 224 Bytes. So I am a little confused why Linux print me a page size of 2k. Also in the test apps from spectrum digital there is a "nandflash-lower" and a "nandflash-upper" test application where the page size is given with 2k.

  • Matthias,

    I might be able to help you out here. Could you please share the directories in your kernel code arch/arm/mach-davinci, drivers/mtd/nand? You can create a tar ball and send it to renjith.thomas@pathpartnertech.com.

    Also can you send the complete logs and and the steps followed in creating the UBI volume?