Hi all,
When burn the board using MFGTOOL, fails to attach mtd part. Debug trace is:
mx28_nor_flash spi1.0: mx28_nor_flash (32768 Kbytes)
Creating 2 MTD partitions on "mx28_nor_flash":
0x000000000000-0x000000100000 : "boot"
0x000000100000-0x000002000000 : "kernel"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 4096 bytes (4 KiB)
UBI: logical eraseblock size: 3968 bytes
UBI: smallest flash I/O unit: 1
UBI: VID header offset: 64 (aligned 64)
UBI: data offset: 128
UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd1
I use a Winbond nor flash(W25Q256FVFIG), kernel version is 2.6.35.3
I debug the attaching process, it seems when read flash PEB's VID header, its magic number doesn't equal to predefined macro UBI_VID_HDR_MAGIC. However the flash read operation is successful.
This confuse me a lot. I searched the Google, most says the filesystem should be ubinized with mtd-utils. But my situation is Kernel just initializes the ubi module, it hasn't come to the mounting of filesystem I think.
Has read the http://www.linux-mtd.infradead.org/faq/ubi.html#L_format_mtd, the website says I needn't to format nor flash before the attaching operation.
I really don't know what happened. Someone familiar with ubi or has came across similar problem? Possible reason is also appreciated.
Thanks in advance.
#################################################################################################################
Part of the ucl.xml content is:
<LIST name="Singlechip NAND" desc="Install on singlechip NAND">
<CMD type="boot" body="Recovery" file="updater.sb" timeout="60" if="HabDisable">Booting update firmware.</CMD>
<CMD type="boot" body="Recovery" file="updater_ivt.sb" timeout="60" if="HabEnable">Booting update firmware.</CMD>
<CMD type="push" body="mknod class/mtd,mtd0,/dev/mtd0"/> ----------------------tool's log stops here with hint(
Panel A Start <CMD/> type="push" body="mknod class/mtd,mtd0,/dev/mtd0" file="" timeout="10" onError="" text="".
Panel A UtpUpdate Event: DeviceRemoval Msg: (null) DevState: Disconnected OpState: WAITING_FOR_DEVICE)
<CMD type="push" body="mknod class/mtd,mtd1,/dev/mtd1"/>
<CMD type="push" body="mknod class/misc,ubi_ctrl,/dev/ubi_ctrl"/>
<CMD type="push" body="$ flash_eraseall /dev/mtd0">Erasing rootfs partition</CMD>
<CMD type="push" body="$ flash_eraseall /dev/mtd1">Erasing rootfs partition</CMD>
<CMD type="push" body="send" file="files/imx28_ivt_linux.sb">Sending firmware</CMD>
<CMD type="push" body="$ kobs-ng init $FILE">Flashing firmware</CMD>
<CMD type="push" body="$ ubiattach /dev/ubi_ctrl -m 1 -d 0">Attaching UBI partition</CMD>
<CMD type="push" body="mknod class/ubi,ubi0,/dev/ubi0"/>
<CMD type="push" body="$ ubimkvol /dev/ubi0 -n 0 -N rootfs0 -s 224MiB">Creating UBI volumes</CMD>
<CMD type="push" body="$ ubimkvol /dev/ubi0 -n 1 -N data -m">Creating UBI volumes</CMD>
<CMD type="push" body="$ mkdir -p /mnt/ubi0; mount -t ubifs ubi0_0 /mnt/ubi0" />
<CMD type="push" body="pipe tar -jxv -C /mnt/ubi0" file="files/rootfs.tar.bz2">Transfer rootfs</CMD>
<CMD type="push" body="frf">Finish Flashing NAND</CMD>
<CMD type="push" body="$ umount /mnt/ubi0">Unmounting</CMD>
<CMD type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>
----------------------------------------------kernel cmd below-------------------------------------------------------
Kernel command line: noinitrd console=ttyAM0,115200 ubi.mtd=1 root=ubi0:rootfs0 rootfstype=ubifs rw gpmi
Solved! Go to Solution.
Hi h
there are issues for using ubifs described below, so one can try to use jffs2
How to enable SPI NOR boot for i.MX28 (Spansion s25fl256s)
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi h
there are issues for using ubifs described below, so one can try to use jffs2
How to enable SPI NOR boot for i.MX28 (Spansion s25fl256s)
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks igor!
I'll try jfss2.
One thing I think the nor flash should be formatted before ubi scanning the VID/EC header, otherwise, there's no possibility the magic number equals the predefined macro!
And hope someday later I can figure out the ubi issue!