LTIB: adding extra free space in rootfs.jffs2 without losing compression

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LTIB: adding extra free space in rootfs.jffs2 without losing compression

Jump to solution
2,494 Views
admin
Specialist II

Hi all.

I use LTIB to build a jffs2 filesystem for a Linux iMX31 project with 32MB of flash available.

Launching ltib leaving at the default value (DEPLOYMENT_PADDING_KB = 0) the option "Allocate extra space (Kbytes)", my original rootfs is successfully compressed in a rootfs.jffs2 file, reducing the size from about 40MB to about 15MB.

But doing that, I cannot create a new file because the filesystem does not have any free space left.

 

If I use the above mentioned option adding, for example, 1000KB in order to obtain a 15+1MB filesystem, I obtain a rootfs.jffs2 file of about 41MB!

In fact, reading in the ltib/bin/Ltibutils.pm file, if I set a value different from 0, the --pad=X option is added to the mkfs.jffs2 command, where X is $fs_size + DEPLOYMENT_PADDING_KB, so it creates a file of that dimension and apparently with no compression.

 

So, how can I add extra free space to my filesystem without losing compression?

 

Many thanks in advance!

 

M.

Message Edited by melcataclysm on 2009-04-23 05:07 PM
0 Kudos
1 Solution
642 Views
fabio_estevam
NXP Employee
NXP Employee

The approach I use is to specify the size of the rootfs (taking in consideration the extra space needed) into Redboot:

 

fis create -l 0x01E00000 root
 
This will create a 30MB roots.
 

Regards,

 

Fabio Estevam

View solution in original post

0 Kudos
2 Replies
643 Views
fabio_estevam
NXP Employee
NXP Employee

The approach I use is to specify the size of the rootfs (taking in consideration the extra space needed) into Redboot:

 

fis create -l 0x01E00000 root
 
This will create a 30MB roots.
 

Regards,

 

Fabio Estevam

0 Kudos
642 Views
admin
Specialist II

Thank you for your reply!

So I can have a rootfs.jffs2 file of 15 MB, put it in a 30MB partition and have 15MB of free space?

 

It would be wonderful! I'll try.

 

Bye

 

M.

0 Kudos