From patchwork Thu Jul 31 10:23:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 67821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABAEAC87FD3 for ; Thu, 31 Jul 2025 10:23:19 +0000 (UTC) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web11.58639.1753957393360511647 for ; Thu, 31 Jul 2025 03:23:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=ZF2j7tNt; spf=pass (domain: smile.fr, ip: 209.85.128.65, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f65.google.com with SMTP id 5b1f17b1804b1-45555e3317aso3302635e9.3 for ; Thu, 31 Jul 2025 03:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1753957391; x=1754562191; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ocBHOlOu/xMMMJiOpYeIMVLPGLzAfwmp0e76wraa93w=; b=ZF2j7tNtcKQJX+Fuvnbtdn8mCA7h4fy3ACin2AL3v9y6pbbT/yRL8wEWhK6TwcU1Xn XB5soI0ttzhCVLwdz1TujYBcd9R/5DiKwZQrPCnT0xnVz97W/JBANbx+WO0F5ClIamvn kwKwbTMm3owYnOpSbbOpmXdtJPDJZwvj2gIGI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753957391; x=1754562191; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ocBHOlOu/xMMMJiOpYeIMVLPGLzAfwmp0e76wraa93w=; b=jf3qNEOa2iQ8l0CbwX4EIWnOlWO9+glQBIIlR4gNe7Xk81MLqAddr5c/RcSUUeBdvF 96atPawfl/ldXNDguXfgFb5qJ9vM1zLKTNoYEFJ2cZg5kQT9XRTQY9XXuLOJJVbW1a5z k6+oqHCMztSCrgqf9XawPmzMPIeNmtrAFk5qTIIhlzn+sptBgjJTNIGiyFXc8MAfP8aV eCRjDYL3mZZyrSFtv0Gmg1pr2Ut9Ry02tCb5XdMolRb5ApHiXvJcOW/0Q6hEtPGFj0zg NFqH0OeSqjewnbl3yJFDt5pT4OEBaLFtjm21B4Xv30yBcXgV57aQ4fxnW6VKyv4BGsMM gWng== X-Gm-Message-State: AOJu0YwuaDUwaicKhrf2Wtymq+1WuNIWKGEBQjzgLDJkQwPqWWQbOPS8 kJ6oj1nune+Wlnue9QrK+KGFIQ/u4aXv5mtFFxbf/Deau9zSygQ2+PjIG3SSG8WnJutDt+ygwHr SN9a3oGCUBGLt X-Gm-Gg: ASbGncvFDICsGyhqoCn4yJzT5P7ltw+VlIa0xlcIBmvo0kJqnT5RVtkA5/fe460kGcm yMphfTlJOUZhR1rlSOUkK2ZzdXrOOH+trXQwedyWtVO0Rbt3mDALDopTmdAjIvSO+VUenjSWo7H M6kgKkwqZk978vX8VOs0xSZvGNr6rkgCDUXIPmsROZEf23ZIPQxidi5CstTh/EWrVlAmJ3GHmZ9 eJuoTjhERzeuwLYKiWW+RYZWHFOEGW/Oh6q/oOWnTIOCyQQenM4R5vZaIDZIGDsTDxh9fmwV6YS mdPoPcp3Hrr3ohLB6E7KVtJcQhycZjjDon+sCRorkg1ddjGKtP+cVZ1SlIQ/f3np8O3DerJOjZk 0GBcqI1qS9Low5M3KuOKcF7KQf3jUN0S1/TEB8UzvZwUyQ7vabqOUlDEP0lpebUlkARtPFfDijh NuZfvsb/LIHpkWkDdkb5n+TInLKpVZVuIMnBRnmUaYB+MQoA== X-Google-Smtp-Source: AGHT+IGy6YPGN0KL0eZwh1w8DqTplXwncRZlUEFbHXgiRl9p8bWNvyde58EiRNJt4uvrAAlM1q6gRw== X-Received: by 2002:a05:600c:8b6e:b0:456:27a4:50ad with SMTP id 5b1f17b1804b1-45892be4bf9mr51174785e9.33.1753957391376; Thu, 31 Jul 2025 03:23:11 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com. [176.157.204.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4589536abb1sm65169445e9.4.2025.07.31.03.23.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Jul 2025 03:23:11 -0700 (PDT) From: Yoann Congal To: openembedded-core@lists.openembedded.org Cc: Yoann Congal , Lamine REHAHLIA Subject: [PATCH v4 1/4] runqemu: Add support for running compressed .zst rootfs images Date: Thu, 31 Jul 2025 12:23:00 +0200 Message-Id: <20250731102303.3513121-1-yoann.congal@smile.fr> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 31 Jul 2025 10:23:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221185 From: Lamine REHAHLIA Enhance runqemu to detect and decompress .zst-compressed rootfs images (e.g. ext4.zst, wic.zst) automatically. If a decompressed image already exists in the original directory, it will be reused to avoid overwriting build artifacts. Otherwise, the image is decompressed and removed after the QEMU session ends. This allows runqemu to be used seamlessly with compressed image formats generated by the build system or during releases. Note: support for .zst images is only available when snapshot mode is enabled IMPORTANT: This patch assumes that the original directory of the .zst-compressed image is writable. If, for some reason, the path passed from CI or another system to the script is read-only, the decompression step will fail when trying to write the uncompressed image to the same directory. Signed-off-by: Lamine REHAHLIA Signed-off-by: Yoann Congal --- v4: moved the feature to support calling "runqemu " and support usign snapshot after the image. Also improved the error message when a compressed image is used without snapshot mode. --- scripts/runqemu | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/scripts/runqemu b/scripts/runqemu index 3d77046972..c668906bdd 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -197,7 +197,7 @@ class BaseConfig(object): self.portlocks = {} self.bitbake_e = '' self.snapshot = False - self.wictypes = ('wic', 'wic.vmdk', 'wic.qcow2', 'wic.vdi', "wic.vhd", "wic.vhdx") + self.wictypes = ('wic.zst', 'wic', 'wic.vmdk', 'wic.qcow2', 'wic.vdi', "wic.vhd", "wic.vhdx") self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs', 'cpio.gz', 'cpio', 'ramfs', 'tar.bz2', 'tar.gz', 'squashfs', 'squashfs-xz', 'squashfs-lzo', @@ -418,6 +418,48 @@ class BaseConfig(object): else: raise RunQemuError("Unknown path arg %s" % p) + def uncompress_rootfs(self): + """Decompress ZST rootfs image if needed""" + if not self.rootfs or not self.fstype.endswith('.zst'): + return + + # Ensure snapshot mode is active before allowing decompression. + if not self.snapshot: + raise RunQemuError(".zst images are only supported with snapshot mode. " \ + "You can either use the \"snapshot\" option or use an uncompressed image.") + + # Get the real path to the image to avoid issues when a symbolic link is passed. + # This ensures we always operate on the actual file. + image_path = os.path.realpath(self.rootfs) + # Extract target filename by removing .zst + image_dir = os.path.dirname(image_path) + uncompressed_name = os.path.basename(image_path).replace(".zst", "") + uncompressed_path = os.path.join(image_dir, uncompressed_name) + + # If the decompressed image already exists (e.g., in the deploy directory), + # we use it directly to avoid overwriting artifacts generated by the build system. + # This prevents redundant decompression and preserves build outputs. + if os.path.exists(uncompressed_path): + logger.warning(f"Found existing decompressed image: {uncompressed_path}, Using it directly.") + else: + logger.info(f"Decompressing {self.rootfs} to {uncompressed_path}") + # Ensure the 'zstd' tool is installed before attempting to decompress. + if not shutil.which('zstd'): + raise RunQemuError(f"'zstd' is required to decompress {self.rootfs} but was not found in PATH") + try: + with open(uncompressed_path, 'wb') as out_file: + subprocess.check_call(['zstd', '-d', '-c', image_path], stdout=out_file) + except subprocess.CalledProcessError as e: + self.cleanup_files.append(uncompressed_path) + raise RunQemuError(f"Failed to decompress {self.rootfs}: {e}") + + # Mark for deletion at the end + self.cleanup_files.append(uncompressed_path) + + # Use the decompressed image as the rootfs + self.rootfs = uncompressed_path + self.fstype = self.fstype.removesuffix(".zst") + def check_arg_machine(self, arg): """Check whether it is a machine""" if self.get('MACHINE') == arg: @@ -1762,6 +1804,7 @@ def main(): config.check_args() config.read_qemuboot() config.check_and_set() + config.uncompress_rootfs() # Check whether the combos is valid or not config.validate_combos() config.print_config() From patchwork Thu Jul 31 10:23:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 67820 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA364C87FCC for ; Thu, 31 Jul 2025 10:23:19 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web11.58640.1753957393874513409 for ; Thu, 31 Jul 2025 03:23:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=yphn5ttg; spf=pass (domain: smile.fr, ip: 209.85.128.68, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f68.google.com with SMTP id 5b1f17b1804b1-4589b3e3820so7136535e9.3 for ; Thu, 31 Jul 2025 03:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1753957392; x=1754562192; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2L4vWGSA29NlOV7m5A9foDo+jjLHx7PlDN4jNYyt4aU=; b=yphn5ttgyAC/U9dfGc3eyQqMzwo3LESEAGQnbG9Yl5BJgRvfP0Jxs9G8kW01OCP7Ul tUA+oiyEBmXI7JX2SlslLS/kenQHxlSz/T82i+5N5iRKneQnlNi7UiCKYkoGbOmAu+Gp OwgrirQW8z4+LFaq2eF+NT0C4kq0Jbc6OEeKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753957392; x=1754562192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2L4vWGSA29NlOV7m5A9foDo+jjLHx7PlDN4jNYyt4aU=; b=mn8qmy9ezuw+h1X1Q0rR7q0fXGstR2Qbn5BK60FSTSgCyOJiAhRtQnnqiA9fwooem5 JuQXigjtU+LNMl9Bk8N2rKv5cBH4DCIv8qhohxjN6hAbrGGKoPZTedIwC+c/1LNncSiZ xEdTPYz5seBMqjZMvmp/5rSEoPHTobLzsvj9zzKdCcKZpI9u/4kddr9S4VzD0nUL5bHt cFphUv0HUkS2OqwrZLwpshdJ6j7xVipCqamcyBILtzdZgZ8Af9LOT+kkf1sBgimYR+4E Sy9Ld8JpZtVqU4Tw0tXvdlICcKhoX9CEZ9D7VbEpW4UHupe+V9j2DJZoNxLrKmjNOcwz 9BGg== X-Gm-Message-State: AOJu0YwhlYhgAUXJ5dufjfOq9pbPp5h0Bp5gqHFhA9lsUJeiHjy2nBa0 ykBP/aWena5hJ928h0ktaWPrAxMel86mE7PbsO2TmeTc8c5tYaQgO3QA+79i7jGDnCLZkV5n0fm R3prjU+q2tmeC X-Gm-Gg: ASbGnct0demBpvEem9TWmVuFrIXOQ855DNCEtjLXoQPyVjWdlxUKZNdwqemTmCktfWZ BiWEcVc6z26gAtVyJHewXpbwN2+rY1UdgalzUeUpbSNBWw1gEI0f6R/2zJumNUWo8+gAAhAdgLZ UmcB3gkeRa5aY4xq3eipFwaS33Z3iZQDGhDBC4DsJA7RrG0OlaAHhItohzjLWKc+qXl8Ek3IJ8A EFA3pYhezOTddpYJLTyxGezvgZ8gy7/eBXEVLMkzm2qL7ztJrklpi6AHHCRPnQHAXS3LS8fBO6X ZR2m2IGeW1vGxnkeT/X32A6J53iqqn2eE6WQxMOEJ8JT5ZyQ2EZkM8VTzLiRQlRJlwIC6sXvxOg hkTQiZqKpNfbnTuVygc5YRAtf9ftQTotgm2iC1lJWZSGreNftmWJkeopsdhnqtkPk1YPlOeMjVe 3QPWLsKrH35uFYukwYB9vwaggJI+O17Qwoync= X-Google-Smtp-Source: AGHT+IFjLWyRQlSC4I14yjLxiut7Zwl9LuIMi/ds0rc1J7875e0XqCu296721+v6l80LtQs3ENCWxA== X-Received: by 2002:a05:600c:8b71:b0:456:161c:3d61 with SMTP id 5b1f17b1804b1-458a4f945camr10418235e9.22.1753957391959; Thu, 31 Jul 2025 03:23:11 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com. [176.157.204.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4589536abb1sm65169445e9.4.2025.07.31.03.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Jul 2025 03:23:11 -0700 (PDT) From: Yoann Congal To: openembedded-core@lists.openembedded.org Cc: Yoann Congal Subject: [PATCH v4 2/4] selftest: runqemu: add tests for booting zst compressed image Date: Thu, 31 Jul 2025 12:23:01 +0200 Message-Id: <20250731102303.3513121-2-yoann.congal@smile.fr> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250731102303.3513121-1-yoann.congal@smile.fr> References: <20250731102303.3513121-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 31 Jul 2025 10:23:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221186 From: Yoann Congal Add a simple tests booting a compressed image given to runqemu as path and as image recipe name. Signed-off-by: Yoann Congal --- meta/lib/oeqa/selftest/cases/runqemu.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py index f01e1eec66..46ca0b4480 100644 --- a/meta/lib/oeqa/selftest/cases/runqemu.py +++ b/meta/lib/oeqa/selftest/cases/runqemu.py @@ -31,7 +31,7 @@ class RunqemuTests(OESelftestTestCase): if self.td["HOST_ARCH"] in ('i586', 'i686', 'x86_64'): self.fstypes += " iso hddimg" if self.machine == "qemux86-64": - self.fstypes += " wic.vmdk wic.qcow2 wic.vdi" + self.fstypes += " wic.vmdk wic.qcow2 wic.vdi wic.zst" self.cmd_common = "runqemu nographic" kvm = oe.types.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), self.td["TARGET_ARCH"]) @@ -152,6 +152,23 @@ SYSLINUX_TIMEOUT = "10" with open(qemu.qemurunnerlog) as f: self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) + def test_boot_compressed_wic_by_path(self): + """Test runqemu /path/to/rootfs.wic.zst""" + rootfs = "%s.wic.zst" % (self.image_link_name) + rootfs = os.path.join(self.deploy_dir_image, rootfs) + if not os.path.exists(rootfs): + self.skipTest("%s not found" % rootfs) + cmd = "%s %s snapshot" % (self.cmd_common, rootfs) + with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: + with open(qemu.qemurunnerlog) as f: + self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) + + def test_boot_compressed_wic_by_recipe(self): + """Test runqemu recipe-image wic.zst""" + cmd = "%s %s snapshot wic.zst" % (self.cmd_common, self.recipe) + with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: + with open(qemu.qemurunnerlog) as f: + self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) # This test was designed as a separate class to test that shutdown # command will shutdown qemu as expected on each qemu architecture From patchwork Thu Jul 31 10:23:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 67818 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9D99C83F17 for ; Thu, 31 Jul 2025 10:23:19 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web11.58641.1753957394379702419 for ; Thu, 31 Jul 2025 03:23:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=O78a9yG7; spf=pass (domain: smile.fr, ip: 209.85.128.49, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4561a4a8bf2so7594495e9.1 for ; Thu, 31 Jul 2025 03:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1753957392; x=1754562192; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/y2i9yzi/p3tGLVer0kwwFtrV/7rZI5g3L7aJzSNxjU=; b=O78a9yG7+6UCX1nkZfQ4KXcmdeCYGBwEPx1HyG8slAB8bg7BUDSKvycZq1SM8Rkg2r ZMvPZhtmMoNZHh+s1Jd+GxIm0+u63xsAJ/HC0GwQLDzFjH4U6Pzm1RDYMewsBzpXxsk9 WRLJiw/VLQtWkRu8h0+xM9vtPcmEf0GhXlALU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753957392; x=1754562192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/y2i9yzi/p3tGLVer0kwwFtrV/7rZI5g3L7aJzSNxjU=; b=oSu5LY5V2STHTDefydmts/krcGv8nEOtdHqJNxMJcsna7koCsUdCDkHlLU58I9pv54 jhenI0Du0LmIcUHzCwhLMT2xZ70BVpI2Zm429yh4vujAC9Cx3085mJvAFehT3BFJbKJu QyrPMTjSv/GpAGTOP77u9JPmR7fVNI/3vLeVhG6WYVaSIVg+Mh7foXiRmgjhUI20h8v4 6SDBLD5MnaI7X9i5HTCamYR7l7WEVNYggbsMwejG5iQB8z3A0DXb9LZP1bbFJ93CWJ7K BFCRhPkFqt+Oi5//uYht+g3FMNHpJhHHRRTZzvsVUHXUKEzlxn0eF3u9cSH9eVVnrurz sC2w== X-Gm-Message-State: AOJu0YwwjWPA/EcVz09rna9rIamt0b2wy26JxndtboOFFHSggde/m4NJ 6Aj2iKmTomOp3DbjQyHHEHe5B0+WQ3ipEuonUr+qo6Q3FIhiAgqVDzptMri4J8HpXThMN19I/KE JVHNkcdK9bQ== X-Gm-Gg: ASbGnctkJeFzFx26BtnMj5o2ayt9qyMTMdJKGAYqIS2vQlNMRXYk2X5YaV998/doOQp Hk0uIeokyvZrUmvKlo/ulKvIISZ3kii087QYnwHCBKWHRGAaFYLNjpnDOzsXrG93SeLXK041aOb 3oMJzKBp+i4gynvWlWx1srQYOc5JoYniGuHWSWoXqAj8QZ5QYZN32VDtN3TeW/PVrUoLwStodKP iSBcn3Usy20N4tL4zzB7UoNox9BW/5i0HE+evzC7liNpCg6LxofEeGE5Fxb2XZfb5G57qYVv3h5 AEBhekD0ykuKoz/g66f+Fm/9I3A6xsfJR3aMnzScrD/sepEz1m/mshyIY6Ud4TBh4k2cpZjVMiq VmfizMyDZUlVdLlqtpbAOqcIqFIfDijVAsycuDjMyBuA3Wt6RyCf3QY8LwBeSGNMmWgptDKcDcs PKaNEz4KhyMRU27ZDTdNxUnZrg4WnSILYV9EI= X-Google-Smtp-Source: AGHT+IGCRIim8YdbteqlW2HlW9sfTDsQCzIf6LNoTvWBA4iNW8aFqZ+komtTkNQc1sQf3wLXDMLA+A== X-Received: by 2002:a05:600c:1da7:b0:456:1a69:94fb with SMTP id 5b1f17b1804b1-45892b9da8cmr67198125e9.13.1753957392499; Thu, 31 Jul 2025 03:23:12 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com. [176.157.204.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4589536abb1sm65169445e9.4.2025.07.31.03.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Jul 2025 03:23:12 -0700 (PDT) From: Yoann Congal To: openembedded-core@lists.openembedded.org Cc: Yoann Congal Subject: [PATCH v4 3/4] runqemu: accept vmtypes and wictypes for rootfs paths extensions Date: Thu, 31 Jul 2025 12:23:02 +0200 Message-Id: <20250731102303.3513121-3-yoann.congal@smile.fr> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250731102303.3513121-1-yoann.congal@smile.fr> References: <20250731102303.3513121-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 31 Jul 2025 10:23:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221187 From: Yoann Congal When using a .wic.zst image, its fstype is detected by default as ".zst" which prevent booting correctly. Fix this by adding wictypes (and vmtypes while at it) to the list of known fstypes. After this fix, the initial fstype is correctly ".wic.zst". Signed-off-by: Yoann Congal --- scripts/runqemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/runqemu b/scripts/runqemu index c668906bdd..da53265219 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -380,7 +380,7 @@ class BaseConfig(object): # Check filename against self.fstypes can handle .cpio.gz, # otherwise, its type would be "gz", which is incorrect. fst = "" - for t in self.fstypes: + for t in self.fstypes + self.vmtypes + self.wictypes: if p.endswith(t): fst = t break From patchwork Thu Jul 31 10:23:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 67819 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAD16C87FD2 for ; Thu, 31 Jul 2025 10:23:19 +0000 (UTC) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.web10.58712.1753957394866445259 for ; Thu, 31 Jul 2025 03:23:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=sp88wA1L; spf=pass (domain: smile.fr, ip: 209.85.128.42, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4560cdf235cso3714385e9.1 for ; Thu, 31 Jul 2025 03:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1753957393; x=1754562193; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ldfEWDMpmygerolvgYSpyiaBGKpbXlx7Jcs1SFsC5Ho=; b=sp88wA1Lf58Np+bp+xWP3ITp0w/0YHdY/bIoCrglY+ytKEM30w1TPNdd7l/a2D+l6d dLqITV7rWxfhmOx5EehsksBzu9nWx0tAquY1q8g5Fa/hjvsNDEfDsujV4aw8QNCLFpG3 YPPSUXEP0ndIvnltiDbezEzV8HvOwCJi0eGfo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753957393; x=1754562193; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ldfEWDMpmygerolvgYSpyiaBGKpbXlx7Jcs1SFsC5Ho=; b=K5jW2jmOBGJ6FNPUD3b2PazCo/TQ7MLmN2M2vcGxj5bMSo9ytdl0OVSCVW3A+BACL/ MJaQ2DLfy48BJRVpbpwbOqKAYtpIZOwQP3RBbOy0mSaeNhAC1s8VgrOua0/81Opw8BBs AxqnEqlT1/Zek7++cAt99w5OHvYIRakxRvJoGk0tktZr5fs/sMiAXrbYEnMedSvmU2p+ PmQTfhC1sxik6ZDTcVbVcpaMGZSt+OzYNHTRwpIHxzaxMifIKj5C7Jvgc5yG0Gkaa8lC i9E/cmZ20aC92d+bY428IJAB05QPbXmRsNcZoSn8LSDqDysB8DKQfvqUdo4S6bMRwHqs e1Jw== X-Gm-Message-State: AOJu0Yyd2sH09s++limirqBxeh8io2gW+IqAvttyqKsC2d+mEvb/tfx8 RM4vmwkKa1aDGcIUJdQigazA9Vvu4i4nbTFpEVw9iE4XKCkCfERWqpFWorwPHixLPlh9DpiYJIL 9iywxtiozzQ== X-Gm-Gg: ASbGncvu6DIe1e6gX4iHFNz1QJy3+h9DKI4m44BsRkRf6wf9pl8/EovA60qL3bSpZOu Svc6CBVZNhdEpTo5YEaYx7GJlf2rKA5gx/LVpynFEbxdrPwDAxZWEDbk6WAf4/uTy+QMENBG9Yj BFYJJwi5CwVYprkpzi6r8XR/GxgLpkLhqMHj2lplZrF7yDM0h8zQda40Jo6T0+rGngtQoyF1DTn qxINcvOa8XQ1i94u68LC5EWa4NPnZKhRlNzw+ODs8UJwjFT11p6aMJOny/1oqVPzYLy8EpzEQXC Tu0fpEjRI6vjnFSkmWMmKqXqMQZybo0Do0bPQ3b2gmmHbhzIWvNDKsOaNTCESgIS6aoatVeTzcO 8LBVSzJOqGTDFv/XZEA0g9Qo2/TKBn4dqxAlkLCs09mlK/4rtOjA2rm17ENtPQyN+kF8YUIDInO Ggiw4M/c33T/PZZdVI3f07MSIFceluGCWoA+8= X-Google-Smtp-Source: AGHT+IF0x0VVgS+Z3OiEOxa5RkMgCKFcam4qLYqutmiMOnUsIC0gK3olVWclJm/GOnodsyaBhOr4Jg== X-Received: by 2002:a05:600c:4fd1:b0:456:29da:bb25 with SMTP id 5b1f17b1804b1-45892bc6824mr54958625e9.19.1753957393011; Thu, 31 Jul 2025 03:23:13 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com. [176.157.204.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4589536abb1sm65169445e9.4.2025.07.31.03.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Jul 2025 03:23:12 -0700 (PDT) From: Yoann Congal To: openembedded-core@lists.openembedded.org Cc: Yoann Congal Subject: [PATCH v4 4/4] runqemu: print snapshot mode state in console Date: Thu, 31 Jul 2025 12:23:03 +0200 Message-Id: <20250731102303.3513121-4-yoann.congal@smile.fr> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250731102303.3513121-1-yoann.congal@smile.fr> References: <20250731102303.3513121-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 31 Jul 2025 10:23:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221188 From: Yoann Congal With snapshot enabled, no change on rootfs will be saved after qemu shutdown. Since this is not what a user might expect, print the snapshot mode state and its consequence in console at runqemu start. Signed-off-by: Yoann Congal --- v4: reformat message handling --- scripts/runqemu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/runqemu b/scripts/runqemu index da53265219..a57fe794dc 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1053,6 +1053,9 @@ to your build configuration. logoutput.append('NFS_DIR: [%s]' % self.rootfs) else: logoutput.append('ROOTFS: [%s]' % self.rootfs) + logoutput.append('SNAPSHOT: [%s]' % + "Enabled. Changes on rootfs won't be kept after QEMU shutdown." if self.snapshot + else "Disabled. Changes on rootfs will be kept after QEMU shutdown.") if self.ovmf_bios: logoutput.append('OVMF: %s' % self.ovmf_bios) if (self.ovmf_secboot_pkkek1):