[Gta04-owner] ***UNCHECKED*** Re: suggestions for rootfs
H. Nikolaus Schaller
hns at goldelico.com
Fri Feb 3 08:43:41 CET 2017
> Am 02.02.2017 um 23:26 schrieb Andreas Kemnade <andreas at kemnade.info>:
> Hi Nikolaus,
> On Wed, 1 Feb 2017 07:16:45 +0100
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>> I am not sure. We use ubifs and AFAIK it "compresses" by using less
>> padding bytes for many small files. But this just means it uses the
>> blocks more efficiently. In fact it looks as if I can get ca. 550MB
>> from µSD into the 460 MB available.
>> But I have not read about real compression. Could virtually extend the
>> available space by factor 2 (since so many files are plain ASCII).
>> Anyone knows how to compress ubifs?
> mkubifs -x ...
> mount -o compr=...
> zlib and lzo are available
I have done some research, but we create the ubifs differently:
ubiformat -y /dev/mtd4
ubiattach /dev/ubi_ctrl -m 4
ubimkvol /dev/ubi0 -N gta04-rootfs -m &&
mkdir -p /mnt/nand &&
mount -t ubifs ubi0:gta04-rootfs /mnt/nand
And I have not found any option to control compression for
ubiformat, ubiattach or ubimkvol (where I had expected it).
BTW, these tools are really badly documented. Only --help is
Well, I think I have a hint: http://www.linux-mtd.infradead.org/faq/ubifs.html
section "Is it OK to mount empty UBI volumes?" says:
"Yes, it is OK to mount empty UBI volumes, i.e. the volumes which contain only 0xFF bytes. In this case UBIFS formats the media automatically with default parameters (journal size, compression, etc)."
and gives sample code:
> # Create an UBI volume - the created volume will be empty
> ubimkvol /dev/ubi0 -N test_volume -s 10MiB
> # Mount UBIFS - it will automatically format the empty volume
> mount -t ubifs ubi0:test_volume /mnt/ubifs
So this means that it could suffice to initially mount with -o compr=lzo
which should create a compressed image and afterwards it should simply "know"
about compression. Let's give this theory a try.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the Gta04-owner