Building UBIFS for Nand Flash

Moderator: nferre

Posts: 1
Joined: Tue Aug 19, 2014 2:32 pm

Building UBIFS for Nand Flash

Tue Aug 19, 2014 2:47 pm


I have a lot of problems booting from nand flash when using ubifs from buildroot.
But i found out that using an older mtd-utils solved my problem and i don't know why.
Does anyone have any idea?

Here is the tutorial:

 1 - Download and install mtd-utils from lucid repository (ubuntu 10.04.4)
 1.1 -  For 64-bit OS ... _amd64.deb
 1.2 -  For 32-bit OS ... 1_i386.deb

2 - Build Ubifs
# mkfs.ubifs -r your_rootfs/ -o mine.img -m 2048 -e 126976 -c 2048
# vi ubinize.cfg

# ubinize -o mine.ubi -m 2048 -p 128KiB -s 2048 -O 2048 ubinize.cfg

3 - Use SAM-BA to load mine.ubi image to nand flash
Location: USA
Posts: 1830
Joined: Thu Apr 19, 2007 10:15 pm

Re: Building UBIFS for Nand Flash

Tue Aug 19, 2014 11:35 pm

The most reliable method of creating/installing the UBI volume with UBIFS is to use the "proper" Linux tools on the target system:

Code: Select all

# ubiformat /dev/mtdX
# ubiattach -p /dev/mtdX
# ubimkvol /dev/ubi0 -N volume_name -s 64MiB
# ubiupdatevol /dev/ubi0_0 /path/to/ubifs.img
# mount -t ubifs ubi0:volume_name /mount/point
following this guide.
You should build another kernel to boot from SDcard or for tftpbooting with an initramfs.
After all of that you will have a UBI volume and UBIFS installed by the same version of Linux device drivers and utilities as your runtime Linux.


Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 1 guest