From 5cc6a4d6440f2fac61cbabc0ab64766f0c06a536 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sun, 10 Sep 2017 10:58:49 +0200 Subject: tdx-image-fstype: use pbzip2 as the compressor and ignore tar return value This speeds up compressing the final bz2 image. For angstrom-lxde-image on a 24 core CPU by about 30 seconds. Ignore the tar return value. "file changed as we read it" may be reported because wic is creating hardlinks of files in the rootfs. See openembedded commit 402b4cffbb4c58cfee93db18192f2b218ee0ae35 Signed-off-by: Max Krummenacher Acked-by: Marcel Ziswiler --- recipes-images/images/tdx-image-fstype.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'recipes-images/images/tdx-image-fstype.inc') diff --git a/recipes-images/images/tdx-image-fstype.inc b/recipes-images/images/tdx-image-fstype.inc index 83dc3bb..6c90151 100644 --- a/recipes-images/images/tdx-image-fstype.inc +++ b/recipes-images/images/tdx-image-fstype.inc @@ -23,6 +23,7 @@ UBOOT_BINARY_tegra124 = "u-boot-dtb-tegra.${UBOOT_EXT}" UBOOT_BINARY_tegra124m = "u-boot-dtb-tegra.${UBOOT_EXT}" #we need some native tools for deployment +DEPENDS_append = " pbzip2-native" DEPENDS_append_mx6 = " imx-loader-native" DEPENDS_append_mx6ull = " mtd-utils-native imx-loader-native" DEPENDS_append_mx7 = " mtd-utils-native imx-loader-native" @@ -178,7 +179,8 @@ fakeroot imagedeploy_arm() { rm -f ${IMAGE_DIR}/rootfs.lock #create tarball - tar -cjf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}_${TDX_VER_EXT}.tar.bz2 ${IMAGE_DIR} + # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs + tar --use-compress-prog=pbzip2 -cf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}_${TDX_VER_EXT}.tar.bz2 ${IMAGE_DIR} || true } fakeroot do_imagedeploy() { -- cgit v1.2.3