@@ -2,13 +2,14 @@ SUMMARY = "A meta recipe to build native tools used by wic."
LICENSE = "MIT"
-DEPENDS = "\
- wic-native \
- parted-native gptfdisk-native dosfstools-native \
- mtools-native bmaptool-native grub-native cdrtools-native \
- btrfs-tools-native squashfs-tools-native pseudo-native \
- e2fsprogs-native util-linux-native tar-native erofs-utils-native \
- virtual/cross-binutils \
+require wic-tools.inc
+
+# wic itself, the shared WIC_TOOLS helpers as -native build dependencies,
+# plus the extras specific to building the native sysroot: native-only
+# cdrtools, pseudo and the cross binutils.
+DEPENDS = "wic-native \
+ ${@' '.join('%s-native' % t for t in d.getVar('WIC_TOOLS').split())} \
+ cdrtools-native pseudo-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"
new file mode 100644
@@ -0,0 +1,24 @@
+# Recipes providing the host-side tools wic may invoke at image-creation
+# time, as listed in wic's NATIVE_RECIPES table. Names are given without
+# a class suffix so they can be mapped to -native, nativesdk- or any
+# other variant as needed.
+#
+# This list is limited to tools that exist both as -native and as
+# nativesdk- packages. Tools that are not available in every variant
+# (for example native-only cdrtools) and architecture-gated tools (for
+# example syslinux) are intentionally left out and handled separately.
+
+WIC_TOOLS = "\
+ parted \
+ gptfdisk \
+ dosfstools \
+ mtools \
+ bmaptool \
+ grub \
+ btrfs-tools \
+ squashfs-tools \
+ e2fsprogs \
+ util-linux \
+ tar \
+ erofs-utils \
+"
wic invokes a range of host-side tools (parted, mkdosfs, mcopy, mkfs.*, grub-mkimage, ...) at image-creation time, depending on the partition types and bootloaders in a .wks file. The set wic could invoke is enumerated in its NATIVE_RECIPES table, and matches the helpers wic-tools lists in its DEPENDS. Refactor that helper list into a shared wic-tools.inc (WIC_TOOLS) and switch wic-tools to it, so the canonical list lives in one place and can be reused by other recipes that need the same set. AI-Generated: codex/claude-opus 4.8 (xhigh) Signed-off-by: Trevor Woerner <twoerner@gmail.com> --- meta/recipes-core/meta/wic-tools.bb | 15 ++++++++------- meta/recipes-core/meta/wic-tools.inc | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 meta/recipes-core/meta/wic-tools.inc