aboutsummaryrefslogtreecommitdiffstats
path: root/include/image.mk
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-11-29 17:37:15 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-11-29 17:37:15 +0000
commitd90e805fe607f6455a6ae8631e91c960ba4deaa2 (patch)
treeadf36b8284f1c148873ca7daced123aa2804b4ea /include/image.mk
parent44131bd78518a8635129f75cc794535196788fef (diff)
downloadupstream-d90e805fe607f6455a6ae8631e91c960ba4deaa2.tar.gz
upstream-d90e805fe607f6455a6ae8631e91c960ba4deaa2.tar.bz2
upstream-d90e805fe607f6455a6ae8631e91c960ba4deaa2.zip
build: Add TARGET_ROOTFS_RESERVED_PCT option to reduce wasted space
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@intel.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34408
Diffstat (limited to 'include/image.mk')
-rw-r--r--include/image.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/image.mk b/include/image.mk
index 10850a6327..503115ddb0 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -124,7 +124,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_EXT4FS),)
define Image/mkfs/ext4
# generate an ext2 fs
- $(STAGING_DIR_HOST)/bin/genext2fs -U -b $(E2SIZE) -N $(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext4
+ $(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)
# convert it to ext4
$(STAGING_DIR_HOST)/bin/tune2fs -O extents,uninit_bg,dir_index $(KDIR)/root.ext4
# fix it up