diff mbox series

[v2,3/3] nativesdk-packagegroup-sdk-host: optionally add wic

Message ID 20260707144009.708407-4-twoerner@gmail.com
State New
Headers show
Series wic: give installed wic the tools it needs | expand

Commit Message

Trevor Woerner July 7, 2026, 2:40 p.m. UTC
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 long list
of host-side tools it might need (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 it should not be forced into the host packagegroup
unconditionally.

Add an SDK_INCLUDE_WIC knob, defaulting to "no", that gates
nativesdk-wic in the host packagegroup. A configuration that wants wic
in its SDK opts in with

  SDK_INCLUDE_WIC = "yes"

and gets a working wic, together with the tools it invokes, in the SDK;
the default SDK is unchanged.

AI-Generated: codex/claude-opus 4.8 (xhigh)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 .../packagegroups/nativesdk-packagegroup-sdk-host.bb        | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index 51e48f250b19..37218824171f 100644
--- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -9,6 +9,11 @@  inherit_defer nativesdk
 
 PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
 
+# wic is useful from an installed SDK for assembling or inspecting a wic
+# image, but it is not needed by every SDK, so it is opt-in. Set
+# SDK_INCLUDE_WIC = "yes" to add it (it pulls in the tools it invokes).
+SDK_INCLUDE_WIC ?= "no"
+
 # autoconf pulls in nativesdk-perl but perl-module-integer is needed to 
 # build some recent linux kernels (5.14+) for arm
 RDEPENDS:${PN} = "\
@@ -29,6 +34,7 @@  RDEPENDS:${PN} = "\
     nativesdk-bison \
     nativesdk-flex \
     nativesdk-perl-module-integer \
+    ${@'nativesdk-wic' if bb.utils.to_boolean(d.getVar('SDK_INCLUDE_WIC')) else ''} \
     "
 
 RDEPENDS:${PN}:darwin = "\