From: Richard Purdie Date: Fri, 1 Aug 2025 10:55:13 +0000 (+0100) Subject: bitbake/conf: Default to zstd compressed image output X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=HEAD;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake/conf: Default to zstd compressed image output Switch our default qemu images to use .zst compressed images by default since this is the output format we release during the release process and is the one that users would prefer to download. This makes the release process use the actual generated output from the system and avoids post processing. Signed-off-by: Richard Purdie --- diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb index d7785cee2e1..f6cf0a47c89 100644 --- a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb +++ b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb @@ -3,7 +3,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 MCMACHINE:virtclass-mcextend-musl = "qemux86-64" MCMACHINE:virtclass-mcextend-tiny = "qemux86" -MCIMGTYPE:virtclass-mcextend-musl = "ext4" +MCIMGTYPE:virtclass-mcextend-musl = "ext4.zst" MCIMGTYPE:virtclass-mcextend-tiny = "cpio.gz" MC_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/images/${MCMACHINE}" diff --git a/meta/classes-recipe/qemuboot.bbclass b/meta/classes-recipe/qemuboot.bbclass index 0f80c60ab58..69cd12ec545 100644 --- a/meta/classes-recipe/qemuboot.bbclass +++ b/meta/classes-recipe/qemuboot.bbclass @@ -97,7 +97,7 @@ QB_MEM ?= "-m 256" QB_SMP ?= "" QB_SERIAL_OPT ?= "-serial mon:stdio -serial null" QB_DEFAULT_KERNEL ?= "${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin", "${KERNEL_IMAGETYPE}", d)}" -QB_DEFAULT_FSTYPE ?= "ext4" +QB_DEFAULT_FSTYPE ?= "ext4.zst" QB_RNG ?= "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0" QB_OPT_APPEND ?= "" QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index fb26e72669c..fad397776e0 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -839,8 +839,8 @@ include conf/bblock.conf DL_DIR ?= "${TOPDIR}/downloads" SSTATE_DIR ?= "${TOPDIR}/sstate-cache" -IMAGE_FSTYPES ?= "tar.gz" -IMAGE_FSTYPES_DEBUGFS ?= "tar.gz" +IMAGE_FSTYPES ?= "tar.zst" +IMAGE_FSTYPES_DEBUGFS ?= "tar.zst" INITRAMFS_FSTYPES ?= "cpio.gz" # The maximum size in Kbytes for the generated initramfs image size. diff --git a/meta/conf/machine/include/qemu.inc b/meta/conf/machine/include/qemu.inc index c143e37f710..79016ad9cce 100644 --- a/meta/conf/machine/include/qemu.inc +++ b/meta/conf/machine/include/qemu.inc @@ -8,7 +8,7 @@ MACHINE_FEATURES = "alsa bluetooth usbgadget screen vfat" MACHINEOVERRIDES =. "qemuall:" -IMAGE_FSTYPES += "tar.bz2 ext4" +IMAGE_FSTYPES += "tar.zst ext4.zst" # Don't include kernels in standard images RDEPENDS:${KERNEL_PACKAGE_NAME}-base = "" diff --git a/meta/conf/machine/include/riscv/qemuriscv.inc b/meta/conf/machine/include/riscv/qemuriscv.inc index 65cbfd66ee4..35961272022 100644 --- a/meta/conf/machine/include/riscv/qemuriscv.inc +++ b/meta/conf/machine/include/riscv/qemuriscv.inc @@ -11,7 +11,7 @@ KEEPUIMAGE = "no" SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0" -IMAGE_FSTYPES += "ext4 wic.qcow2" +IMAGE_FSTYPES += "ext4.zst wic.qcow2" WKS_FILE ?= "qemuriscv.wks" diff --git a/meta/conf/machine/include/x86/x86-base.inc b/meta/conf/machine/include/x86/x86-base.inc index fc6c39148db..fc8200d8f09 100644 --- a/meta/conf/machine/include/x86/x86-base.inc +++ b/meta/conf/machine/include/x86/x86-base.inc @@ -8,7 +8,7 @@ MACHINE_FEATURES += "screen keyboard pci usbhost ext2 ext3 x86 \ acpi serial usbgadget alsa" -IMAGE_FSTYPES ?= "wic" +IMAGE_FSTYPES ?= "wic.zst" KERNEL_IMAGETYPE ?= "bzImage" diff --git a/meta/lib/oeqa/selftest/cases/gdbserver.py b/meta/lib/oeqa/selftest/cases/gdbserver.py index b6b7c5c4733..1c713331900 100644 --- a/meta/lib/oeqa/selftest/cases/gdbserver.py +++ b/meta/lib/oeqa/selftest/cases/gdbserver.py @@ -19,6 +19,7 @@ class GdbServerTest(OESelftestTestCase): features = """ IMAGE_GEN_DEBUGFS = "1" +IMAGE_FSTYPES += "tar.bz2" IMAGE_FSTYPES_DEBUGFS = "tar.bz2" CORE_IMAGE_EXTRA_INSTALL = "gdbserver" """ diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py index 74d47a6db1b..7ed89e80de8 100644 --- a/meta/lib/oeqa/selftest/cases/runqemu.py +++ b/meta/lib/oeqa/selftest/cases/runqemu.py @@ -195,6 +195,12 @@ class QemuTest(OESelftestTestCase): cls.cmd_common = "runqemu nographic snapshot" cls.qemuboot_conf = "%s.qemuboot.conf" % (cls.image_link_name) cls.qemuboot_conf = os.path.join(cls.deploy_dir_image, cls.qemuboot_conf) + + cls.write_config(cls, +""" +IMAGE_FSTYPES += "tar.bz2" +""") + bitbake(cls.recipe) def _start_qemu_shutdown_check_if_shutdown_succeeded(self, qemu, timeout):