From patchwork Fri Jul 24 09:01:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93428 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 2632BC531F9 for ; Fri, 24 Jul 2026 09:02:07 +0000 (UTC) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15477.1784883722304941228 for ; Fri, 24 Jul 2026 02:02:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=e+NxYmI6; spf=pass (domain: gmail.com, ip: 209.85.219.47, mailfrom: twoerner@gmail.com) Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-8f0d6853360so1863886d6.0 for ; Fri, 24 Jul 2026 02:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883721; x=1785488521; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=HBuDNL5YqR1BaQaS4POPPtlpNRoR7IMv1EH3pKhyMOI=; b=e+NxYmI676RE1S9bj7KW22OF44qoQuF53FFKfIo0EB8amo89tT4IMcbZH+01o6qfxO v1NpgnrJn+yPtZZvLJ5QG80P6kaiHSpGTgu5NUZ1M9NvUWfNbOMf7rx17R70+9QQWvoN 9WNf6ERkwwgaNza6Ql/02yMOuj/9uEL72ZRUYyLettZ5O/Z4kyXiteQggjaxpc5gNagF cNOflQf1Nh7EJHWoJ+qNIZUrE3muQNFsUJz7oOPkp+8bnDSVUMDWE90yakzFR9zVFeo4 HOFWgCVd6G/LQlSk4tyXM0h+AXW71o/RUa9qxGQruxUvk8uvM0S2cTo/5SUxvJ2lUTz6 WJ5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883721; x=1785488521; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=HBuDNL5YqR1BaQaS4POPPtlpNRoR7IMv1EH3pKhyMOI=; b=o8DYFPrmavuy3C96hyYxsmGe3zAHgp1giWR52BfGsVO2ANTMRnRGBJziyLTay9VYcM OJ+1NoOEpliZBvA92uC64VsKa8pLnefFEcZuFzWEoumzzNGQstOokZOXMiudM96cUx4+ BsDwXVf59YILZl8j+LG4Q9SLsKtNMpeQY0V1BMK+q+oMRV09MufirhysoMv3B1hQAEaZ pf2SEu+16YuuP5GFW05Vx3cwRyNVQULd1p4FbCLGHojGITjPzkbAgTcd7783bq1B/bZf vi/ktpT7v85jorGBWq/tTvhC09sg3N7pigya+djJkRa0Qij5TiFcsZtP0wS2X9B0pj9B w4lQ== X-Gm-Message-State: AOJu0YxB6dw7We0M9NIbgOFKP86M8dWINi/f2gBUeGqbtabDmQ9nOkSz 5eozh6CuiRc0QOTzM2X/03x0sH3ZJIK0sr2XOEOL/Wmel0I7HIeKU1celT+fRA== X-Gm-Gg: AR+sD10DD74+tGN+xtBtpZ7dRQhK3KJc/dCwrAkIBYi9mjSKURZ8moujlOU9TSj8nns C80I12A15RIUicSJKwlMbxcRFuVl7PGDeWGVztgxPvfcF1yjaomsokVZrmMek9HVyt78BmGW2Mo MXWuwJ04ALXEGhGFP0fVOX41ejz6/HIM8AAh6e7RXKmHnNG2IXl2cQPo2T7ZJzuegCgdGAJhHpJ ef+jfU9PombWlGsZECRs6X9Qseg+z9tdBpcWhxPkvs4VS0j1O7fwfshsUhpploBpmrhGbR8QZ14 rCe2oTP6ipzNhuGiAwZRFv9ufBH0yBOHRZZPAZlaANVYQxQKWXunKJj4GievMY6cR8LAY/W8tRM pqCINq7sugeGabBzpale5LYxcdpoZy2LD6WXtdErTHjGqf3n5FxQQWlFtwsIYEDc1xG8DfZ14cw bl+Io3/qB2iiG0ENLvUoFhYQWxzs+2YBP5iRT/o1TXHvPrw1/iE8JuHi0= X-Received: by 2002:a05:6214:e6d:b0:8ed:a980:6b2c with SMTP id 6a1803df08f44-907ca5e8b9bmr64172816d6.30.1784883721050; Fri, 24 Jul 2026 02:02:01 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.01.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:00 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 01/10] wic-tools: move bootloader firmware staging into the wic oe-selftest Date: Fri, 24 Jul 2026 05:01:37 -0400 Message-ID: <20260724090146.19924-2-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241911 wic-tools is a meta-recipe whose DEPENDS assemble a native sysroot of the host tools wic runs. Over time it also accumulated target bootloader firmware (syslinux, grub-efi, systemd-boot), which is a different kind of thing: wic copies those artifacts into the images it builds, reading grub-efi and systemd-boot from DEPLOY_DIR_IMAGE and syslinux from the sysroot. They were listed in wic-tools only so that building wic-tools would force the firmware to be built and deployed before the wic oe-selftest ran. That coupling makes wic-tools carry target recipes for the sole benefit of the test suite. Move the firmware out of wic-tools and have the wic oe-selftest build it directly in its setup, gated to the host architectures where each loader is available, matching the arch decorators already on the individual tests. wic-tools keeps syslinux-native, which is the isohybrid host tool wic invokes rather than firmware. No image or SDK builds relied on wic-tools pulling in the firmware; only the oe-selftest did, so this narrows wic-tools to its original purpose of staging wic's host tools. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - new in v4 - update test_build_artifacts and test_rootfs_artifacts to build syslinux into the image and take the bootimg dir from there, since wic-tools no longer stages target syslinux --- meta/lib/oeqa/selftest/cases/wic.py | 44 ++++++++++++++++++++++++----- meta/recipes-core/meta/wic-tools.bb | 11 +++++--- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 4e94f4d39abd..c4a1c7241bbc 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -72,12 +72,30 @@ class WicTestCase(OESelftestTestCase): if self.td['USE_NLS'] != 'yes': self.skipTest('wic-tools needs USE_NLS=yes') - bitbake('wic-tools core-image-minimal core-image-minimal-mtdutils') + targets = 'wic-tools core-image-minimal core-image-minimal-mtdutils' + # wic copies target bootloader firmware into the images it builds: + # grub-efi and systemd-boot from DEPLOY_DIR_IMAGE and syslinux from + # the sysroot. Deploy/stage whatever is available on this host arch + # so the bootimg_efi / isoimage / pcbios plugins can find it. This + # used to be pulled in via wic-tools' DEPENDS, but firmware is a + # target artifact rather than a wic host tool, so it is built here. + targets += ' ' + ' '.join(self._firmware_recipes()) + bitbake(targets) WicTestCase.image_is_ready = True os.environ['PATH'] = self._get_wic_path() rmtree(self.resultdir, ignore_errors=True) + def _firmware_recipes(self): + """Target bootloader firmware wic may copy into images, per host arch.""" + arch = self.td['HOST_ARCH'] + recipes = [] + if arch in ('i586', 'i686', 'x86_64', 'x86-64'): + recipes += ['syslinux', 'grub-efi', 'systemd-boot'] + elif arch == 'aarch64': + recipes += ['grub-efi', 'systemd-boot'] + return recipes + def tearDownLocal(self): """Remove resultdir as it may contain images.""" if self._old_path is None: @@ -391,9 +409,15 @@ class Wic(WicTestCase): @skipIfNotArch(['i586', 'i686', 'x86_64']) def test_build_artifacts(self): """Test wic create directdisk providing all artifacts.""" - bb_vars = get_bb_vars(['STAGING_DATADIR', 'RECIPE_SYSROOT_NATIVE'], - 'wic-tools') - bb_vars.update(get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_ROOTFS'], + # syslinux (the target bootloader data the bootimg_pcbios plugin + # copies from --bootimg-dir) is not staged by wic-tools; build it + # into the image and take the bootimg dir from there. + config = 'DEPENDS:pn-core-image-minimal += "syslinux"\n' + self.append_config(config) + bitbake('core-image-minimal') + self.remove_config(config) + bb_vars = get_bb_vars(['RECIPE_SYSROOT_NATIVE'], 'wic-tools') + bb_vars.update(get_bb_vars(['STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', 'IMAGE_ROOTFS'], 'core-image-minimal')) bbvars = {key.lower(): value for key, value in bb_vars.items()} bbvars['resultdir'] = self.resultdir @@ -494,9 +518,15 @@ class Wic(WicTestCase): @skipIfNotArch(['i586', 'i686', 'x86_64']) def test_rootfs_artifacts(self): """Test usage of rootfs plugin with rootfs paths""" - bb_vars = get_bb_vars(['STAGING_DATADIR', 'RECIPE_SYSROOT_NATIVE'], - 'wic-tools') - bb_vars.update(get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_ROOTFS'], + # syslinux (the target bootloader data the bootimg_pcbios plugin + # copies from --bootimg-dir) is not staged by wic-tools; build it + # into the image and take the bootimg dir from there. + config = 'DEPENDS:pn-core-image-minimal += "syslinux"\n' + self.append_config(config) + bitbake('core-image-minimal') + self.remove_config(config) + bb_vars = get_bb_vars(['RECIPE_SYSROOT_NATIVE'], 'wic-tools') + bb_vars.update(get_bb_vars(['STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', 'IMAGE_ROOTFS'], 'core-image-minimal')) bbvars = {key.lower(): value for key, value in bb_vars.items()} bbvars['wks'] = "directdisk-multi-rootfs" diff --git a/meta/recipes-core/meta/wic-tools.bb b/meta/recipes-core/meta/wic-tools.bb index 823dbe6db643..c1da1739777e 100644 --- a/meta/recipes-core/meta/wic-tools.bb +++ b/meta/recipes-core/meta/wic-tools.bb @@ -10,10 +10,13 @@ DEPENDS = "\ e2fsprogs-native util-linux-native tar-native erofs-utils-native \ virtual/cross-binutils \ " -DEPENDS:append:x86 = " syslinux-native syslinux grub-efi systemd-boot" -DEPENDS:append:x86-64 = " syslinux-native syslinux grub-efi systemd-boot" -DEPENDS:append:x86-x32 = " syslinux-native syslinux grub-efi" -DEPENDS:append:aarch64 = " grub-efi systemd-boot" +# syslinux-native provides the isohybrid host tool that wic runs; it is only +# available on x86. The target bootloader firmware (syslinux, grub-efi, +# systemd-boot) that wic copies into an image is deployed by the wic selftest +# instead, so it is not staged here. +DEPENDS:append:x86 = " syslinux-native" +DEPENDS:append:x86-64 = " syslinux-native" +DEPENDS:append:x86-x32 = " syslinux-native" INHIBIT_DEFAULT_DEPS = "1" From patchwork Fri Jul 24 09:01:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93430 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 3CBEAC531FC for ; Fri, 24 Jul 2026 09:02:07 +0000 (UTC) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.15304.1784883724146743392 for ; Fri, 24 Jul 2026 02:02:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=NAOl1q+n; spf=pass (domain: gmail.com, ip: 209.85.219.50, mailfrom: twoerner@gmail.com) Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-8edda5d56a5so2136846d6.3 for ; Fri, 24 Jul 2026 02:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883723; x=1785488523; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=UxweUe6WjW2oWNzgu240lk3VTlDTqDbL+WGW85m4wug=; b=NAOl1q+nYLP7MzEwwp66SvBoitK33OIY/rvfam2MJLtXD/F9OQxVV9Ea4fLxPewbir D081O8/zWgTXIrPD9+23Q+J1lNDQxkrUeNITy+R0/hZhMg0+xXDaLccWi/UVhE0IJiyw BB/HkI0clFCsRk3wnKfpDyH5Y4c90+n1vXH4ZB6VoWckONjZDOpOHMkxhXLblCvrG8ya K7yoRqqije4xflHgSQcPQ/Gkkqpllidrpz5ZcRRzVyMhyQgvBlqdXLt9IFOsZmoC/gyN 8/ECxTfhSxVNwJChbepul9v0MpQj93Xj91ZA/jo1zGDc/3wXiIfpJ1mZdWDQS5f1ZlGN 4b/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883723; x=1785488523; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=UxweUe6WjW2oWNzgu240lk3VTlDTqDbL+WGW85m4wug=; b=fZfhD6xB8NuylqtfwExwW9SldGrXddNVujsCH2L2/Wsgj21xLDhTJKkIzrmcnAlTqB be/uhApZJzrkjd5qyQQBfu92AhsNTDttfGI2KtSAiNDSc0428Z9lC5GODSChlA1A1xNU fKhGrs3fqW+ArcfOJWawmus73Byl1zmBMd3UVcUXtUD/h0hDENcFeU4u/s98tDlZeQ8G jT82VXzrSvjZQ974C0UAOBv31gFbzsAygkaGeXSpju/YkSnlNhdKRe50+u9KQbP54+yV H9D+CDXYxVTEVfQuZ/degw2f2xNt9sEWiDRiZQXxhMzXJdIfPJbBUAhjdi/wNcu6ZOza 8VNQ== X-Gm-Message-State: AOJu0YxCEV9Z1mXk20H1dWazYWPF9FMLCyultHD4tzHl6ceOIMbgkMwR DDiwbxnPvgXAJEAUNMAourP3IO2/7AUmuvy3wwr6IFwi10bqOPOsqt5EcwzyvQ== X-Gm-Gg: AR+sD11v3ZGrzpau1V9kz8V707hODB8xjOPGnKKnTa0B4162EkXK5gSM0RxPXewVQ/D F/RO5YsCccDnesg1Mes6sQdeZGh+kpIZ8F9RFppTUkLeLSgqaIPhfhKn3oY4FYmZp6gfnG1Zg8f 8v1duSVBIs6pFwDtoBuN7hSGMuPWqNA2B+J3OuqGJfTi3vD5hD/g2Ya/s0Z0SzmEN47SZY6H+4+ Kzrw8DWxlyWuPKc+RM4tIi+TLp1g6/fjh5LVizX/N8awgzkFn8IwZvnyiLaM/z2zZAEM/9gnV8q 0KnzXNb7w7OSRxlR4yPmZeInN9hPBnLBYUIuJu2uQ6t+A7OlurFPx/bA+uVuDFUfpHBkhGMuuiR 5B3uh9VwT34P1f3V6iH+DqZCiYxeqJ4gcGUVtvxNfQAXDiY1gP/NhowyPps2WX/IWJQhCghl/CT n6KLcDVkwPQPf2+RY1mj2e0pSTOEDRTZ2U9MmAjQX7eQw7 X-Received: by 2002:a05:6214:5016:b0:8fd:6e32:2bfc with SMTP id 6a1803df08f44-907ca58b582mr65701476d6.61.1784883722997; Fri, 24 Jul 2026 02:02:02 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.02.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:01 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 02/10] wic: add runtime dependencies on the tools it invokes Date: Fri, 24 Jul 2026 05:01:38 -0400 Message-ID: <20260724090146.19924-3-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241912 wic shells out to a number of host-side tools to do its work: parted, mkdosfs, mcopy, the mkfs.* family, sfdisk, e2fsck, resize2fs, debugfs, blkid and more, depending on the operation and on the partition types in the image. None of these are declared as dependencies of wic. For the bitbake do_image_wic task this is handled by the wic-tools recipe, which builds the tools into a native sysroot. Wherever else wic is installed as a package it gets none of them, and its offline lookup (wic ls/cp/write) resolves each tool over a search path that falls back to the host PATH, so on a machine that happens to have the tool installed system-wide wic succeeds while on a machine without it wic fails: wic.WicError: Can't find executable 'mcopy' Falling back to the host is unreliable even when the tool is found: wic depends on specific minimum versions of some of these tools, and an arbitrary host copy may be too old, so wic can pick up a tool that does not behave as it needs. Declaring the tools as dependencies pins known-good versions instead of trusting whatever the host provides. Add the tools wic runs as RDEPENDS so they are installed alongside it. resize2fs is listed on its own because e2fsprogs packages it separately as e2fsprogs-resize2fs, which e2fsprogs does not pull in, and wic needs it for the cp/write resize path. grub (grub-mkimage) is used to assemble EFI boot images, and is only compatible with, and only used by wic on, x86 and aarch64. In particular grub is not in COMPATIBLE_HOST on arm hard-float, so an unconditional dependency makes wic unbuildable there and breaks "bitbake world" (Nothing RPROVIDES 'grub'). Gate grub to the hosts that can build and use it. syslinux is only available on x86, so it is gated to those hosts too. Its bits are split across packages: the syslinux package provides the isohybrid helper wic runs, syslinux-misc carries the ldlinux.sys, isohdpfx.bin and ldlinux.c32 data files, and syslinux-isolinux carries isolinux.bin; wic copies all of these into a hybrid ISO, so all three are listed. cdrtools (mkisofs) is native-only with no nativesdk variant and is only needed for ISO images, so it is not listed here. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - gate grub to x86 and aarch64 (it is not in COMPATIBLE_HOST on arm hard-float, which made wic unbuildable and broke bitbake world); move syslinux into the same arch-gated appends - also depend on syslinux-isolinux, which carries isolinux.bin that wic copies into a hybrid ISO; the syslinux/syslinux-misc pair alone missed it changes in v3: - list the tools on all variants rather than only the nativesdk variant changes in v2: - merge the tool list from the v1 "wic-tools.inc: add" patch into this recipe as RDEPENDS; the separate .inc is dropped - list the tools inline rather than via a shared WIC_TOOLS variable - note in the commit log that a host tool may also be the wrong version, not merely absent --- meta/recipes-support/wic/wic_0.3.1.bb | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/meta/recipes-support/wic/wic_0.3.1.bb b/meta/recipes-support/wic/wic_0.3.1.bb index d9b4cc05c4bd..75fa734a9761 100644 --- a/meta/recipes-support/wic/wic_0.3.1.bb +++ b/meta/recipes-support/wic/wic_0.3.1.bb @@ -17,4 +17,34 @@ RDEPENDS:${PN} += " \ python3-misc \ " +# wic shells out to these host-side tools when it runs, so they must be +# installed alongside it. +RDEPENDS:${PN} += " \ + parted \ + gptfdisk \ + dosfstools \ + mtools \ + bmaptool \ + btrfs-tools \ + squashfs-tools \ + e2fsprogs \ + e2fsprogs-resize2fs \ + util-linux \ + tar \ + erofs-utils \ +" + +# grub (grub-mkimage) assembles EFI boot images; it is only compatible +# with, and only used by wic on, x86 and aarch64, so gate it to those +# hosts. In particular grub is not compatible with arm hard-float, so an +# unconditional dependency makes wic unbuildable there. syslinux is only +# available on x86: its installer provides the isohybrid helper wic runs, +# syslinux-misc carries ldlinux.sys/isohdpfx.bin/ldlinux.c32 and +# syslinux-isolinux carries isolinux.bin, all of which wic copies into a +# hybrid ISO. +RDEPENDS:${PN}:append:x86 = " grub syslinux syslinux-misc syslinux-isolinux" +RDEPENDS:${PN}:append:x86-64 = " grub syslinux syslinux-misc syslinux-isolinux" +RDEPENDS:${PN}:append:x86-x32 = " grub syslinux syslinux-misc syslinux-isolinux" +RDEPENDS:${PN}:append:aarch64 = " grub" + BBCLASSEXTEND = "native nativesdk" From patchwork Fri Jul 24 09:01:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93429 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 7B447C53209 for ; Fri, 24 Jul 2026 09:02:07 +0000 (UTC) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15481.1784883725758280309 for ; Fri, 24 Jul 2026 02:02:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=B6/np8zG; spf=pass (domain: gmail.com, ip: 209.85.222.169, mailfrom: twoerner@gmail.com) Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-92e5b048375so11205785a.1 for ; Fri, 24 Jul 2026 02:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883725; x=1785488525; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=1WqN6l8M4H6lOjvY7wB/rKjkgS7YLTq6vxS99nEqrOA=; b=B6/np8zG9iSD6roCXz88aMDjGhY2Zd4xYyCgn/5kEeQjDNuyIkYsADtL0uQN7HpMI9 cA2CjulQGOU2ZFQkmyuqm/tlR4ttZMdP1ZO7Wlpt6gUOiRj5WSWCbTRseaTHVkHsQMRx QwRukHsuRmsP82S0zhLESFcRVW6dcuKSWCF/s6sdZS/A3MSHdDFxFVysnZX/jCDKF11f uP7EFpXzgHMg0yMjx9saiSGbBXh6+kkHVbBsOPpw+ly/6Z8O7+nOqF+/RhE3vFJ7xbj8 evIujtYxcPbwko81eyIJ/zwyxZdq5YOmc8QO+H2t5/C0a0+OOu3dB39zsLdeqp4rTJpq i2cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883725; x=1785488525; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=1WqN6l8M4H6lOjvY7wB/rKjkgS7YLTq6vxS99nEqrOA=; b=cw7XOqvFyY6B2am4EgR3A+j4sUhoraVSEUNgCK+Ik/v22snCKWt9d7sBAZvXywsUht P/gz4fGImu30CWl6GqmoIdH53TzJE+MK48HYCNwJ2cg0s/kKq0ZupkY0MU1yo2Yr48Zd Qh5OK2+aBV5DatZT0DHU4EUVgx1+R+XMW6yv2kFgtHOhbJ4A1p4ofywfEBvNQEYybHoR h6xl1nr5s7PNfs23+tac56Li6xaXFmpMaeOiQfzHLutrmdO1bF/CI4CBhWIyXdaExAfv MOM2k8w7b+2+T9q4MWdQk86UAGaoRtXFdYAs7Wuw8CHRUwSwuUtilKBIOsfOZkTOElp7 1z2g== X-Gm-Message-State: AOJu0YwRvLGOypCABgiaVF830tlVeBIsdzmPqQTARekoJZwMpvjltHIp Bl5+LILVkoQ9uZ2jloUevm0Ffv9tHUEfTZJkzSjLt7wKxIt1wIj4nc36YCyVFg== X-Gm-Gg: AR+sD113Kty9hkYTiBt61D1zpsPiNdQ2HDatqJxbi2FYrZlM6qxOmWTdyKqSuyQe2rm wFLVNbYmPZ/i6zn+S9gN2GIHcrUYmT0T3AXUshV4REjjVGAWgZ12ldo3VEPw7B0a3tge5qA8KXe rK7IZMVgs8s8vQ6bIjnHYKUimP3X541JUBHBcO7V6YN7ZVBwPA8QrAJoiGgDMmCQIliApSfLILq 0d3bzz9+OWg/0v0ZY+TksNgO/1X+c0kyRE08kGhSwCoyfhe7HhjQOMcLSSFpnT7Uk/KXi6jZkUi aeo87+LPlBfgsaq2vio+2KuIXZyFkxk5FKqK9a6kH2jUKfxR/7SzOKmzXfEEZQSF8nK7034dTHz Rstu5LFlqJtMmTGs8g7XLR4Dp/wHGxcTMZyV++zYMYWsOX8IWc5ShMbTsKJ2u6V45a3ZxhVs3pz BhqKzh3jCJMhcl5LjULLxLuDLBFyuIuJfjgQJEjk9rGfRU X-Received: by 2002:a05:620a:458a:b0:92e:ef09:f8f2 with SMTP id af79cd13be357-9310376389bmr621577485a.66.1784883724664; Fri, 24 Jul 2026 02:02:04 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.02.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:03 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 03/10] oeqa/selftest/wic: drop dead COREBASE/scripts wic lookup Date: Fri, 24 Jul 2026 05:01:39 -0400 Message-ID: <20260724090146.19924-4-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241913 _get_wic_path() searches for the wic binary in two locations: the in-tree scripts directory and the wic-tools native sysroot. wic was moved to a standalone repository and is no longer shipped in scripts/, so scripts/wic never exists and the first search path can never match. Look for wic only in the wic-tools native sysroot, where the wic recipe installs it, and fail with that path if it is missing. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - new in v4 --- meta/lib/oeqa/selftest/cases/wic.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index c4a1c7241bbc..6a2706fc2c8f 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -107,18 +107,11 @@ class WicTestCase(OESelftestTestCase): def _get_wic_path(self): if WicTestCase.wic_bindir is None: - search_paths = [ - os.path.join(self.td['COREBASE'], 'scripts'), - os.path.join(get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools'), 'usr', 'bin'), - ] - - for bindir in search_paths: - if os.path.exists(os.path.join(bindir, 'wic')): - WicTestCase.wic_bindir = bindir - break - - if WicTestCase.wic_bindir is None: - self.fail("Unable to find the wic binary in %s" % ', '.join(search_paths)) + bindir = os.path.join(get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools'), + 'usr', 'bin') + if not os.path.exists(os.path.join(bindir, 'wic')): + self.fail("Unable to find the wic binary in %s" % bindir) + WicTestCase.wic_bindir = bindir path_entries = [] for path_group in ( From patchwork Fri Jul 24 09:01:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93437 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 21B04C53215 for ; Fri, 24 Jul 2026 09:02:18 +0000 (UTC) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15482.1784883728488883398 for ; Fri, 24 Jul 2026 02:02:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=m4EEZ0C2; spf=pass (domain: gmail.com, ip: 209.85.160.173, mailfrom: twoerner@gmail.com) Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-51a868b6962so2008141cf.2 for ; Fri, 24 Jul 2026 02:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883727; x=1785488527; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=nxAjd064ZT0ayJvCvjMKgKjnVulBRppXkg1XREnxjv4=; b=m4EEZ0C24TRW6wlvqBvmeN5yDvNwZO0OdKJyY4nDicV1b/rCvOT4e0aVSEaVdEfjg9 kBVg3wmg1CY+2ZbZg6yusQbxmK+Lh2Fh4zR9V+o8HpxDzKWh1pclLk2CqX3Meo0fAAJi YJnl/3NwWRpW+DWMHQagCYB0tQHq+NUGX7Qx+XkFAibenq9DmE3jencNa1klKQd6J/42 qNRQZK7n8jNj2gz8g+ttgkx97dRq5Hk/fb7pLh+i8C8sCnU6M2mu8thbcPyonrbr4ihb xKotw1EeW/C6WnibYJjv3d3B6lWO1N/kar4SKyUDtBqRBxCMC9hBwXqaZvLms3j1yKNc p35w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883727; x=1785488527; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=nxAjd064ZT0ayJvCvjMKgKjnVulBRppXkg1XREnxjv4=; b=iuID9c4fhH10hl0GZpjdkX0gBpN/h69ZfQ23zSE1Czb+F3l/270qrXh4LQm6oUMpTS dXPKgsrx0qSmCnOFMtSbb1IUKw6IzhrZNAVXzKM6UYCtGzqhoakxCu/aOLkWUJXPWwME f3Ps68cS4XReMbRJCtQTL/g49ll6BSVIjGT8wAe/HggjfppSzKr+IdXkr0+iYsZj8hsu pV/yptGJfpmZM8XZc4P1ndSzebwC+UhTt+WG/UKtyfue2z0Fn9Ys7ebxbKLOb2lJe38v S0ZUJ3DRAkLE9F083tp8JlmFKp9cPOFvlLTmLMIrnJHIT0qFFM68Qxe5snl5dDm6Fduj qO+A== X-Gm-Message-State: AOJu0YzQqHJbakei6sE/Fm8YwApexC7UcMx0Q/h+c7DevevpJOd9K532 urjGbtNtz5BxrvlHfSsMdoR2/3Nzd6Q2CnBhKCuxvq221GOKH+gBcxw+/i1pdA== X-Gm-Gg: AR+sD12iuoDMKJ7MtAXzQdt0j5jgMW4eicZ99tR2dtsKKxudALOrDEyLd0QTn3sQ4Yk eoYl0Mv9COXCIJ5tMOhPEjJzsedvb/x2LxB8mT3nFzB17XqYlnFuNzQKL0zW4qUx+7P/bZrZqPR QGr/Pzo13lQzCD8gTkrJwl52+KTupdfJ6TvJGw9nrb+oAnH4GBu1kcKeAps9a4sHjSdVi2jPhLd zdzSfptJZQJpdwIsSD1LmTS+iUArXDQb753K8hED2lYf2fRM/NrBBGZTzDrAq6sKOvUQz74WDyF CRj3BlNDdXlU6NUuO54Oms6fjVwKswFRMk6xnanWIeYW1mRY83nl4Un7ZImxqQ1FNCbHXck/Wdj KUkpRNpQIyWrAl1C9P7fjb2qigVn2qNNSJVdUDWwi5G0KDxeWvbBe1LUFc9UK4SjhpADxCRG97V 5zb+BlOqP7cqEdR92wBjrAFnxsDK06nYIF7Jg/7TA/jMsjFEkJ36bVJhI= X-Received: by 2002:a05:622a:5145:b0:51b:60f1:689a with SMTP id d75a77b69052e-5283dda399amr18565351cf.7.1784883726394; Fri, 24 Jul 2026 02:02:06 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.02.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:05 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 04/10] oeqa/selftest/wic: drop redundant per-test PATH overrides Date: Fri, 24 Jul 2026 05:01:40 -0400 Message-ID: <20260724090146.19924-5-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241914 setUpLocal() already puts wic and its tools on PATH for every test: it sets os.environ['PATH'] to the wic binary's directory followed by the whole wic-tools native-sysroot PATH, and tearDownLocal() restores the original. A number of individual tests then re-set os.environ['PATH'] = get_bb_var("PATH", "wic-tools") inside a try/finally, which is a narrower subset of what setUpLocal already established (it drops the wic bindir prepend and the original PATH tail) and adds nothing: wic and every tool it runs are reachable from the PATH setUpLocal installs. Remove these per-test overrides and their try/finally wrappers. The tests keep passing the explicit --native-sysroot / RECIPE_SYSROOT_NATIVE that some of them build, which is a separate concern from PATH. The diff looks large and noisy, but the change is mechanical: dropping each try/finally means the whole test body dedents by one level, so almost every line in the affected tests shows up as removed-and-re-added with different leading whitespace. The test logic is otherwise unchanged; reviewing with a whitespace-insensitive diff (git show -w) shows only the removed override, try: and finally: lines. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - new in v4 --- meta/lib/oeqa/selftest/cases/wic.py | 792 +++++++++++++--------------- 1 file changed, 362 insertions(+), 430 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 6a2706fc2c8f..37673392c271 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -536,104 +536,97 @@ class Wic(WicTestCase): def test_exclude_path(self): """Test --exclude-path wks option.""" - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") - - try: - wks_file = 'temp.wks' - with open(wks_file, 'w') as wks: - rootfs_dir = get_bb_var('IMAGE_ROOTFS', 'core-image-minimal') - wks.write(""" + wks_file = 'temp.wks' + with open(wks_file, 'w') as wks: + rootfs_dir = get_bb_var('IMAGE_ROOTFS', 'core-image-minimal') + wks.write(""" part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path usr part /usr --source rootfs --ondisk mmcblk0 --fstype=ext4 --rootfs-dir %s/usr part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --rootfs-dir %s/usr part /mnt --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/whoami --rootfs-dir %s/usr""" - % (rootfs_dir, rootfs_dir, rootfs_dir)) - runCmd("wic create %s -e core-image-minimal -o %s" \ - % (wks_file, self.resultdir)) - - os.remove(wks_file) - wicout = glob(os.path.join(self.resultdir, "%s-*direct" % 'temp')) - self.assertEqual(1, len(wicout)) + % (rootfs_dir, rootfs_dir, rootfs_dir)) + runCmd("wic create %s -e core-image-minimal -o %s" \ + % (wks_file, self.resultdir)) - wicimg = wicout[0] - - # verify partition size with wic - res = runCmd("parted -m %s unit b p" % wicimg, stderr=subprocess.PIPE) - - # parse parted output which looks like this: - # BYT;\n - # /var/tmp/wic/build/tmpfwvjjkf_-201611101222-hda.direct:200MiB:file:512:512:msdos::;\n - # 1:0.00MiB:200MiB:200MiB:ext4::;\n - partlns = res.output.splitlines()[2:] + os.remove(wks_file) + wicout = glob(os.path.join(self.resultdir, "%s-*direct" % 'temp')) + self.assertEqual(1, len(wicout)) - self.assertEqual(4, len(partlns)) + wicimg = wicout[0] - for part in [1, 2, 3, 4]: - part_file = os.path.join(self.resultdir, "selftest_img.part%d" % part) - partln = partlns[part-1].split(":") - self.assertEqual(7, len(partln)) - start = int(partln[1].rstrip("B")) / 512 - length = int(partln[3].rstrip("B")) / 512 - runCmd("dd if=%s of=%s skip=%d count=%d" % - (wicimg, part_file, start, length)) - - # Test partition 1, should contain the normal root directories, except - # /usr. - res = runCmd("debugfs -R 'ls -p' %s" % \ - os.path.join(self.resultdir, "selftest_img.part1"), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertIn("etc", files) - self.assertNotIn("usr", files) - - # Partition 2, should contain common directories for /usr, not root - # directories. - res = runCmd("debugfs -R 'ls -p' %s" % \ - os.path.join(self.resultdir, "selftest_img.part2"), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertNotIn("etc", files) - self.assertNotIn("usr", files) - self.assertIn("share", files) - - # Partition 3, should contain the same as partition 2, including the bin - # directory, but not the files inside it. - res = runCmd("debugfs -R 'ls -p' %s" % \ - os.path.join(self.resultdir, "selftest_img.part3"), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertNotIn("etc", files) - self.assertNotIn("usr", files) - self.assertIn("share", files) - self.assertIn("bin", files) - res = runCmd("debugfs -R 'ls -p bin' %s" % \ - os.path.join(self.resultdir, "selftest_img.part3"), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertIn(".", files) - self.assertIn("..", files) - self.assertEqual(2, len(files)) - - # Partition 4, should contain the same as partition 2, including the bin - # directory, but not whoami (a symlink to busybox.nosuid) inside it. - res = runCmd("debugfs -R 'ls -p' %s" % \ - os.path.join(self.resultdir, "selftest_img.part4"), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertNotIn("etc", files) - self.assertNotIn("usr", files) - self.assertIn("share", files) - self.assertIn("bin", files) - res = runCmd("debugfs -R 'ls -p bin' %s" % \ - os.path.join(self.resultdir, "selftest_img.part4"), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertIn(".", files) - self.assertIn("..", files) - self.assertIn("who", files) - self.assertNotIn("whoami", files) - - for part in [1, 2, 3, 4]: - part_file = os.path.join(self.resultdir, "selftest_img.part%d" % part) - os.remove(part_file) + # verify partition size with wic + res = runCmd("parted -m %s unit b p" % wicimg, stderr=subprocess.PIPE) - finally: - os.environ['PATH'] = oldpath + # parse parted output which looks like this: + # BYT;\n + # /var/tmp/wic/build/tmpfwvjjkf_-201611101222-hda.direct:200MiB:file:512:512:msdos::;\n + # 1:0.00MiB:200MiB:200MiB:ext4::;\n + partlns = res.output.splitlines()[2:] + + self.assertEqual(4, len(partlns)) + + for part in [1, 2, 3, 4]: + part_file = os.path.join(self.resultdir, "selftest_img.part%d" % part) + partln = partlns[part-1].split(":") + self.assertEqual(7, len(partln)) + start = int(partln[1].rstrip("B")) / 512 + length = int(partln[3].rstrip("B")) / 512 + runCmd("dd if=%s of=%s skip=%d count=%d" % + (wicimg, part_file, start, length)) + + # Test partition 1, should contain the normal root directories, except + # /usr. + res = runCmd("debugfs -R 'ls -p' %s" % \ + os.path.join(self.resultdir, "selftest_img.part1"), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertIn("etc", files) + self.assertNotIn("usr", files) + + # Partition 2, should contain common directories for /usr, not root + # directories. + res = runCmd("debugfs -R 'ls -p' %s" % \ + os.path.join(self.resultdir, "selftest_img.part2"), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertNotIn("etc", files) + self.assertNotIn("usr", files) + self.assertIn("share", files) + + # Partition 3, should contain the same as partition 2, including the bin + # directory, but not the files inside it. + res = runCmd("debugfs -R 'ls -p' %s" % \ + os.path.join(self.resultdir, "selftest_img.part3"), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertNotIn("etc", files) + self.assertNotIn("usr", files) + self.assertIn("share", files) + self.assertIn("bin", files) + res = runCmd("debugfs -R 'ls -p bin' %s" % \ + os.path.join(self.resultdir, "selftest_img.part3"), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertIn(".", files) + self.assertIn("..", files) + self.assertEqual(2, len(files)) + + # Partition 4, should contain the same as partition 2, including the bin + # directory, but not whoami (a symlink to busybox.nosuid) inside it. + res = runCmd("debugfs -R 'ls -p' %s" % \ + os.path.join(self.resultdir, "selftest_img.part4"), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertNotIn("etc", files) + self.assertNotIn("usr", files) + self.assertIn("share", files) + self.assertIn("bin", files) + res = runCmd("debugfs -R 'ls -p bin' %s" % \ + os.path.join(self.resultdir, "selftest_img.part4"), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertIn(".", files) + self.assertIn("..", files) + self.assertIn("who", files) + self.assertNotIn("whoami", files) + + for part in [1, 2, 3, 4]: + part_file = os.path.join(self.resultdir, "selftest_img.part%d" % part) + os.remove(part_file) def test_exclude_path_with_extra_space(self): """Test having --exclude-path with IMAGE_ROOTFS_EXTRA_SPACE. [Yocto #15555]""" @@ -672,75 +665,61 @@ part /mnt --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/whoa def test_include_path(self): """Test --include-path wks option.""" - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") - - try: - include_path = os.path.join(self.resultdir, 'test-include') - os.makedirs(include_path) - with open(os.path.join(include_path, 'test-file'), 'w') as t: - t.write("test\n") - wks_file = os.path.join(include_path, 'temp.wks') - with open(wks_file, 'w') as wks: - rootfs_dir = get_bb_var('IMAGE_ROOTFS', 'core-image-minimal') - wks.write(""" + include_path = os.path.join(self.resultdir, 'test-include') + os.makedirs(include_path) + with open(os.path.join(include_path, 'test-file'), 'w') as t: + t.write("test\n") + wks_file = os.path.join(include_path, 'temp.wks') + with open(wks_file, 'w') as wks: + rootfs_dir = get_bb_var('IMAGE_ROOTFS', 'core-image-minimal') + wks.write(""" part /part1 --source rootfs --ondisk mmcblk0 --fstype=ext4 part /part2 --source rootfs --ondisk mmcblk0 --fstype=ext4 --include-path %s""" - % (include_path)) - runCmd("wic create %s -e core-image-minimal -o %s" \ - % (wks_file, self.resultdir)) - - part1 = glob(os.path.join(self.resultdir, 'temp-*.direct.p1'))[0] - part2 = glob(os.path.join(self.resultdir, 'temp-*.direct.p2'))[0] + % (include_path)) + runCmd("wic create %s -e core-image-minimal -o %s" \ + % (wks_file, self.resultdir)) - # Test partition 1, should not contain 'test-file' - res = runCmd("debugfs -R 'ls -p' %s" % (part1), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertNotIn('test-file', files) - self.assertEqual(True, files_own_by_root(res.output)) + part1 = glob(os.path.join(self.resultdir, 'temp-*.direct.p1'))[0] + part2 = glob(os.path.join(self.resultdir, 'temp-*.direct.p2'))[0] - # Test partition 2, should contain 'test-file' - res = runCmd("debugfs -R 'ls -p' %s" % (part2), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertIn('test-file', files) - self.assertEqual(True, files_own_by_root(res.output)) + # Test partition 1, should not contain 'test-file' + res = runCmd("debugfs -R 'ls -p' %s" % (part1), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertNotIn('test-file', files) + self.assertEqual(True, files_own_by_root(res.output)) - finally: - os.environ['PATH'] = oldpath + # Test partition 2, should contain 'test-file' + res = runCmd("debugfs -R 'ls -p' %s" % (part2), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertIn('test-file', files) + self.assertEqual(True, files_own_by_root(res.output)) def test_include_path_embeded(self): """Test --include-path wks option.""" - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") - - try: - include_path = os.path.join(self.resultdir, 'test-include') - os.makedirs(include_path) - with open(os.path.join(include_path, 'test-file'), 'w') as t: - t.write("test\n") - wks_file = os.path.join(include_path, 'temp.wks') - with open(wks_file, 'w') as wks: - wks.write(""" + include_path = os.path.join(self.resultdir, 'test-include') + os.makedirs(include_path) + with open(os.path.join(include_path, 'test-file'), 'w') as t: + t.write("test\n") + wks_file = os.path.join(include_path, 'temp.wks') + with open(wks_file, 'w') as wks: + wks.write(""" part / --source rootfs --fstype=ext4 --include-path %s --include-path core-image-minimal-mtdutils export/""" - % (include_path)) - runCmd("wic create %s -e core-image-minimal -o %s" \ - % (wks_file, self.resultdir)) - - part1 = glob(os.path.join(self.resultdir, 'temp-*.direct.p1'))[0] + % (include_path)) + runCmd("wic create %s -e core-image-minimal -o %s" \ + % (wks_file, self.resultdir)) - res = runCmd("debugfs -R 'ls -p' %s" % (part1), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertIn('test-file', files) - self.assertEqual(True, files_own_by_root(res.output)) + part1 = glob(os.path.join(self.resultdir, 'temp-*.direct.p1'))[0] - res = runCmd("debugfs -R 'ls -p /export/etc/' %s" % (part1), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertIn('passwd', files) - self.assertEqual(True, files_own_by_root(res.output)) + res = runCmd("debugfs -R 'ls -p' %s" % (part1), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertIn('test-file', files) + self.assertEqual(True, files_own_by_root(res.output)) - finally: - os.environ['PATH'] = oldpath + res = runCmd("debugfs -R 'ls -p /export/etc/' %s" % (part1), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertIn('passwd', files) + self.assertEqual(True, files_own_by_root(res.output)) def test_include_path_errors(self): """Test --include-path wks option error handling.""" @@ -791,9 +770,6 @@ part / --source rootfs --fstype=ext4 --include-path %s --include-path core-imag # prepare wicenv and rootfs bitbake('core-image-minimal core-image-minimal-mtdutils -c do_rootfs_wicenv') - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") - t_normal = """ part / --source rootfs --fstype=ext4 """ @@ -810,61 +786,50 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc """ tests = [t_normal, t_exclude, t_multi, t_change] - try: - for test in tests: - include_path = os.path.join(self.resultdir, 'test-include') - os.makedirs(include_path) - wks_file = os.path.join(include_path, 'temp.wks') - with open(wks_file, 'w') as wks: - wks.write(test) - runCmd("wic create %s -e core-image-minimal -o %s" \ - % (wks_file, self.resultdir)) - - for part in glob(os.path.join(self.resultdir, 'temp-*.direct.p*')): - res = runCmd("debugfs -R 'ls -p' %s" % (part), stderr=subprocess.PIPE) - self.assertEqual(True, files_own_by_root(res.output)) + for test in tests: + include_path = os.path.join(self.resultdir, 'test-include') + os.makedirs(include_path) + wks_file = os.path.join(include_path, 'temp.wks') + with open(wks_file, 'w') as wks: + wks.write(test) + runCmd("wic create %s -e core-image-minimal -o %s" \ + % (wks_file, self.resultdir)) - config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "%s"\n' % wks_file - self.append_config(config) - bitbake('core-image-minimal') - tmpdir = os.path.join(get_bb_var('WORKDIR', 'core-image-minimal'),'build-wic') + for part in glob(os.path.join(self.resultdir, 'temp-*.direct.p*')): + res = runCmd("debugfs -R 'ls -p' %s" % (part), stderr=subprocess.PIPE) + self.assertEqual(True, files_own_by_root(res.output)) - # check each partition for permission - for part in glob(os.path.join(tmpdir, 'temp-*.direct.p*')): - res = runCmd("debugfs -R 'ls -p' %s" % (part), stderr=subprocess.PIPE) - self.assertTrue(files_own_by_root(res.output) - ,msg='Files permission incorrect using wks set "%s"' % test) + config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "%s"\n' % wks_file + self.append_config(config) + bitbake('core-image-minimal') + tmpdir = os.path.join(get_bb_var('WORKDIR', 'core-image-minimal'),'build-wic') - # clean config and result directory for next cases - self.remove_config(config) - rmtree(self.resultdir, ignore_errors=True) + # check each partition for permission + for part in glob(os.path.join(tmpdir, 'temp-*.direct.p*')): + res = runCmd("debugfs -R 'ls -p' %s" % (part), stderr=subprocess.PIPE) + self.assertTrue(files_own_by_root(res.output) + ,msg='Files permission incorrect using wks set "%s"' % test) - finally: - os.environ['PATH'] = oldpath + # clean config and result directory for next cases + self.remove_config(config) + rmtree(self.resultdir, ignore_errors=True) def test_change_directory(self): """Test --change-directory wks option.""" - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") - - try: - include_path = os.path.join(self.resultdir, 'test-include') - os.makedirs(include_path) - wks_file = os.path.join(include_path, 'temp.wks') - with open(wks_file, 'w') as wks: - wks.write("part /etc --source rootfs --fstype=ext4 --change-directory=etc") - runCmd("wic create %s -e core-image-minimal -o %s" \ - % (wks_file, self.resultdir)) - - part1 = glob(os.path.join(self.resultdir, 'temp-*.direct.p1'))[0] + include_path = os.path.join(self.resultdir, 'test-include') + os.makedirs(include_path) + wks_file = os.path.join(include_path, 'temp.wks') + with open(wks_file, 'w') as wks: + wks.write("part /etc --source rootfs --fstype=ext4 --change-directory=etc") + runCmd("wic create %s -e core-image-minimal -o %s" \ + % (wks_file, self.resultdir)) - res = runCmd("debugfs -R 'ls -p' %s" % (part1), stderr=subprocess.PIPE) - files = extract_files(res.output) - self.assertIn('passwd', files) + part1 = glob(os.path.join(self.resultdir, 'temp-*.direct.p1'))[0] - finally: - os.environ['PATH'] = oldpath + res = runCmd("debugfs -R 'ls -p' %s" % (part1), stderr=subprocess.PIPE) + files = extract_files(res.output) + self.assertIn('passwd', files) def test_change_directory_errors(self): """Test --change-directory wks option error handling.""" @@ -887,41 +852,34 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc def test_no_fstab_update(self): """Test --no-fstab-update wks option.""" - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") - # Get stock fstab from base-files recipe bitbake('base-files -c do_install') bf_fstab = os.path.join(get_bb_var('D', 'base-files'), 'etc', 'fstab') self.assertEqual(True, os.path.exists(bf_fstab)) bf_fstab_md5sum = runCmd('md5sum %s ' % bf_fstab).output.split(" ")[0] - try: - no_fstab_update_path = os.path.join(self.resultdir, 'test-no-fstab-update') - os.makedirs(no_fstab_update_path) - wks_file = os.path.join(no_fstab_update_path, 'temp.wks') - with open(wks_file, 'w') as wks: - wks.writelines(['part / --source rootfs --fstype=ext4 --label rootfs\n', - 'part /mnt/p2 --source rootfs --rootfs-dir=core-image-minimal ', - '--fstype=ext4 --label p2 --no-fstab-update\n']) - runCmd("wic create %s -e core-image-minimal -o %s" \ - % (wks_file, self.resultdir)) - - part_fstab_md5sum = [] - for i in range(1, 3): - part = glob(os.path.join(self.resultdir, 'temp-*.direct.p') + str(i))[0] - part_fstab = runCmd("debugfs -R 'cat etc/fstab' %s" % (part), stderr=subprocess.PIPE) - part_fstab_md5sum.append(hashlib.md5((part_fstab.output + "\n\n").encode('utf-8')).hexdigest()) + no_fstab_update_path = os.path.join(self.resultdir, 'test-no-fstab-update') + os.makedirs(no_fstab_update_path) + wks_file = os.path.join(no_fstab_update_path, 'temp.wks') + with open(wks_file, 'w') as wks: + wks.writelines(['part / --source rootfs --fstype=ext4 --label rootfs\n', + 'part /mnt/p2 --source rootfs --rootfs-dir=core-image-minimal ', + '--fstype=ext4 --label p2 --no-fstab-update\n']) + runCmd("wic create %s -e core-image-minimal -o %s" \ + % (wks_file, self.resultdir)) - # '/etc/fstab' in partition 2 should contain the same stock fstab file - # as the one installed by the base-file recipe. - self.assertEqual(bf_fstab_md5sum, part_fstab_md5sum[1]) + part_fstab_md5sum = [] + for i in range(1, 3): + part = glob(os.path.join(self.resultdir, 'temp-*.direct.p') + str(i))[0] + part_fstab = runCmd("debugfs -R 'cat etc/fstab' %s" % (part), stderr=subprocess.PIPE) + part_fstab_md5sum.append(hashlib.md5((part_fstab.output + "\n\n").encode('utf-8')).hexdigest()) - # '/etc/fstab' in partition 1 should contain an updated fstab file. - self.assertNotEqual(bf_fstab_md5sum, part_fstab_md5sum[0]) + # '/etc/fstab' in partition 2 should contain the same stock fstab file + # as the one installed by the base-file recipe. + self.assertEqual(bf_fstab_md5sum, part_fstab_md5sum[1]) - finally: - os.environ['PATH'] = oldpath + # '/etc/fstab' in partition 1 should contain an updated fstab file. + self.assertNotEqual(bf_fstab_md5sum, part_fstab_md5sum[0]) def test_no_fstab_update_errors(self): """Test --no-fstab-update wks option error handling.""" @@ -995,153 +953,139 @@ bootloader --ptable gpt""") def test_wic_sector_size_env(self): """Test generation image sector size via environment (obsolete)""" - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") + # Add WIC_SECTOR_SIZE into config + config = 'WIC_SECTOR_SIZE = "4096"\n'\ + 'WICVARS:append = " WIC_SECTOR_SIZE"\n' + self.append_config(config) + bitbake('core-image-minimal') - try: - # Add WIC_SECTOR_SIZE into config - config = 'WIC_SECTOR_SIZE = "4096"\n'\ - 'WICVARS:append = " WIC_SECTOR_SIZE"\n' - self.append_config(config) - bitbake('core-image-minimal') + # Check WIC_SECTOR_SIZE apply to bitbake variable + wic_sector_size_str = get_bb_var('WIC_SECTOR_SIZE', 'core-image-minimal') + wic_sector_size = int(wic_sector_size_str) + self.assertEqual(4096, wic_sector_size) - # Check WIC_SECTOR_SIZE apply to bitbake variable - wic_sector_size_str = get_bb_var('WIC_SECTOR_SIZE', 'core-image-minimal') - wic_sector_size = int(wic_sector_size_str) - self.assertEqual(4096, wic_sector_size) - - self.logger.info("Test wic_sector_size: %d \n" % wic_sector_size) - - with NamedTemporaryFile("w", suffix=".wks") as wks: - wks.writelines( - ['bootloader --ptable gpt\n', - 'part --fstype vfat --fstype vfat --label emptyfat --size 1M --mkfs-extraopts "-S 4096"\n', - 'part --fstype ext4 --source rootfs --label rofs-a --mkfs-extraopts "-b 4096"\n', - 'part --fstype ext4 --source rootfs --use-uuid --mkfs-extraopts "-b 4096"\n']) - wks.flush() - cmd = "wic create %s -e core-image-minimal -o %s" % (wks.name, self.resultdir) - runCmd(cmd) - wksname = os.path.splitext(os.path.basename(wks.name))[0] - images = glob(os.path.join(self.resultdir, "%s-*direct" % wksname)) - self.assertEqual(1, len(images)) + self.logger.info("Test wic_sector_size: %d \n" % wic_sector_size) - sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') - # list partitions - result = runCmd("wic ls %s -n %s" % (images[0], sysroot)) - print(result.output) - # Deprecated message + 4 lines of output: header + 3 partitions - self.assertEqual(5, len(result.output.split('\n'))) + with NamedTemporaryFile("w", suffix=".wks") as wks: + wks.writelines( + ['bootloader --ptable gpt\n', + 'part --fstype vfat --fstype vfat --label emptyfat --size 1M --mkfs-extraopts "-S 4096"\n', + 'part --fstype ext4 --source rootfs --label rofs-a --mkfs-extraopts "-b 4096"\n', + 'part --fstype ext4 --source rootfs --use-uuid --mkfs-extraopts "-b 4096"\n']) + wks.flush() + cmd = "wic create %s -e core-image-minimal -o %s" % (wks.name, self.resultdir) + runCmd(cmd) + wksname = os.path.splitext(os.path.basename(wks.name))[0] + images = glob(os.path.join(self.resultdir, "%s-*direct" % wksname)) + self.assertEqual(1, len(images)) - # verify partition size with wic - res = runCmd("export PARTED_SECTOR_SIZE=%d; parted -m %s unit b p" % (wic_sector_size, images[0]), - stderr=subprocess.PIPE) + sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') + # list partitions + result = runCmd("wic ls %s -n %s" % (images[0], sysroot)) + print(result.output) + # Deprecated message + 4 lines of output: header + 3 partitions + self.assertEqual(5, len(result.output.split('\n'))) - print(res.output) - # parse parted output which looks like this: - # BYT;\n - # /var/tmp/wic/build/tmpgjzzefdd-202410281021-sda.direct:78569472B:file:4096:4096:gpt::;\n - # 1:139264B:1187839B:1048576B::emptyfat:msftdata; - # 2:1187840B:149270527B:148082688B:ext4:rofs-a:; - # 3:149270528B:297353215B:148082688B:ext4:primary:; - disk_info = res.output.splitlines()[1] - # Check sector sizes - sector_size_logical = int(disk_info.split(":")[3]) - sector_size_physical = int(disk_info.split(":")[4]) - self.assertEqual(wic_sector_size, sector_size_logical, "Logical sector size is not %d." % wic_sector_size) - self.assertEqual(wic_sector_size, sector_size_physical, "Physical sector size is not %d." % wic_sector_size) - - # It is a known issue with parsed that a 4K FAT partition does - # not have a recognized filesystem type of *fat. - part_info = res.output.splitlines()[2] - partname = part_info.split(":")[5] - parttype = part_info.split(":")[6] - self.assertEqual('emptyfat', partname) - self.assertEqual('msftdata;', parttype) - - part_info = res.output.splitlines()[3] - parttype = part_info.split(":")[4] - partname = part_info.split(":")[5] - self.assertEqual('ext4', parttype) - self.assertEqual('rofs-a', partname) - - part_info = res.output.splitlines()[4] - parttype = part_info.split(":")[4] - partname = part_info.split(":")[5] - self.assertEqual('ext4', parttype) - self.assertEqual('primary', partname) + # verify partition size with wic + res = runCmd("export PARTED_SECTOR_SIZE=%d; parted -m %s unit b p" % (wic_sector_size, images[0]), + stderr=subprocess.PIPE) - finally: - os.environ['PATH'] = oldpath + print(res.output) + # parse parted output which looks like this: + # BYT;\n + # /var/tmp/wic/build/tmpgjzzefdd-202410281021-sda.direct:78569472B:file:4096:4096:gpt::;\n + # 1:139264B:1187839B:1048576B::emptyfat:msftdata; + # 2:1187840B:149270527B:148082688B:ext4:rofs-a:; + # 3:149270528B:297353215B:148082688B:ext4:primary:; + disk_info = res.output.splitlines()[1] + # Check sector sizes + sector_size_logical = int(disk_info.split(":")[3]) + sector_size_physical = int(disk_info.split(":")[4]) + self.assertEqual(wic_sector_size, sector_size_logical, "Logical sector size is not %d." % wic_sector_size) + self.assertEqual(wic_sector_size, sector_size_physical, "Physical sector size is not %d." % wic_sector_size) + + # It is a known issue with parsed that a 4K FAT partition does + # not have a recognized filesystem type of *fat. + part_info = res.output.splitlines()[2] + partname = part_info.split(":")[5] + parttype = part_info.split(":")[6] + self.assertEqual('emptyfat', partname) + self.assertEqual('msftdata;', parttype) + + part_info = res.output.splitlines()[3] + parttype = part_info.split(":")[4] + partname = part_info.split(":")[5] + self.assertEqual('ext4', parttype) + self.assertEqual('rofs-a', partname) + + part_info = res.output.splitlines()[4] + parttype = part_info.split(":")[4] + partname = part_info.split(":")[5] + self.assertEqual('ext4', parttype) + self.assertEqual('primary', partname) def test_wic_sector_size_cli(self): """Test sector size handling via CLI option.""" - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") - - try: - bitbake('core-image-minimal') - - with NamedTemporaryFile("w", suffix=".wks") as wks: - wks.writelines( - ['bootloader --ptable gpt\n', - 'part --fstype vfat --fstype vfat --label emptyfat --size 1M\n', - 'part --fstype ext4 --source rootfs --label rofs-a\n', - 'part --fstype ext4 --source rootfs --use-uuid\n']) - wks.flush() - cmd = "wic create %s -e core-image-minimal -o %s --sector-size 4096" % (wks.name, self.resultdir) - runCmd(cmd) - wksname = os.path.splitext(os.path.basename(wks.name))[0] - images = glob(os.path.join(self.resultdir, "%s-*direct" % wksname)) - self.assertEqual(1, len(images)) + bitbake('core-image-minimal') - sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') - # list partitions - result = runCmd("wic ls %s -n %s --sector-size 4096" % (images[0], sysroot)) - print(result.output) - # 4 lines of output: header + 3 partitions - self.assertEqual(4, len(result.output.split('\n'))) + with NamedTemporaryFile("w", suffix=".wks") as wks: + wks.writelines( + ['bootloader --ptable gpt\n', + 'part --fstype vfat --fstype vfat --label emptyfat --size 1M\n', + 'part --fstype ext4 --source rootfs --label rofs-a\n', + 'part --fstype ext4 --source rootfs --use-uuid\n']) + wks.flush() + cmd = "wic create %s -e core-image-minimal -o %s --sector-size 4096" % (wks.name, self.resultdir) + runCmd(cmd) + wksname = os.path.splitext(os.path.basename(wks.name))[0] + images = glob(os.path.join(self.resultdir, "%s-*direct" % wksname)) + self.assertEqual(1, len(images)) - # verify partition size with parted output - res = runCmd("export PARTED_SECTOR_SIZE=%d; parted -m %s unit b p" % (4096, images[0]), - stderr=subprocess.PIPE) + sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') + # list partitions + result = runCmd("wic ls %s -n %s --sector-size 4096" % (images[0], sysroot)) + print(result.output) + # 4 lines of output: header + 3 partitions + self.assertEqual(4, len(result.output.split('\n'))) - print(res.output) - # parse parted output which looks like this: - # BYT;\n - # /var/tmp/wic/build/tmpgjzzefdd-202410281021-sda.direct:78569472B:file:4096:4096:gpt::;\n - # 1:139264B:1187839B:1048576B::emptyfat:msftdata; - # 2:1187840B:149270527B:148082688B:ext4:rofs-a:; - # 3:149270528B:297353215B:148082688B:ext4:primary:; - disk_info = res.output.splitlines()[1] - # Check sector sizes - sector_size_logical = int(disk_info.split(":")[3]) - sector_size_physical = int(disk_info.split(":")[4]) - self.assertEqual(4096, sector_size_logical, "Logical sector size is not 4096.") - self.assertEqual(4096, sector_size_physical, "Physical sector size is not 4096.") - - # It is a known issue with parsed that a 4K FAT partition does - # not have a recognized filesystem type of *fat. - part_info = res.output.splitlines()[2] - partname = part_info.split(":")[5] - parttype = part_info.split(":")[6] - self.assertEqual('emptyfat', partname) - self.assertEqual('msftdata;', parttype) - - part_info = res.output.splitlines()[3] - parttype = part_info.split(":")[4] - partname = part_info.split(":")[5] - self.assertEqual('ext4', parttype) - self.assertEqual('rofs-a', partname) - - part_info = res.output.splitlines()[4] - parttype = part_info.split(":")[4] - partname = part_info.split(":")[5] - self.assertEqual('ext4', parttype) - self.assertEqual('primary', partname) + # verify partition size with parted output + res = runCmd("export PARTED_SECTOR_SIZE=%d; parted -m %s unit b p" % (4096, images[0]), + stderr=subprocess.PIPE) - finally: - os.environ['PATH'] = oldpath + print(res.output) + # parse parted output which looks like this: + # BYT;\n + # /var/tmp/wic/build/tmpgjzzefdd-202410281021-sda.direct:78569472B:file:4096:4096:gpt::;\n + # 1:139264B:1187839B:1048576B::emptyfat:msftdata; + # 2:1187840B:149270527B:148082688B:ext4:rofs-a:; + # 3:149270528B:297353215B:148082688B:ext4:primary:; + disk_info = res.output.splitlines()[1] + # Check sector sizes + sector_size_logical = int(disk_info.split(":")[3]) + sector_size_physical = int(disk_info.split(":")[4]) + self.assertEqual(4096, sector_size_logical, "Logical sector size is not 4096.") + self.assertEqual(4096, sector_size_physical, "Physical sector size is not 4096.") + + # It is a known issue with parsed that a 4K FAT partition does + # not have a recognized filesystem type of *fat. + part_info = res.output.splitlines()[2] + partname = part_info.split(":")[5] + parttype = part_info.split(":")[6] + self.assertEqual('emptyfat', partname) + self.assertEqual('msftdata;', parttype) + + part_info = res.output.splitlines()[3] + parttype = part_info.split(":")[4] + partname = part_info.split(":")[5] + self.assertEqual('ext4', parttype) + self.assertEqual('rofs-a', partname) + + part_info = res.output.splitlines()[4] + parttype = part_info.split(":")[4] + partname = part_info.split(":")[5] + self.assertEqual('ext4', parttype) + self.assertEqual('primary', partname) class Wic2(WicTestCase): @@ -1483,47 +1427,41 @@ run_wic_cmd() { def test_extra_partition_space(self): native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools") - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") + with NamedTemporaryFile("w", suffix=".wks") as tempf: + tempf.write("bootloader --ptable gpt\n" \ + "part --ondisk hda --size 10M --extra-partition-space 10M --fstype=ext4\n" \ + "part --ondisk hda --fixed-size 20M --extra-partition-space 10M --fstype=ext4\n" \ + "part --source rootfs --ondisk hda --extra-partition-space 10M --fstype=ext4\n" \ + "part --source rootfs --ondisk hda --fixed-size 200M --extra-partition-space 10M --fstype=ext4\n") + tempf.flush() + + _, wicimg = self._get_wic(tempf.name) - try: - with NamedTemporaryFile("w", suffix=".wks") as tempf: - tempf.write("bootloader --ptable gpt\n" \ - "part --ondisk hda --size 10M --extra-partition-space 10M --fstype=ext4\n" \ - "part --ondisk hda --fixed-size 20M --extra-partition-space 10M --fstype=ext4\n" \ - "part --source rootfs --ondisk hda --extra-partition-space 10M --fstype=ext4\n" \ - "part --source rootfs --ondisk hda --fixed-size 200M --extra-partition-space 10M --fstype=ext4\n") - tempf.flush() - - _, wicimg = self._get_wic(tempf.name) - - res = runCmd("parted -m %s unit b p" % wicimg, - native_sysroot=native_sysroot, stderr=subprocess.PIPE) - - # parse parted output which looks like this: - # BYT;\n - # /var/tmp/wic/build/tmpfwvjjkf_-201611101222-hda.direct:200MiB:file:512:512:msdos::;\n - # 1:0.00MiB:200MiB:200MiB:ext4::;\n - partlns = res.output.splitlines()[2:] - - self.assertEqual(4, len(partlns)) - - # Test for each partitions that the extra part space exists - for part in range(0, len(partlns)): - part_file = os.path.join(self.resultdir, "selftest_img.part%d" % (part + 1)) - partln = partlns[part].split(":") - self.assertEqual(7, len(partln)) - self.assertRegex(partln[3], r'^[0-9]+B$') - part_size = int(partln[3].rstrip("B")) - start = int(partln[1].rstrip("B")) / 512 - length = part_size / 512 - runCmd("dd if=%s of=%s skip=%d count=%d" % - (wicimg, part_file, start, length)) - res = runCmd("dumpe2fs %s -h | grep \"^Block count\"" % part_file) - fs_size = int(res.output.split(":")[1].strip()) * 1024 - self.assertLessEqual(fs_size + 10485760, part_size, "part file: %s" % part_file) - finally: - os.environ['PATH'] = oldpath + res = runCmd("parted -m %s unit b p" % wicimg, + native_sysroot=native_sysroot, stderr=subprocess.PIPE) + + # parse parted output which looks like this: + # BYT;\n + # /var/tmp/wic/build/tmpfwvjjkf_-201611101222-hda.direct:200MiB:file:512:512:msdos::;\n + # 1:0.00MiB:200MiB:200MiB:ext4::;\n + partlns = res.output.splitlines()[2:] + + self.assertEqual(4, len(partlns)) + + # Test for each partitions that the extra part space exists + for part in range(0, len(partlns)): + part_file = os.path.join(self.resultdir, "selftest_img.part%d" % (part + 1)) + partln = partlns[part].split(":") + self.assertEqual(7, len(partln)) + self.assertRegex(partln[3], r'^[0-9]+B$') + part_size = int(partln[3].rstrip("B")) + start = int(partln[1].rstrip("B")) / 512 + length = part_size / 512 + runCmd("dd if=%s of=%s skip=%d count=%d" % + (wicimg, part_file, start, length)) + res = runCmd("dumpe2fs %s -h | grep \"^Block count\"" % part_file) + fs_size = int(res.output.split(":")[1].strip()) * 1024 + self.assertLessEqual(fs_size + 10485760, part_size, "part file: %s" % part_file) # TODO this test could also work on aarch64 @skipIfNotArch(['i586', 'i686', 'x86_64']) @@ -1836,45 +1774,39 @@ INITRAMFS_IMAGE = "core-image-initramfs-boot" testfile.write("test %s" % testfilename) testfile.close() - oldpath = os.environ['PATH'] - os.environ['PATH'] = get_bb_var("PATH", "wic-tools") + with NamedTemporaryFile("w", suffix=".wks") as wks: + wks.writelines([ + 'part / --source extra_partition --ondisk sda --sourceparams "name=foo" --align 4 --size 5M\n', + 'part / --source extra_partition --ondisk sda --label foo --align 4 --size 5M\n', + 'part / --source extra_partition --ondisk sda --fstype=vfat --uuid e7d0824e-cda3-4bed-9f54-9ef5312d105d --align 4 --size 5M\n', + 'part / --source extra_partition --ondisk sda --fstype=ext4 --label bar --align 4 --size 5M\n', + 'bootloader --ptable gpt\n', + ]) + wks.flush() + _, wicimg = self._get_wic(wks.name) - try: - with NamedTemporaryFile("w", suffix=".wks") as wks: - wks.writelines([ - 'part / --source extra_partition --ondisk sda --sourceparams "name=foo" --align 4 --size 5M\n', - 'part / --source extra_partition --ondisk sda --label foo --align 4 --size 5M\n', - 'part / --source extra_partition --ondisk sda --fstype=vfat --uuid e7d0824e-cda3-4bed-9f54-9ef5312d105d --align 4 --size 5M\n', - 'part / --source extra_partition --ondisk sda --fstype=ext4 --label bar --align 4 --size 5M\n', - 'bootloader --ptable gpt\n', - ]) - wks.flush() - _, wicimg = self._get_wic(wks.name) - - result = runCmd("wic ls %s -n %s" % (wicimg, sysroot)) - partls = result.output.split('\n')[1:] - - # Assert the number of partitions is correct - self.assertEqual(4, len(partls), msg="Expect 4 partitions, not %s" % result.output) - - # Fstype column from 'wic ls' should be fstype as given in the part command - for part_id, part_fs in enumerate(["fat16", "fat16", "fat16", "ext4"]): - self.assertIn(part_fs, partls[part_id]) - - # For each partition, assert expected files exist - for part, part_glob in enumerate([ - ["bar.conf"], - ["foo.conf"], - ["foobar.conf", "foobar2.conf", "bar3.conf", "bar4.conf"], - ["bar.conf", "bar2.conf"], - ]): - for part_file in part_glob: - result = runCmd("wic ls %s:%d/%s -n %s" % (wicimg, part + 1, part_file, sysroot)) - self.assertEqual(0, result.status, msg="File '%s' not found in the partition #%d" % (part_file, part)) + result = runCmd("wic ls %s -n %s" % (wicimg, sysroot)) + partls = result.output.split('\n')[1:] - self.remove_config(config) - finally: - os.environ['PATH'] = oldpath + # Assert the number of partitions is correct + self.assertEqual(4, len(partls), msg="Expect 4 partitions, not %s" % result.output) + + # Fstype column from 'wic ls' should be fstype as given in the part command + for part_id, part_fs in enumerate(["fat16", "fat16", "fat16", "ext4"]): + self.assertIn(part_fs, partls[part_id]) + + # For each partition, assert expected files exist + for part, part_glob in enumerate([ + ["bar.conf"], + ["foo.conf"], + ["foobar.conf", "foobar2.conf", "bar3.conf", "bar4.conf"], + ["bar.conf", "bar2.conf"], + ]): + for part_file in part_glob: + result = runCmd("wic ls %s:%d/%s -n %s" % (wicimg, part + 1, part_file, sysroot)) + self.assertEqual(0, result.status, msg="File '%s' not found in the partition #%d" % (part_file, part)) + + self.remove_config(config) def test_fs_types(self): """Test filesystem types for empty and not empty partitions""" From patchwork Fri Jul 24 09:01:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93432 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 9B4B9C531F9 for ; Fri, 24 Jul 2026 09:02:17 +0000 (UTC) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.15306.1784883729375680366 for ; Fri, 24 Jul 2026 02:02:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=GbigbS2t; spf=pass (domain: gmail.com, ip: 209.85.222.172, mailfrom: twoerner@gmail.com) Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-92e6a434cabso9978785a.1 for ; Fri, 24 Jul 2026 02:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883728; x=1785488528; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=9TSewrfmfMIhtf4lzYMy50xL9GAckCJvPSGTmvkHtag=; b=GbigbS2tPtrJn8ARYm1lYVAikZzoJlJDWozvBEnN0DR7Qq1pLjOhDfOEaBp2hC6lZh KajmaGp5PoCDnUhpupY9Hl3wxbGzR3ft6mYNhSQuqaoCGUioxyS7OUXjYFVTck8xH6BE +xvnaTmfmMBA++11SjIquKGMMvihTu2O3flu0T9oW5dSKC2RZ1AyvVIu+wsAh7HBNJ9y DnHsXUL/rjtfoRTxu3vXCwzlQ1830HHmFmSxb/cE8TD3JKkW3xgWEtdqLiaNV14TGzHY PSNX9YP9kdna9GEuF8EtrWfDQ4QQhsp5YQP1R87z5kshKdgtoc9i7ZvwIiK+QB50vpUe VCKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883728; x=1785488528; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=9TSewrfmfMIhtf4lzYMy50xL9GAckCJvPSGTmvkHtag=; b=faaulkhmQ0kvTnlJlA55+BCWIzCCh74iJYGPnxMq+4F62f76VFXmMfZC5gGOwkk5PF u1oxLze7HdgVObpvj6Jn47F8xohNztbSlGJCPIVJ0JeV/ZPhe9+th/HXLS+k72h9/y2F XJSW1YaLZWqj5mDXxRuC9UZsbUbDbS+suVwbwE5rX/be9fg/+xCGQIaPyHbTrPHI4rLp kgvtBl9dOcq/iGKpZ7EAHuIIE818hIKw3h+5fBLBi57g/6Q2JdcdVnUX/66ALTMIBICu tSdMVITFno30DI70EDXpzdyXmXhP0HB3TNE5nyQqlcKa6UUVTwZ9b3jh0nz8hduujpqV Rz8A== X-Gm-Message-State: AOJu0YzYrWej1ijolXLFWbI6LgbI5i43pb9s/1x7cbQCiQ46KfeiUQJM Jh+AFJszqPr+fkYj4Il4ucvjGIxti9bRXQJf6zQ1MQdcCt+nQzVyWdYmJ+QbQg== X-Gm-Gg: AR+sD10bItOaoZOaN7ozC+2f0s3Yanu8jqj73OphPq3SBmOI8xwOXu2XKiknEac22Mc 403R5sibiMs2rEV0Gii8LuCOL53ry7hLldnZYRYP66Ze2B+1O5GpKa/gH2DXhw6YNHMZsPhFiqB 4Vtwi8U9TIVAEFnDlG5+EuGKsMBLwLbQGYZOOVrhKYeQMw2KgS+KqV12hn2byZwq2Ou4WhYlLTy UdPIDq38J1Q6TZqV8nzvh9NB+QgYYtFiMDKvRrDZLhbRnyKN8pWcPebqfResnKDLqawllTaUOS/ KiR6EwKNHZnwI4AjfJEBORJ5kcwUHp2bWoZkhSdDaTbliVTbgDUiMyARYB5lIBldtQQ8Z5f6gKz ZiZQHjmWP+OXVX4zs8T8O7UR2oSF49OnywUqaNo+SdUi+BNFHmUCeEurHq30ZakOPbKz8dMbVlU owxP8c9PpP+9sdIu0+MEShpVyGgHDWizOCCxsSGGRS4qRw X-Received: by 2002:a05:620a:2793:b0:92e:cac7:96e6 with SMTP id af79cd13be357-931038edbdcmr618712585a.58.1784883728214; Fri, 24 Jul 2026 02:02:08 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.02.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:06 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 05/10] nativesdk-packagegroup-sdk-host: add an SDK_FEATURES lever Date: Fri, 24 Jul 2026 05:01:41 -0400 Message-ID: <20260724090146.19924-6-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241915 Add SDK_FEATURES, a mechanism for optionally adding features to a standalone SDK, in the same spirit as DISTRO_FEATURES, MACHINE_FEATURES and IMAGE_FEATURES: a configuration adds a feature to the list and gets the corresponding additions, and a developer reads the setting and knows exactly what is being included. This commit only introduces the variable (defaulting to empty) and documents it; the features that consume it are wired up separately. An empty default changes nothing on its own. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - split out from the v3 "add wic via a new SDK_FEATURES lever" patch: this patch now introduces only the SDK_FEATURES variable and its documentation, defaulting to empty, with the individual features added in their own patches --- meta/conf/bitbake.conf | 1 + meta/conf/documentation.conf | 1 + 2 files changed, 2 insertions(+) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index bdf37d0da247..8f590ed374f0 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -898,6 +898,7 @@ OES_BITBAKE_CONF = "1" MACHINE_FEATURES:append = " ${@oe.utils.filter_default_features('MACHINE_FEATURES', d)}" SDK_MACHINE_FEATURES ?= "" +SDK_FEATURES ?= "" DISTRO_FEATURES:append = " ${@oe.utils.filter_default_features('DISTRO_FEATURES', d)}" diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf index 842cf31739de..42c8327e10ff 100644 --- a/meta/conf/documentation.conf +++ b/meta/conf/documentation.conf @@ -361,6 +361,7 @@ SANITY_TESTED_DISTROS[doc] = "A list of the host distribution identifiers that t SDK_ARCH[doc] = "The target architecture for the SDK." SDK_DEPLOY[doc] = "The directory set up and used by the populate_sdk_base to which the SDK is deployed." SDK_DIR[doc] = "The parent directory used by the OpenEmbedded build system when creating SDK output." +SDK_FEATURES[doc] = "The list of optional features to add to the standalone SDK's host tools. Analogous to IMAGE_FEATURES but for the SDK host side." SDK_NAME[doc] = "The base name for SDK output files." SDK_OUTPUT[doc] = "The location used by the OpenEmbedded build system when creating SDK output." SDKIMAGE_FEATURES[doc] = "Equivalent to IMAGE_FEATURES. However, this variable applies to the SDK generated from an image using the command 'bitbake -c populate_sdk imagename'." From patchwork Fri Jul 24 09:01:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93435 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 C375FC531FC for ; Fri, 24 Jul 2026 09:02:17 +0000 (UTC) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15483.1784883730607822831 for ; Fri, 24 Jul 2026 02:02:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=P0F9OStn; spf=pass (domain: gmail.com, ip: 209.85.160.174, mailfrom: twoerner@gmail.com) Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-5276d598b96so1286801cf.3 for ; Fri, 24 Jul 2026 02:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883729; x=1785488529; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=O8EzNSpOqM2FmVVnwe3PUfKapgHThuKUK0fzLdAJSDo=; b=P0F9OStnWE5qK/GlKnhe3sal6XkGPcV5DfQbG/EuGOn7eIUO8tOnV0+Rrh4zGFq1Mb LIfMZAa3TWkVt4whgq78p6T4rl3OHU+AA4rx3EngWHg2Zr+0WAwRK7W7Q6dR7F2zWdnD S2Tt5IldOK9Terp9oIAsRnfUAgTduGeZuNnYV6p65devKsgX8Li01IDn0MmvoQXja9ei 7TXeXxAe2ExssxRokCNOZ31EqGHdC61o0mQvBBmIlFkz3MlX5utNGN7DKxn8jXoJDk3s RcBGZaRbjkbYv3RxBerhIUd1iQMd3hhCNHk302UXzo9d6Ram6MNEJ3eoItLD7/4JTihD 72hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883729; x=1785488529; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=O8EzNSpOqM2FmVVnwe3PUfKapgHThuKUK0fzLdAJSDo=; b=FwE4rDx0NKfPYaqzEgbvfc4Xa5P7T0x+EsN20odkT92Ryi+M1dDKH+8fnDpOTJXJQ3 Q141XvlbseX0koy/Fh0A2HSNtUnDARGXtZ1hlgl38A/JvdiqEUFW3bw/9dlcP7woeQRt qEqXbzfAXOYwIXrOaXGalNUGDKqU99YI8blyNRHfF5KyDr84/HyWm+xeNIVdXR+ySQxB 2pIrXTvD9WGX9u/po60WSRqGtuJ6Yd/xaA32WoBFl/bhSB8XGWJ2xpq36xfe5XS9xi5d ESPQ9cN00zvs36EUPXtK2o3Kl997bs4QRGxprF9WnSDkv9E0btjasiXE+5b6vMXeqTmC 396g== X-Gm-Message-State: AOJu0Yw4RbApizhwLTAtq0vhEpbwzAMEeYjsnLynH/imhoZbTrOwEpMM fAMx9Al1Iky9HCJ7Z+JQUY9kofiT4ozIFvPK1bj3ukf6k7DHAHYrbnrvyWMPDA== X-Gm-Gg: AR+sD10i/JJrfY7VHQv/A7Eb3TNyIZZ718hnupEBMUcmpZtEbjGg1dofb5gBm1/cq5H w9nF4/QKFXVWsXuMsybaPHINCCo9UooMPphJ+auX6Ue9TpiMx8OfAcqVJUcjbeEqWwYDGa8Txli gR5PW0+7n7hWKXpMPvjD8VTq7Uuu+5+H9YdYIp+fhgTSANpg09VUgM17eB5HzG4v/PpkqJ8Sywa m6ubDxHiosHI6/ZoGK27hODCVajLauQagoh+RMHy4qO+JfDdP76pLwdvedDQc+wKP9l4gY3ye89 RIibLdCfdf4MpG/yx96Ux/5KRr4TyVJ9dQxgUmteuzd7kfdc/O1igJGerBB/hi4QgToVqkNz3Uz PKlz9iffbaRiWBSDZ8dx/zKMEkj7TiqSLlT6+fjHz/adJLfKZE4aa+FoDykHl4krthxpMsJ7BZ2 8WKdOBpUxfwE8KJdm18m9Tppk4Ec20hemp4Q6eShkC0a1x X-Received: by 2002:ac8:5894:0:b0:528:3d62:16bc with SMTP id d75a77b69052e-5283ded65f2mr62281621cf.54.1784883729378; Fri, 24 Jul 2026 02:02:09 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.02.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:08 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 06/10] nativesdk-packagegroup-sdk-host: add wic to SDK_FEATURES Date: Fri, 24 Jul 2026 05:01:42 -0400 Message-ID: <20260724090146.19924-7-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241916 wic is useful from an installed SDK for assembling or inspecting a wic image, but adding it is not free: nativesdk-wic pulls in the tools it runs (parted, gptfdisk, dosfstools, mtools, bmaptool, grub, btrfs-tools, squashfs-tools, e2fsprogs, util-linux, tar, erofs-utils, and syslinux on x86). Most SDKs do not need any of that, so wic should not be in the host packagegroup unconditionally. Gate wic in the host packagegroup on the "wic" SDK feature, which is not enabled by default. A configuration that wants wic in its SDK adds the "wic" feature to SDK_FEATURES and gets a working wic, together with the tools it invokes, in the SDK. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - split out from the v3 "add wic via a new SDK_FEATURES lever" patch: this patch now only wires wic to the "wic" SDK feature --- .../packagegroups/nativesdk-packagegroup-sdk-host.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb index 51e48f250b19..c2974a57fe3e 100644 --- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb @@ -29,6 +29,7 @@ RDEPENDS:${PN} = "\ nativesdk-bison \ nativesdk-flex \ nativesdk-perl-module-integer \ + ${@bb.utils.contains('SDK_FEATURES', 'wic', 'nativesdk-wic', '', d)} \ " RDEPENDS:${PN}:darwin = "\ From patchwork Fri Jul 24 09:01:43 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93434 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 0A57DC53209 for ; Fri, 24 Jul 2026 09:02:18 +0000 (UTC) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.15307.1784883733282703800 for ; Fri, 24 Jul 2026 02:02:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=gjKAb2Bw; spf=pass (domain: gmail.com, ip: 209.85.219.54, mailfrom: twoerner@gmail.com) Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-907ae240ac3so813566d6.0 for ; Fri, 24 Jul 2026 02:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883732; x=1785488532; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=V3gloWwIQQanvt+2PnmBBPZXsya3UgNuZ7SjKxGH1n0=; b=gjKAb2BwSSmf3+mrhZZfzzD3bpjLUFCDLaA4/LF4a//0TQAuhqfX6kvgDjx6RU6TnO cft73oJMn7xdWZ77jOB/B4KCq7Ipp166x82jzXJIvI7xykoFIi+lJFWjpRgdUxEMiglp /crj6+rfzfn28CiaQ6tl6Oq93ShJyUfpZN/vtovbPXjaDlc4zJBAX/MheYs9J+0vYBkr g0InE3+druc82H5xNU7ugkzww7il/f2Oi/vkHeG0dKsajmphOIldRLFEMsY62QnjAYMU zlE1qxoi9+KNxc1h9V4R9LOWZiYlXHuGv4gUQRLSBqw8KQQOnDwWmLTAVSPNA2ChHxT2 UohQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883732; x=1785488532; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=V3gloWwIQQanvt+2PnmBBPZXsya3UgNuZ7SjKxGH1n0=; b=kthsiWcicXpyulzT09wkYi6hMpc4Gh2kh/xL09AboAtLHjQulqWzNvvL9VPebhQS9r FGkLv+Zv1Jpv0I+WIpvUhS1Lnt3m8wM2xIpwXnc4aO/stqqXS41JbXq/lNyj84O35zQc r5rajmX99S+1MXXVUUtJUn9hTAPcjx8Ow7MkZN1E46QXD56CPKL73f5yRR4OYx/KnsnE 4e/lXL3s2Ro26voN8W/XwmnqNwsSlnzLg74ZvQEd9AcF3IRgdWQxnx9t5GjazVOnDcfE m72NnKT/PB1gaGWAk+rGWQnUVHjyWf0CBFSA5eRBP8oujCWFbPkc7ADvI9hb4TL6TbPP mT4g== X-Gm-Message-State: AOJu0YxA7zUNQvuyXQhklG4wDtkyvQGhnoiSoxOegdMVgqiQ7qqUKjec zEIRcGHVu7ARaWE2JnowD9cElc5NFrp60B5HmACo6tIHAnjA+RXDF0e3ye9vPQ== X-Gm-Gg: AR+sD11CrqxJIzcj/8K6PM+eeNjz0m1/D+MuacA5CKTm5hSAoXPDuQFjWTzmvGYlvRh gsLDkQxySLPwt8hJRbfTU5GSB++Krardp8DYMbTYo7a2gu0D+J58nCy5lcoimLSN12ZL9RqdqDF OXD4jINIxCqDavL/2HMVIv8e4znOmXoXSw3lpFLAnYvnfUpCyURtSkrLKNSiyz6yrULRh6t6q6d LUtJTKZfqrzlLoEQIMU98Y/mskb+CJOAG+W/fmOTCQrDe/4aRC6cE6xuG1FaVybPFNY4wjnEqtb UWgcBO4CMq5YWpLx+flzs177YwXKMltu3IRfCDsJVGPHURBGQExcb7qWqes0pc7ma6rkdPwawS+ xqS90t6JYU3cnIDbNFSwD2Kfwl1W8o4oyqWuyfM2j96c6f/yUNfOOUNofb701iKCVG/crAkghnf w7no+EmdqXs25mM96SdfiGB7apGMHsv/3Qxfeaiuc6k0nl X-Received: by 2002:a05:6214:3f8f:b0:907:af42:ac86 with SMTP id 6a1803df08f44-907ca6649d3mr75933906d6.43.1784883732231; Fri, 24 Jul 2026 02:02:12 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.02.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:09 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 07/10] nativesdk-packagegroup-sdk-host: add an sbom SDK feature Date: Fri, 24 Jul 2026 05:01:43 -0400 Message-ID: <20260724090146.19924-8-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241917 Software composition tooling is useful to have in an SDK for generating or checking SPDX documents and scanning artifacts, but it is not needed by every SDK and pulls in a Python dependency chain, so it should be opt-in rather than always present. Add an "sbom" SDK feature that pulls in the SPDX and SBOM/CVE tools (nativesdk-python3-spdx-tools and nativesdk-python3-sbom-cve-check). It is not enabled by default; a configuration that wants it adds the "sbom" feature to SDK_FEATURES. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - reordered ahead of the default-on qemu and gdb features so the opt-in features are grouped together changes in v3: - new in v3 --- .../packagegroups/nativesdk-packagegroup-sdk-host.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb index c2974a57fe3e..31710a23969e 100644 --- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb @@ -30,6 +30,7 @@ RDEPENDS:${PN} = "\ nativesdk-flex \ nativesdk-perl-module-integer \ ${@bb.utils.contains('SDK_FEATURES', 'wic', 'nativesdk-wic', '', d)} \ + ${@bb.utils.contains('SDK_FEATURES', 'sbom', 'nativesdk-python3-spdx-tools nativesdk-python3-sbom-cve-check', '', d)} \ " RDEPENDS:${PN}:darwin = "\ From patchwork Fri Jul 24 09:01:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93433 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 204B3C53213 for ; Fri, 24 Jul 2026 09:02:18 +0000 (UTC) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.15308.1784883734503824641 for ; Fri, 24 Jul 2026 02:02:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=YnPRLTnz; spf=pass (domain: gmail.com, ip: 209.85.219.46, mailfrom: twoerner@gmail.com) Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-8f1a8e914a9so1977896d6.1 for ; Fri, 24 Jul 2026 02:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883733; x=1785488533; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=SCDX5OLyeuUFlcsHyIODBEz30VkYmr7EHg9pTF3hQaA=; b=YnPRLTnzI/MeLvZaKLP5I0bcNH5EpV8IGQxqPMq4hNCm8C4eXemRHbCptKWRlgYKvz T4vC/hEyAeeDuxQ/AWsTgSmLQndQwDMRU+fXT90dv+wJjEnnkhKLy2DSWgBB+VWKzdrM dKkJxQOusQ+GcUMXH/fYjOrSGZyTmVzfpljufezDrvO4kwdxctrMjVPQiNgj6hzYLjSr L6XOmc4qDpvG7cSoxliwKlqlaQR8Uf2LHCFnXnvoxV1mutC+H94ym22BvDsz1rrcFZVx E1Fgb1MtbNjdlrU2xXd7ZvXVHrzc/B+TwyTa8iiDHcUOIViyX+pwu0248uAIwwkNCycV RRKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883733; x=1785488533; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=SCDX5OLyeuUFlcsHyIODBEz30VkYmr7EHg9pTF3hQaA=; b=Wcm6q1leXqhbJZosJiq9XezldppWFb5tWjfAXxdXlSTOLyJGJDAFHDnCkF5RpPZAYK GXBUL44Hq/M+PAgbqMKz27w0HYEhMshcCDd3emwc7lfkyNFxNY8SD2SlrVHh1QgZZJM+ IzAq8lpRGPXZbkgfdFeC0FtEjWCWARxj9ZpoE7CIinWyMmASV6YPml1lyDfS2TfwAJi5 H2lO2Zi7NBTKAHsdqj0FRGgvuKUq2kUj6t3fsjPYyyMi9kmLeiF6LUlx8nEJFUfRYdGp TssPdqrDOWRER6WH5xqfgE8G6y0KbVXl/7U481++Bq5XbOS0r+mAno/YZ2FqScLZpCgz DhMA== X-Gm-Message-State: AOJu0YyivDmR0Ek1SMy0xagIrzXteihW6lA4NiKSmBSGlmEPfDUv2+op 5N8u2RfLA7v1cT5gK89LHeic9tIciBU/sAvI/qOMsx3Z1MMtcZpeA/dkcsHdIg== X-Gm-Gg: AR+sD10xTzbc7plHjipZyaLDrEzpdEzIeCnioVYsxKyzIi64717e0jNVahDFLnwXMVo hDRlOwKK5EbDeb2vZ/fxmnG0e6+IIG4HbqrHbpWjPgBhGAM7WlMncZD0W0K3iPU52v2PXaYzxY/ ggdxxtQd//lBavJmFqWkRqu/w6heJ39gvnb49bwiSGd1fRRErVLOoG8TiliUxpjxyB+J54AiDF7 nYDzZrHoX0Al9D9qMZsmgJ89fgU1Lv9uF3i7Jgu3yw4xU7ktMpDMFJDM9YX9ta+0slae+5BCHMl G9/vF+dTXYbhiLvZ0tQ+S0J/hstOJn0QyQAdTEhD7tjELz/omKje86rtVpp7I9eI02X0YFW76Wb uEx6xiX1XA/YubQTRnHI4RtdfzrQsw/WkTBNtLN6ndTZvYJm2Pnnc8gzX8OeLFsYa/DbSpmqFak VBnmi10r5ZyNO8XCWGs4ieDfKMHuuGU2WaKxvTugXBqkOwXWMiIHUfgoQ= X-Received: by 2002:ad4:5c8f:0:b0:907:83cb:4204 with SMTP id 6a1803df08f44-907ca2c753bmr71407286d6.14.1784883733396; Fri, 24 Jul 2026 02:02:13 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.02.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:12 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 08/10] nativesdk-packagegroup-sdk-host: add an lldb SDK feature Date: Fri, 24 Jul 2026 05:01:44 -0400 Message-ID: <20260724090146.19924-9-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241918 Some developers prefer lldb to gdb as their SDK host debugger. It is a large addition and not wanted by default, so make it opt-in. Add an "lldb" SDK feature that pulls in nativesdk-lldb. It is not enabled by default; a configuration that wants it adds the "lldb" feature to SDK_FEATURES. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - reordered ahead of the default-on qemu and gdb features so the opt-in features are grouped together changes in v3: - new in v3 --- .../packagegroups/nativesdk-packagegroup-sdk-host.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb index 31710a23969e..9e3190af2a56 100644 --- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb @@ -31,6 +31,7 @@ RDEPENDS:${PN} = "\ nativesdk-perl-module-integer \ ${@bb.utils.contains('SDK_FEATURES', 'wic', 'nativesdk-wic', '', d)} \ ${@bb.utils.contains('SDK_FEATURES', 'sbom', 'nativesdk-python3-spdx-tools nativesdk-python3-sbom-cve-check', '', d)} \ + ${@bb.utils.contains('SDK_FEATURES', 'lldb', 'nativesdk-lldb', '', d)} \ " RDEPENDS:${PN}:darwin = "\ From patchwork Fri Jul 24 09:01:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93431 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 80547C531FA for ; Fri, 24 Jul 2026 09:02:17 +0000 (UTC) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.15310.1784883736000812034 for ; Fri, 24 Jul 2026 02:02:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=nfgypGh1; spf=pass (domain: gmail.com, ip: 209.85.222.178, mailfrom: twoerner@gmail.com) Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-92e5c92c389so11106785a.3 for ; Fri, 24 Jul 2026 02:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883735; x=1785488535; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=8OC83y0DyZ4+a57PUswniWlbdvGBjhtYPOpxhEyrkRQ=; b=nfgypGh15e5Ftv8whH7yje7Mt5knboj8mJRcaXlSiz3iTL4QkawAHcf4XPWwNz8657 sYI/ZHLL5jcDxCJoJ+f1dWcsAZPzRGdtksJXxokD2HwEv3Ra9olXSiRY38XXQmMMU3iI jPlusayyxHdDUZLIdMBhhjhmk094CDMzNKEr7ocw5NExBo+sf3ovM2WqO+snfLfu+nxQ FkefChlkcD27q3mJJpztWLKngFXjVbzHD+MCYqzK0peS2JExwwLPvdbOJk+wnUhooEr3 EBu++dAYEg5dV0PpCn9nyRv+Xf00phNtu/TV0RK37PtnyKd648//vvxKZCVMidYuMXJY m/Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883735; x=1785488535; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=8OC83y0DyZ4+a57PUswniWlbdvGBjhtYPOpxhEyrkRQ=; b=RLoH8+P5dCP9zux3sVE+/7pDS2K6RC8+Td3BG8S7f176hCc/puA83Vy9p1z/y5dCah laHt7BM0vzrizXdGpMlIcF0lgyY9rC2MIMJmT/x7RDqPjhKDPNfD+0ul+nHg8R9tkxq2 VVuIxjbfuoYewToxye7IRKyWBEVSQI+Yqtz+ahJ9h/cG+ZuknF3uzyEz7RsV9C6XjM4D 4wep97CUXkKXGXSxb34+L0dLld2ZGA9vrarADWqnihA+W5sE4R3xnFnGTvNbIHzOZlpM pySRkfmibmYMK8gf54XbVXnh1lWf7mbEXsC0MHM5TMjV/mWdH+HwPBkhZxniVYrtk/+x CQjg== X-Gm-Message-State: AOJu0YwHPHm/z9hPfjL/HUTGrgAjkmwmEsR8v/fpUK9ZZiMYfuIAR9mg z5oO1pvxPU/x8ADLinYJbEtVybn1Q7cQyXH3UL0fRHmbDFGNssvB43gUpZBRqw== X-Gm-Gg: AR+sD128VlCEncBZG1EXg9+IovUw5x5RiMB6xJwsO9o7jLp13opvJ3oz0xFBT8gbPY3 ha/wYE6ny+dBq+TEeuQ4WU6C3pOEZqYtUsDZoE+fdHSDxpc06mzGCvz56mjonhV6lkov38+A0SF R2HsP0a7MQcZr71gGCXuedIIEGH1Yz8xaGLGmFMatvbVb2VegkTI90yHtk+wCUHlGqmHVk1HEkO ZKYZh/KTUIE/eMsRmrl2aDIC7ZBoyB7E3SbJIcsyFGspXrBw1z+4sMh3Cd9rEsCd/mum20ZozLM +qrlvzzSTTOAktBmQgSNyJr5ZavNR5unpQpPQUF3jHNdHmFIjJvb6Hx6UyrME78J5o8cGFTLQgF DZBPlCjwAYwf58eB1MstAlG9znlp/iGMRlOEfaMYSD6BDRtkndvfPNkuFAbH6I+NFHppZKkIoHg cEgpJMc/aEeyGplUorvrPSoiOYhJObkuEpsGqf8/IxYi98 X-Received: by 2002:a05:620a:c4d:b0:92e:e7c9:615b with SMTP id af79cd13be357-9310384ef71mr651192585a.18.1784883734761; Fri, 24 Jul 2026 02:02:14 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.02.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:13 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 09/10] nativesdk-packagegroup-sdk-host: gate qemu behind SDK_FEATURES Date: Fri, 24 Jul 2026 05:01:45 -0400 Message-ID: <20260724090146.19924-10-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241919 qemu (with its helper) is added to every standalone SDK on the architectures where it builds. It is only useful for running target binaries on the host via qemu-usermode, which not every SDK user wants, and it is a large thing to carry when they do not. Move it behind the "qemu" SDK feature, which is enabled by default so an unmodified configuration still gets qemu exactly as before on the same architectures; the architecture guard is retained. A configuration that does not want it removes the "qemu" feature from SDK_FEATURES. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - reordered after the opt-in features (wic, sbom, lldb); the default-on features (qemu, gdb) now come last changes in v3: - new in v3 --- meta/conf/bitbake.conf | 2 +- .../packagegroups/nativesdk-packagegroup-sdk-host.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 8f590ed374f0..f96ede6d88df 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -898,7 +898,7 @@ OES_BITBAKE_CONF = "1" MACHINE_FEATURES:append = " ${@oe.utils.filter_default_features('MACHINE_FEATURES', d)}" SDK_MACHINE_FEATURES ?= "" -SDK_FEATURES ?= "" +SDK_FEATURES ?= "qemu" DISTRO_FEATURES:append = " ${@oe.utils.filter_default_features('DISTRO_FEATURES', d)}" diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb index 9e3190af2a56..bf9de4201810 100644 --- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb @@ -13,7 +13,7 @@ PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" # build some recent linux kernels (5.14+) for arm RDEPENDS:${PN} = "\ nativesdk-pkgconfig \ - ${@'nativesdk-qemu nativesdk-qemu-helper' if d.getVar('SDK_ARCH') in ['x86_64', 'aarch64', 'ppc64', 'ppc64le', 'riscv64', 'loongarch64', 'mips64', 's390x', 'sparc64'] else ''} \ + ${@'nativesdk-qemu nativesdk-qemu-helper' if bb.utils.contains('SDK_FEATURES', 'qemu', True, False, d) and d.getVar('SDK_ARCH') in ['x86_64', 'aarch64', 'ppc64', 'ppc64le', 'riscv64', 'loongarch64', 'mips64', 's390x', 'sparc64'] else ''} \ nativesdk-pseudo \ nativesdk-unfs3 \ nativesdk-opkg \ From patchwork Fri Jul 24 09:01:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 93436 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 5515AC53214 for ; Fri, 24 Jul 2026 09:02:18 +0000 (UTC) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.15311.1784883737677542981 for ; Fri, 24 Jul 2026 02:02:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=YOeo8Ym2; spf=pass (domain: gmail.com, ip: 209.85.160.176, mailfrom: twoerner@gmail.com) Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-5218927884fso2150861cf.3 for ; Fri, 24 Jul 2026 02:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784883736; x=1785488536; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=X/xgf8Sm+URt/P+p6d+plDT5mBLAasEaTOJF6IDMfSs=; b=YOeo8Ym2XsXbgqxOI2x9LG4izDe6qFLz68ljVUHJY0ZKc05p5FS8rFitee5n3CFa+3 huV0ay/V4FoP8DbVQ2Aj+07Uiel/OUG2SHTz2k9tTKj4+32KeecUAy3YDGjQ8LNStMRQ l+di0RTrTlfVwcOls3e/lqSijDAIkp182SJ+rxN2mAJpg6tnVkNBqiJZy/XrEuZOb8uK GU6J2bLIyghwCIo4VL9iora2R5LVg4ZDcRYx9PJku3Ca0Yu4ObUwwF0CDFXTPcpZZhcv AC3JrlyZeDQNeOyXrrA07pu4fddCH1vmxIRvCZfXWOFs8CxGQbsrqe/834eyH+MY70Hf UcOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784883737; x=1785488537; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=X/xgf8Sm+URt/P+p6d+plDT5mBLAasEaTOJF6IDMfSs=; b=ajJWrYsC66DuwTOQ+zCbqfvsHz4JLevpdlObSyvnNWgIOwQrMLCT7yGqnbD12p8oY/ VWNjxuTqVYmN6GkUtNmPQ4HrFy4fZw03PHave3QrQ+VxOGjLfVwfkHkAtOkJi1XfqW/M 2MHzh/S6jwsBKffN7Cn//oAluON9NyUbPCoTfFsfD77gXvU0zaSD36TATi2cMTP3UU1M WTcqYA9EKJ3TmQrjnBkkFz9IOK4OVr5OXVmRfAsjyxR1uamaI7YD74SRjGqfAwGqzPQM AU/0RSqFepS1tPhFYUnvEAsLvskYgf50VgDbRAF17d1rleKb7oxTr0hYiuIUIRNwNe2b QdRg== X-Gm-Message-State: AOJu0YyDn63+QuJ4IHGvlsbfBgrS6jxnqXuiuto/HljAaJrtfWqDEm2f 5nqXgqpt+SQxzer2+omEI+TMBlyNUoGAn/b2jkLEqfVOuF2NehEQcgdsRkh8Iw== X-Gm-Gg: AR+sD10SF4KS1hvY1GncI6tmubLkXjbUKypPFqy5ETstfqYj6tAYK3QzdN5/7LMDXtd ZYVxD8fHtrk+pGWzIZ74yDYuh4H7ZHXl8M85jxBJiZpKv5o21/BJqY09LLlvhe+ba14ecbem3J+ SDmLTRKKxiACgQsW9JstKjAO6N37K54UKzZL/DGFUCWuAZS7fCbLwXhoDHCyo80BIZobf6BzpiE xruE6xkSHtzKVzEHivDWBL5edBbNV8Xrr4TYuT9KSA+xbgwZxeAbuX5Rs4SBo5HmmxFzaI4UTsq LqYZb32yiGnalCsN/oZxpdRO0ZFw8I/6/33VO3/Y6AMq/TlJ/RXJjS9mMf2PWzE4JFx68IsZ3Jq 1adjnb987ZNEdduTLsVxkBONJwbKU6YoTVTfxakS4mTGdfIU6DqKS9qI2kSAsxszr6DpzvLI7WV 52RK3uMcT5+1I6yOG9+AgcdfTw5uu7VITi3v0vJhitvTVY X-Received: by 2002:a05:622a:5d4:b0:517:7188:c47a with SMTP id d75a77b69052e-5283ddd1685mr64884561cf.2.1784883736553; Fri, 24 Jul 2026 02:02:16 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907baa27cf1sm63968326d6.46.2026.07.24.02.02.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 02:02:15 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH v4 10/10] packagegroup-cross-canadian: gate gdb behind SDK_FEATURES Date: Fri, 24 Jul 2026 05:01:46 -0400 Message-ID: <20260724090146.19924-11-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260724090146.19924-1-twoerner@gmail.com> References: <20260724090146.19924-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Jul 2026 09:02:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241920 The cross-canadian gdb is added to every SDK's toolchain packagegroup unconditionally. A host cross-debugger is part of what most people expect from an SDK, but it is also large, and an SDK built only to compile does not need it. Move it behind the "gdb" SDK feature, which is enabled by default so an unmodified configuration still gets the cross gdb exactly as before; binutils and gcc remain unconditional, as a cross-compiler is intrinsic to an SDK. A configuration that wants a compile-only SDK removes the "gdb" feature from SDK_FEATURES. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner --- changes in v4: - reordered after the opt-in features (wic, sbom, lldb); the default-on features (qemu, gdb) now come last changes in v3: - new in v3 --- meta/conf/bitbake.conf | 2 +- meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index f96ede6d88df..5716b7176ebd 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -898,7 +898,7 @@ OES_BITBAKE_CONF = "1" MACHINE_FEATURES:append = " ${@oe.utils.filter_default_features('MACHINE_FEATURES', d)}" SDK_MACHINE_FEATURES ?= "" -SDK_FEATURES ?= "qemu" +SDK_FEATURES ?= "gdb qemu" DISTRO_FEATURES:append = " ${@oe.utils.filter_default_features('DISTRO_FEATURES', d)}" diff --git a/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb b/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb index 49c075eb1166..9db3cfa28831 100644 --- a/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +++ b/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb @@ -13,7 +13,7 @@ GDB = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" RDEPENDS:${PN} = "\ ${@all_multilib_tune_values(d, 'BINUTILS')} \ ${@all_multilib_tune_values(d, 'GCC')} \ - ${@all_multilib_tune_values(d, 'GDB')} \ + ${@all_multilib_tune_values(d, 'GDB') if bb.utils.contains('SDK_FEATURES', 'gdb', True, False, d) else ''} \ meta-environment-${MACHINE} \ "