[U-Boot] Problems with creating an UBIFS partition with uboot
Matthew L. Creech
mlcreech at gmail.com
Sat Jun 19 00:02:54 CEST 2010
At a glance, one problem is the use of ubinize, which is intended to
work when doing "bare NAND" flashing with no awareness of UBI. I.e.
if you tried these steps with "rootfs.ubifs" rather than
"rootfs.ubi.img", they'd probably work. However, that doesn't explain
why the last attempt (doing a straight "nand write") also fails, since
that should work with the ubinized image.
To get it working piece by piece, you should try first without
ubinize, using "ubi write". Once that's working, then add in the
ubinize step and try flashing it in "raw" mode.
Anyway, here's what I do, in case having another reference helps. My
U-Boot config has the following:
#define MTDIDS_DEFAULT "nand0=flash"
#define MTDPARTS_DEFAULT "mtdparts=flash:5M(uboot),-(root)"
Simple layout, everything aside from U-Boot is UBI[FS]. (This device
only has a single NAND chip.) In U-Boot, I do:
- nand erase 200000
- mtdparts default
- ubi part root
- ubi create container
- tftp ubifs.img
- ubi write ${fileaddr} container ${filesize}
After that, I can use the filesystem with no problems:
- ubifsmount container
- ubifsload [address] [...]
ubifs.img was created with:
mkfs.ubifs -m 2048 -e 129024 -c 8152 -x lzo -U -v -r /path/to/root/ -o ubifs.img
Most of this looks similar to what you're doing, but here it is anyway
just in case.
--
Matthew L. Creech
More information about the U-Boot
mailing list