ubi mount err for imx6ull kernel:too small LEBs (3968 bytes), min. is 15360 bytes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ubi mount err for imx6ull kernel:too small LEBs (3968 bytes), min. is 15360 bytes

2,364 Views
tomzhu
Contributor II

Hi  All,

Recently I tried to mount the ubi file system with the mfgtool startup script, allocated a partition of 6Mbit size, and used an 8Mbit qspi flash of winband, 'w25q64', which identified the minimum LEBs to be about 3k.

Does not meet the ubi minimum 15k requirements.

Check the kernel code found #define UBIFS_MIN_LEB_SZ 15*1024, if you modify this will bring a new error.

How can I change the code to successfully mount the ubifs?

Thanks!

ucl2.xml:

<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd1 0 0">Erasing rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ ls /dev/mtd*"/>
<CMD state="Updater" type="push" body="$ ubiformat /dev/mtd1"/>
<CMD state="Updater" type="push" body="$ ubiattach /dev/ubi_ctrl -m 1">Attaching UBI partition</CMD>
<CMD state="Updater" type="push" body="$ ubimkvol /dev/ubi0 -N kernel -s 15360"/>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mtd1"/>
<CMD state="Updater" type="push" body="$ mount -t ubifs ubi0:kernel /mnt/mtd1"/>

Log:

UBIFS error (ubi0:0 pid 56): init_constants_early: too small LEBs (3968 bytes), min. is 15360 bytes
mount: wrong fs type, bad option, bad superblock on ubi0:kernel,
missing codepage or helper program, or other error

Best Regards,

Tom

0 Kudos
3 Replies

1,661 Views
igorpadykov
NXP Employee
NXP Employee

Hi Tom

one can look at ubifs limitations described on

Memory Technology Device (MTD) Subsystem for Linux. 

and recommendations use jffs2 for small partitions.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,661 Views
tomzhu
Contributor II

Hi igor,

Thank you for your reply.

I tried to mount the file system from uboot.

If I use jffs2, but I find that the code can't be compiled, I don't know what to do.

Can you help me?

For example, give me a sample.

Thank.

add in mx6ullevk.h:

#define  CONFIG_CMD_MTDPARTS
#define CONFIG_JFFS2_DEV   "nor1"
#define CONFIG_JFFS2_PART_SIZE  0x600000
#define CONFIG_JFFS2_PART_OFFSET 0x100000 

Best Regards,

Tom

0 Kudos

1,661 Views
igorpadykov
NXP Employee
NXP Employee

Hi Tom

for compilation problems please create new thread.

Best regards
igor

0 Kudos