diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-07-09 10:53:58 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-07-09 10:53:58 +0000 |
commit | 8b295a5fc4ffb861e01c7e35f2bc37f402b5f56f (patch) | |
tree | e4e895b231e4e758551f1cb96a5786c301c7621c | |
parent | 3c4c240d8c017bb63545ad303026d656800caa2e (diff) | |
download | buildroot-novena-8b295a5fc4ffb861e01c7e35f2bc37f402b5f56f.tar.gz buildroot-novena-8b295a5fc4ffb861e01c7e35f2bc37f402b5f56f.zip |
Automatically scale down the image padding size
-rw-r--r-- | make/ext2root.mk | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/make/ext2root.mk b/make/ext2root.mk index 0c66c18a9..84e14b48f 100644 --- a/make/ext2root.mk +++ b/make/ext2root.mk @@ -32,9 +32,8 @@ genext2fs: $(GENEXT2_DIR)/genext2fs ############################################################# # How much KB we want to add to the calculated size for slack space -#GENEXT2_ADDTOROOTSIZE=4096 -GENEXT2_ADDTOROOTSIZE=16384 -GENEXT2_REALSIZE=$(subst total,, $(shell LANG=C du $(TARGET_DIR) -s -c -k | grep total )) +GENEXT2_REALSIZE=$(subst total,, $(shell LANG=C du $(TARGET_DIR) -s -c -k | grep total )) +GENEXT2_ADDTOROOTSIZE=$(shell if [ $(GENEXT2_REALSIZE) -ge 20000 ] ; then echo 16384; else echo 16; fi) GENEXT2_SIZE=$(shell expr $(GENEXT2_REALSIZE) + $(GENEXT2_ADDTOROOTSIZE)) # We currently add about 400 device nodes, so add that into the total GENEXT2_INODES=$(shell expr $(shell find $(TARGET_DIR) | wc -l) + 400) |