summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2021-07-27 18:25:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-01 16:28:04 +0100
commit565c499a495a446861e3727954a9e45837164d55 (patch)
treee866fb5dc5069043fae7ff05cabdf4b4819d4fb8 /meta/classes
parent11d268e2b5b29be7f6ebd4ba8a814430ef7a21ab (diff)
downloadpoky-565c499a495a446861e3727954a9e45837164d55.tar.gz
image_types: Restore pre-btrfs-tools 4.14.1 mkfs.btrfs shrink behavior
Currently the mkfs.btrfs generates large images with a lot of wasted space. This happens since OE-core updated btrfs-tools from 4.13.3 to 4.15.1 in commit 94b645aa77 ("btrfs-tools: update to 4.15.1") . Note in mkfs.btrfs(8) manpage section -r says the following: " -r|--rootdir <rootdir> ... Note This option may enlarge the image or file to ensure it’s big enough to contain the files from rootdir. Since version 4.14.1 the filesystem size is not minimized. Please see option --shrink if you need that functionality. --shrink Shrink the filesystem to its minimal size, only works with --rootdir option. ... Note prior to version 4.14.1, the shrinking was done automatically. " Add the --shrink option to EXTRA_IMAGECMD_btrfs to reinstate the original behavior and un-waste the space. (From OE-Core rev: 6a72c7c688c7985d19f0387121b3a77639ba6f60) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alexander Kanavin <alexander.kanavin@linux.intel.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c4a99d36967302c176b62fad840b5e79486ea356) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image_types.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 8028691405..cee577d5da 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -225,7 +225,7 @@ EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLO
225EXTRA_IMAGECMD_ext2 ?= "-i 4096" 225EXTRA_IMAGECMD_ext2 ?= "-i 4096"
226EXTRA_IMAGECMD_ext3 ?= "-i 4096" 226EXTRA_IMAGECMD_ext3 ?= "-i 4096"
227EXTRA_IMAGECMD_ext4 ?= "-i 4096" 227EXTRA_IMAGECMD_ext4 ?= "-i 4096"
228EXTRA_IMAGECMD_btrfs ?= "-n 4096" 228EXTRA_IMAGECMD_btrfs ?= "-n 4096 --shrink"
229EXTRA_IMAGECMD_f2fs ?= "" 229EXTRA_IMAGECMD_f2fs ?= ""
230 230
231do_image_cpio[depends] += "cpio-native:do_populate_sysroot" 231do_image_cpio[depends] += "cpio-native:do_populate_sysroot"