AnsweredAssumed Answered


Question asked by Piddy Piddy on Apr 7, 2016
Latest reply on Apr 12, 2016 by Piddy Piddy



I am trying to boot a UBI filesystem on T1040RDB from nand flash,

using the Bitbake/Yocto


I used mtdinfo /dev/mtd4 to find the relevant information, which returned



Name:                                          NAND RFS Image

Type:                                            nand

Eraseblock size:                          524288 bytes, 512.0 KiB

Amount of eraseblocks:              1000 (524288000 bytes, 500.0 MiB)

Minimum input/output unit size:   4096 bytes

Sub-page size:                             4096 bytes

OOB size:                                    224 bytes

Character device major/minor:    90:8

Bad blocks are allowed:               true

Device is writable:                        true


Based on this information i create an image using the command

ubinize -o ubi.img -s 4096 -m 4096 -p 512KiB ubinize.cfg

(- s = subpage size, - m = minimum i/o size, - p is physical erase block size)

and the ubinize.cfg contains:










I transfered ubi.img to T1040RDB and used the following commands:

ubiformat /dev/mtd4

ubiformat /dev/mtd4 -f /tmp/ubi.img

ubiattach /dev/ubi_ctrl -m 4

mount -t ubifs ubi0_0 /mnt


Once i try to mount i get the error:

error: validate_sb: min. I/O unit mismatch: 512 in superblock, 4096 real


It seems the superblock is used to store general system information, not flash specific.

I never worked with flash memory before, i wonder if someone can help me figure out why this mismatch exists and what i can do to fix this problems.



I found this question: T1040RDB Failed to mount UBIFS

But it doesn't give any information on the ubinize command used to create the image, but it did help me confirm i had the right kernel settings.



Using -m 512 in the ubinize doesn't really make sense to me, it forces me to also use subpage size of the same size, and when i try ubiattach it responds with:

validate_ec_hdr: bad VID header offset 512, expected 4096



Thanks already !