How to flash ubi image from barebox

Sascha Hauer s.hauer at pengutronix.de
Tue Oct 23 03:15:42 EDT 2012


On Wed, Oct 17, 2012 at 04:41:59PM +0530, Madhu koriginja wrote:
> Hi All,
>              Please help me how to flash the ubi image from barebox.
> I generated the ubifs image using the mkfs.jffs2,

I assume the above is a typo, right? mkfs.jffs2 won't create ubifs
images.

> then I created the ubi
> image using the ubinize. I am trying to flash this ubi image on NAND.
> 
> I tried in two ways
> 1) I flashed the UBI image directly on /dev/nand0.rootfs.bb(erased the
> partition before flash).

This should generally work.

> 
> 2) I executed the below commands from barebox
> #erase /dev/nand0.rootfs.bb
> #ubiattach /dev/nand0.rootfs
>  After this command it created the /dev/ubi0
> #ubimkvol /dev/ubi0 rootfs 0
>    After this command it created the /dev/ubi0.rootfs

This should also work.

Do the parameters to mkfs.ubifs/ubinize match your hardware? Some
parameters are not really obvious.

Also, what hardware are you on?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list