[yocto] determining ubi build parameters

Maxwell Bottiger sleepylight at jive-turkey.net
Thu Nov 7 18:20:04 PST 2013


I have a UBI JFFS file system I just built and flashed onto my at91sam9x5ek
board.  I think everything built correctly, but I get the following error
when booting the device:

Scanning device for bad blocks
Bad eraseblock 1101 at 0x0000089a0000
Bad eraseblock 1309 at 0x00000a3a0000
2 cmdlinepart partitions found on MTD device atmel_nand
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000000800000 : "bootstrap/uboot/kernel"
0x000000800000-0x000010000000 : "rootfs"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI error: process_eb: bad image sequence number 1334101648 in PEB 1921,
expected 1211504389

[snip]

VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available
partitions:
1f00            8192 mtdblock0  (driver?)
1f01          253952 mtdblock1  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)

My best guess is that the UBI layout generated by yocto is different than
the one u-boot is passing to the kernel.  So, either I need to create a
layout which is the same as the u-boot parameters, or I need to change
u-boot to match the generated layout.  Either way, I need to figure out
what parameters Yocto is using, and I'm not sure how to do that.

My u-boot vairables:

U-Boot> printenv
bootargs=mem=128M console=ttyS0,115200
mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs)
root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs
bootcmd=nand read.jffs2 0x22000000 0x200000 0x250000; bootm 0x22000000
bootdelay=1
baudrate=115200
ethact=macb0

Can anyone point me to where the UBI parameters are decided, or let me know
if I'm totally on the wrong track?  As always, I appreciate the help.

-Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20131107/100215bf/attachment.html>


More information about the yocto mailing list