summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2017-09-10 10:58:49 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-10-03 18:24:53 +0200
commit5cc6a4d6440f2fac61cbabc0ab64766f0c06a536 (patch)
treedf548a24c50bc9b0136614bd8e5c9c2c7b594e9e
parent1ea9c2b5c08dd024fd09d78f6a266b90d52a03e0 (diff)
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 <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--recipes-images/images/tdx-image-fstype.inc4
1 files changed, 3 insertions, 1 deletions
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() {