From 767a3a4929a56d6632c48f94c7a00b018de9f613 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Mon, 20 Jan 2025 18:06:21 +0100 Subject: [PATCH] Replace bz2 rootfs tarball compression with xz compression We tested all tarball compression formats supported by poky, and although bz2 has faster (de)compression time, xz is better in terms of compression ratio: for all of the rootfs tarballs generated for our currently supported images/platforms (15 at the moment), the xz format saves an average of 30 MiB per tarball compared to bz2, totalling up to 450 MiB. No extra dependencies are pulled in, since xz-native is already being pulled in for all of our image builds, so the only drawback to this change is the increased compression time (+7.34s on average per tarball). https://onedigi.atlassian.net/browse/DEL-9459 Signed-off-by: Gabriel Valcazar --- meta-digi-arm/conf/machine/ccimx6qpsbc.conf | 4 ++-- meta-digi-arm/conf/machine/ccimx6sbc.conf | 4 ++-- meta-digi-arm/conf/machine/ccimx6ulsbc.conf | 4 ++-- meta-digi-arm/conf/machine/ccimx6ulstarter.conf | 4 ++-- meta-digi-arm/conf/machine/ccimx8mm-dvk.conf | 4 ++-- meta-digi-arm/conf/machine/ccimx8mn-dvk.conf | 4 ++-- meta-digi-arm/conf/machine/ccimx8x-sbc-express.conf | 4 ++-- meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf | 4 ++-- meta-digi-arm/conf/machine/ccmp13-dvk.conf | 6 ++++-- meta-digi-arm/conf/machine/ccmp15-dvk.conf | 6 ++++-- meta-digi-arm/conf/machine/ccmp25-dvk.conf | 6 ++++-- meta-digi-arm/conf/machine/include/ccimx9.inc | 4 ++-- meta-digi-arm/conf/machine/include/ccmp1.inc | 2 +- meta-digi-arm/conf/machine/include/ccmp2.inc | 2 +- 14 files changed, 32 insertions(+), 26 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccimx6qpsbc.conf b/meta-digi-arm/conf/machine/ccimx6qpsbc.conf index d60abb183..5651ae2b8 100644 --- a/meta-digi-arm/conf/machine/ccimx6qpsbc.conf +++ b/meta-digi-arm/conf/machine/ccimx6qpsbc.conf @@ -45,8 +45,8 @@ XBEE_TTY ?= "ttymxc4" # Image FS types IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "boot.vfat tar.bz2 recovery.vfat squashfs", \ - "boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}' + "boot.vfat tar.xz recovery.vfat squashfs", \ + "boot.vfat ext4.gz sdcard.gz tar.xz recovery.vfat", d)}' # Boot artifacts to be copied from the deploy dir to the installer ZIP BOOTABLE_ARTIFACTS = " \ diff --git a/meta-digi-arm/conf/machine/ccimx6sbc.conf b/meta-digi-arm/conf/machine/ccimx6sbc.conf index 047e49770..7ff307e24 100644 --- a/meta-digi-arm/conf/machine/ccimx6sbc.conf +++ b/meta-digi-arm/conf/machine/ccimx6sbc.conf @@ -47,8 +47,8 @@ XBEE_TTY ?= "ttymxc4" # Image FS types IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "boot.vfat tar.bz2 recovery.vfat squashfs", \ - "boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}' + "boot.vfat tar.xz recovery.vfat squashfs", \ + "boot.vfat ext4.gz sdcard.gz tar.xz recovery.vfat", d)}' # Boot artifacts to be copied from the deploy dir to the installer ZIP BOOTABLE_ARTIFACTS = " \ diff --git a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf index 174d7f97a..be760aa50 100644 --- a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf +++ b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf @@ -32,8 +32,8 @@ XBEE_TTY ?= "ttymxc1" # Image FS types IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "tar.bz2 boot.ubifs recovery.ubifs squashfs", \ - "tar.bz2 ubifs boot.ubifs recovery.ubifs", d)}' + "tar.xz boot.ubifs recovery.ubifs squashfs", \ + "tar.xz ubifs boot.ubifs recovery.ubifs", d)}' # Boot artifacts to be copied from the deploy dir to the installer ZIP BOOTABLE_ARTIFACTS = " \ diff --git a/meta-digi-arm/conf/machine/ccimx6ulstarter.conf b/meta-digi-arm/conf/machine/ccimx6ulstarter.conf index f266fd04b..3dbdb5210 100644 --- a/meta-digi-arm/conf/machine/ccimx6ulstarter.conf +++ b/meta-digi-arm/conf/machine/ccimx6ulstarter.conf @@ -28,8 +28,8 @@ BT_TTY ?= "ttymxc0" # Image FS types IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "tar.bz2 boot.ubifs recovery.ubifs squashfs", \ - "tar.bz2 ubifs boot.ubifs recovery.ubifs", d)}' + "tar.xz boot.ubifs recovery.ubifs squashfs", \ + "tar.xz ubifs boot.ubifs recovery.ubifs", d)}' # Default image for install scripts DEFAULT_IMAGE_NAME ?= "core-image-base" diff --git a/meta-digi-arm/conf/machine/ccimx8mm-dvk.conf b/meta-digi-arm/conf/machine/ccimx8mm-dvk.conf index 33d6cbff0..c47412636 100644 --- a/meta-digi-arm/conf/machine/ccimx8mm-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx8mm-dvk.conf @@ -50,8 +50,8 @@ XBEE_TTY ?= "ttymxc3" # Image FS types IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "boot.vfat tar.bz2 recovery.vfat squashfs", \ - "boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}' + "boot.vfat tar.xz recovery.vfat squashfs", \ + "boot.vfat ext4.gz sdcard.gz tar.xz recovery.vfat", d)}' # Boot artifacts to be copied from the deploy dir to the installer ZIP BOOTABLE_ARTIFACTS = "imx-boot-ccimx8mm-dvk.bin" diff --git a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf index 8cadc00e3..f2f6b6ae5 100644 --- a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf @@ -51,8 +51,8 @@ XBEE_TTY ?= "ttymxc3" # Image FS types IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "boot.vfat tar.bz2 recovery.vfat squashfs", \ - "boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}' + "boot.vfat tar.xz recovery.vfat squashfs", \ + "boot.vfat ext4.gz sdcard.gz tar.xz recovery.vfat", d)}' # Boot artifacts to be copied from the deploy dir to the installer ZIP BOOTABLE_ARTIFACTS = "imx-boot-ccimx8mn-dvk.bin" diff --git a/meta-digi-arm/conf/machine/ccimx8x-sbc-express.conf b/meta-digi-arm/conf/machine/ccimx8x-sbc-express.conf index 9298dc444..593ff1168 100644 --- a/meta-digi-arm/conf/machine/ccimx8x-sbc-express.conf +++ b/meta-digi-arm/conf/machine/ccimx8x-sbc-express.conf @@ -29,8 +29,8 @@ XBEE_TTY ?= "ttyLP0" # Image FS types IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "boot.vfat tar.bz2 recovery.vfat squashfs", \ - "boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}' + "boot.vfat tar.xz recovery.vfat squashfs", \ + "boot.vfat ext4.gz sdcard.gz tar.xz recovery.vfat", d)}' # Boot artifacts to be copied from the deploy dir to the installer ZIP BOOTABLE_ARTIFACTS = " \ diff --git a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf index 62e1001b6..43d6bae25 100644 --- a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf +++ b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf @@ -44,8 +44,8 @@ XBEE_TTY ?= "ttyMCA0" # Image FS types IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "boot.vfat tar.bz2 recovery.vfat squashfs", \ - "boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}' + "boot.vfat tar.xz recovery.vfat squashfs", \ + "boot.vfat ext4.gz sdcard.gz tar.xz recovery.vfat", d)}' # Boot artifacts to be copied from the deploy dir to the installer ZIP BOOTABLE_ARTIFACTS = " \ diff --git a/meta-digi-arm/conf/machine/ccmp13-dvk.conf b/meta-digi-arm/conf/machine/ccmp13-dvk.conf index d448cba91..5e14ebcee 100644 --- a/meta-digi-arm/conf/machine/ccmp13-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp13-dvk.conf @@ -69,9 +69,11 @@ MACHINE_EXTRA_RRECOMMENDS += " \ # Image # ========================================================================= # Image FS types +# tar.xz is omitted here because it's already being added via +# st-machine-common-stm32mp.inc in the meta-st-stm32mp layer IMAGE_FSTYPES += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "tar.bz2 boot.ubifs recovery.ubifs squashfs", \ - "tar.bz2 ubifs boot.ubifs recovery.ubifs", d)}' + "boot.ubifs recovery.ubifs squashfs", \ + "ubifs boot.ubifs recovery.ubifs", d)}' # Default image for install scripts DEFAULT_IMAGE_NAME ?= "core-image-base" diff --git a/meta-digi-arm/conf/machine/ccmp15-dvk.conf b/meta-digi-arm/conf/machine/ccmp15-dvk.conf index fec447b04..147a02344 100644 --- a/meta-digi-arm/conf/machine/ccmp15-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp15-dvk.conf @@ -80,9 +80,11 @@ MACHINE_EXTRA_RRECOMMENDS += " \ # Image # ========================================================================= # Image FS types +# tar.xz is omitted here because it's already being added via +# st-machine-common-stm32mp.inc in the meta-st-stm32mp layer IMAGE_FSTYPES += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "tar.bz2 boot.ubifs recovery.ubifs squashfs", \ - "tar.bz2 ubifs boot.ubifs recovery.ubifs", d)}' + "boot.ubifs recovery.ubifs squashfs", \ + "ubifs boot.ubifs recovery.ubifs", d)}' # Default image for install scripts DEFAULT_IMAGE_NAME ?= "dey-image-webkit" diff --git a/meta-digi-arm/conf/machine/ccmp25-dvk.conf b/meta-digi-arm/conf/machine/ccmp25-dvk.conf index 810542cb6..1aa5d8ad5 100644 --- a/meta-digi-arm/conf/machine/ccmp25-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp25-dvk.conf @@ -105,9 +105,11 @@ MACHINE_EXTRA_RRECOMMENDS += " \ # Image # ========================================================================= # Image FS types +# tar.xz is omitted here because it's already being added via +# st-machine-common-stm32mp.inc in the meta-st-stm32mp layer IMAGE_FSTYPES += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "boot.vfat recovery.vfat squashfs tar.bz2", \ - "boot.vfat recovery.vfat ext4.gz tar.bz2", d)}' + "boot.vfat recovery.vfat squashfs", \ + "boot.vfat recovery.vfat ext4.gz", d)}' # Default image for install scripts DEFAULT_IMAGE_NAME ?= "dey-image-webkit" diff --git a/meta-digi-arm/conf/machine/include/ccimx9.inc b/meta-digi-arm/conf/machine/include/ccimx9.inc index 4252fc9e3..bd36327df 100644 --- a/meta-digi-arm/conf/machine/include/ccimx9.inc +++ b/meta-digi-arm/conf/machine/include/ccimx9.inc @@ -95,8 +95,8 @@ XBEE_TTY ?= "ttyLP3" # Image FS types IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \ - "boot.vfat recovery.vfat squashfs tar.bz2", \ - "boot.vfat recovery.vfat ext4.gz tar.bz2 sdcard.gz", d)}' + "boot.vfat recovery.vfat squashfs tar.xz", \ + "boot.vfat recovery.vfat ext4.gz tar.xz sdcard.gz", d)}' # Default overlayfs_etc mount point and type OVERLAYFS_ETC_MOUNT_POINT ?= "/mnt/data" diff --git a/meta-digi-arm/conf/machine/include/ccmp1.inc b/meta-digi-arm/conf/machine/include/ccmp1.inc index 4e0b72369..e9c37fdc7 100644 --- a/meta-digi-arm/conf/machine/include/ccmp1.inc +++ b/meta-digi-arm/conf/machine/include/ccmp1.inc @@ -54,7 +54,7 @@ MACHINE_EXTRA_RDEPENDS += " \ MACHINE_EXTRA_RRECOMMENDS:remove = "kernel-imagebootfs" # Image FS types -IMAGE_FSTYPES:remove = "ext4 tar.xz" +IMAGE_FSTYPES:remove = "ext4" IMAGE_FSTYPES:append = " ${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', 'boot.vfat ext4.gz', '', d)}" # List of supported boot devices diff --git a/meta-digi-arm/conf/machine/include/ccmp2.inc b/meta-digi-arm/conf/machine/include/ccmp2.inc index 397493b1f..f45ab3c6e 100644 --- a/meta-digi-arm/conf/machine/include/ccmp2.inc +++ b/meta-digi-arm/conf/machine/include/ccmp2.inc @@ -78,7 +78,7 @@ MACHINE_EXTRA_RDEPENDS += " \ " # Image FS types -IMAGE_FSTYPES:remove = "ext4 tar.xz" +IMAGE_FSTYPES:remove = "ext4" # ========================================================================= # Signing configuration