summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2017-12-06 19:37:10 -0800
committerArmin Kuster <akuster808@gmail.com>2017-12-22 14:10:14 -0800
commitff272c99ab22c2897ff2fe608787e58be4300a31 (patch)
treed880bbec3cc78557f43cbbc488658896e63574a3
parent86dc9fa64860f39caa82670e39d3e5d017c7518d (diff)
downloadpoky-contrib-ff272c99ab22c2897ff2fe608787e58be4300a31.tar.gz
poky-contrib-ff272c99ab22c2897ff2fe608787e58be4300a31.tar.bz2
poky-contrib-ff272c99ab22c2897ff2fe608787e58be4300a31.zip
image_types: btrfs use sparse file creation
This will speed up file creation and still allow the btrfs tools to create a full btrfs image. This is similar to what we do for ext234 FS types. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit de2f2fc9e8e6d874a11e69adc2f438975a5c1359) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-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 d09d1277eaa..e881d0cc2d3 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -104,7 +104,7 @@ IMAGE_CMD_btrfs () {
size=${MIN_BTRFS_SIZE}
bbwarn "Rootfs size is too small for BTRFS. Filesystem will be extended to ${size}K"
fi
- dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs count=${size} bs=1024
+ dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs seek=${size} count=0 bs=1024
mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs
}