summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) \