summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-11-11 19:28:11 +0100
committerJonas Smedegaard <dr@jones.dk>2017-11-11 19:28:11 +0100
commit1e9df7bab2a80b47e52521a82946abf63009f936 (patch)
treeb24db941f4a8c853740f9568b703848d2280eb3c
parent8b20dcd7b7696b739ca9a02c1c49c1af21ed44bd (diff)
Fix expand rootfs size by 10% - 5 as reserved by ext4, and 5 for inaccuracy.1.0b9
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 264f2c9..893f09a 100644
--- a/Makefile
+++ b/Makefile
@@ -408,6 +408,9 @@ partition/$(1)/$(2)/$(3)/rootfs.img: \
$(UMOUNT_EXT) "$$@.mnt"
mv -f $$@~ $$@
touch $$@
+
+# Guestimate image size from size of contents
+# * added 10% - 5 as reserved by ext4, and 5 for inaccuracy
partition/$(1)/$(2)/$(3)/rootfs.size: \
partition/$(1)/$(2)/$(3)/rootfs
echo \
@@ -418,10 +421,12 @@ partition/$(1)/$(2)/$(3)/rootfs.size: \
du -s "$$<" \
| cut -f 1 ) \
/ 1024 \
+ / 100 * 110 \
/ $(segmentsize) + 1 ) \
* $(segmentsize) * 1024 * 1024 )) \
> $$@~
mv -f $$@~ $$@
+
partition/$(1)/$(2)/$(3)/rootfs: \
partition/$(1)/$(2)/$(3)/rootfs.multistrap.conf
$(SUPATH) $(call this-fakeroot,$$@.state) \