Changeset 34412


Ignore:
Timestamp:
2012-11-29T18:49:50+01:00 (5 years ago)
Author:
juhosg
Message:

AA: build: Add TARGET_ROOTFS_RESERVED_PCT option to reduce wasted space

Backport of r34408.

The genext2fs tool will 'reserve' 5% of the image size by default,
apparently by creating a huge lost+found directory. In fact it seemed to
be much more than 5% in practice — I saw an image with 8MiB used, and
recovered about 2MiB of it by deleting the 'empty' lost+found directory:

/dev/loop0 48377 8482 37438 19% /mnt/spare

# rmdir lost+found/

/dev/loop0 48377 6014 39906 14% /mnt/spare

This makes it configurable, but leaves it at the genext2fs default
of 5% for now. It should probably be changed to default to zero, but
that can be a separate patch.

Signed-off-by: David Woodhouse <David.Woodhouse@…>
Signed-off-by: Gabor Juhos <juhosg@…>

Location:
branches/attitude_adjustment
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/attitude_adjustment/Config.in

    r33582 r34412  
    125125                    Allows you to change the maximum number of inodes in the root filesystem 
    126126 
     127        config TARGET_ROOTFS_RESERVED_PCT 
     128                int "Percentage of reserved blocks in root filesystem" 
     129                depends TARGET_ROOTFS_EXT4FS 
     130                default 5 
     131                help 
     132                    Allows you to change the percentage of reserved blocks in the root filesystem 
     133 
    127134endmenu 
    128135 
  • branches/attitude_adjustment/include/image.mk

    r32572 r34412  
    125125  define Image/mkfs/ext4 
    126126# generate an ext2 fs 
    127         $(STAGING_DIR_HOST)/bin/genext2fs -U -b $(E2SIZE) -N $(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext4 
     127        $(STAGING_DIR_HOST)/bin/genext2fs -U -b $(E2SIZE) -N $(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext4 -m $(CONFIG_TARGET_ROOTFS_RESERVED_PCT) 
    128128# convert it to ext4 
    129129        $(STAGING_DIR_HOST)/bin/tune2fs -O extents,uninit_bg,dir_index $(KDIR)/root.ext4 
Note: See TracChangeset for help on using the changeset viewer.