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 <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2025-01-20 18:06:21 +01:00
parent 3842b49390
commit 767a3a4929
14 changed files with 32 additions and 26 deletions

View File

@ -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 = " \

View File

@ -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 = " \

View File

@ -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 = " \

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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 = " \

View File

@ -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 = " \

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -78,7 +78,7 @@ MACHINE_EXTRA_RDEPENDS += " \
"
# Image FS types
IMAGE_FSTYPES:remove = "ext4 tar.xz"
IMAGE_FSTYPES:remove = "ext4"
# =========================================================================
# Signing configuration