AnsweredAssumed Answered

iMX28 NAND Flash with Yocto

Question asked by Xavi García on May 11, 2015

I am trying to run a custom Yocto image from the imx28's nand flash.

I'm using a custom Hardware based on imx28evk, it needs changes on the imxbootlets (patching battery...). On that recipe, I specify the boot mode (I include the whole file):
echo "noinitrd console=ttyAM0,115200 ubi.mtd=1 root=ubi0:rootfs0 rootfstype=ubifs rw gpmi" > linux_prep/cmdlines/${IMXBOOTLETS_MACHINE}.txt

Other changes that I have done is chaging "UBOOT_CONFIG ??= "sd"" to "UBOOT_CONFIG = "nand" on file: sources/meta-fsl-arm/conf/machine/imx28evk.conf

After compiling this way the image, I uncompress the tar.gz file into a folder, and create te ubifs with this command:
mkfs.ubifs -x none -m 2048 -e 126976 -c 1888 -r Folder/ rootfs.ubifs

I will need this ubifs to burn it on the mtd1


In mtd0 I need to burn the boot partition (/build/tmp/deploy/image/imx28evk/


With these two files, I use mtd-utils in order to burn them on to the nand flash, these are the commands that I use:
$ mknod /dev/mtd0 c 90 0

$ kobs-ng init

$ flash_eraseall /dev/mtd1

$ mknod /dev/ubi_ctrl c 10 60

$ ubiattach /dev/ubi_ctrl -m 1 -d 0

$ mknod /dev/ubi0 c 250 0

$ mknod /dev/ubi0_0 c 252 1

$ ubimkvol /dev/ubi0 -N rootfs0 -m

$ ubiupdate /dev/ubi0_0 rootfs.ubifs



I achieved to boot from mtd0, but it fails trying  to find root=ubi0:rootfs0.


Am I forgetting anything or doing something wrong? What more do I have to change on Yocto in order to have an usefull Nand image?

Original Attachment has been moved to: