Question about ubiformat and how to better use UBIFS

t kevin
2014-09-04T12:17:41Z

Hi ,

Currently I'm trying to create ubifs for rootfs on my device which has
a Nand flash on board.

Right now I know two approaches to do that.
1. On host,mkfs.ubifs+ubinize to generate one ubi.img. On target
board, ubiformat -f ubi.img on the MTD device, ubiattach then mount
and it's done.
or
2. On host, just tar -cz rootfs to generate root.tgz. On target board,
(for the first time)ubiformat the mtd device, ubiattach,ubimkvol, then
mount ubifs. Then untar the root.tgz to the mounted ubi volume.

Eventually the mountpoint should contain same files.

So here are my questions.
1. (Generally speaking) Which one is better? I know ubiformat is going
to erase every PEB so right now I prefer the second approach since I
don't have to do ubiformat everytime. It sounds like the erase counter
grows slower.

2. I'm working on an embedded device which has limited CPU power so
I'd like to use compressed_method=none. It can be done by passing -x
none to mkfs.ubifs. But I don't see similar option in ubiformat or
ubimkvol. So when I go to the 2nd approach the mounted rootfs is
always compressed.
http://www.linux-mtd.infradead.org/faq/ubifs.html#L_comproff
This method is not helping much. I want to disable compression on the
entire fs, just like mkfs.ubifs -x none did.

Thank you for your time
Kevin