[PATCH v9 4/5] wic: move canned *wks files

Trevor Woerner
2026-04-03T18:36:16Z

When "wic create ..." is invoked with a bare *wks name (i.e. without the
`.wks` extension), wic calls engine.py:find_canned_images() to find the
fully qualified *wks file. This function searches every directory formed by:
- permutating all BBLAYERS with `/wic`
- permutating all BBLAYERS with `/scripts/lib/wic/canned-wks`
- checking `<scripts_path>/lib/wic/canned-wks`
Where `<scripts_path>` is the directory containing the wic program.

When wic is part of oe-core, the last search path succeeds in finding
the canned *wks files in `<topdir>/scripts/lib/wic/canned-wks` (since
the wic program is found in oe-core's `<topdir>/scripts` directory, and
`<topdir>/scripts` is not a BBLAYER).

However, once wic is removed from oe-core, this algorithm will not find
these bare *wks files in any of the above-mentioned search paths since
the oe-core layer will no longer be the home of the wic program, and the
canned *wks files are not located in any directory relative to BBLAYERS.

Since these *wks files are specific to oe-core's meta layer, they should
stay with this layer. Therefore move the *wks files so they exist in one
of the locations searched relative to oe-core/meta's BBLAYERS.

NOTE: this patch is in preparation for removing wic from oe-core
the wic oe-selftests work fine with this patch being added now

Reviewed-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Reviewed-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
changes in v9:
- continue to search scripts/lib/wic/canned-wks for *wks files
- commit message updated to reflect this change and to more clearly
explain how wic finds *wks files and why these files are moved

changes in v8:
- (v8 was sending sector-size cmdline patch)

changes in v7:
- (none)

changes in v6:
- re-ordered so that this patch occurs before wic is removed, thus
saving the commit history

changes in v5:
- rebase with master
- split patchset out again into individual, small patches

changes in v4:
- (skipped)

changes in v3:
- squashed into 1 large commit

changes in v2:
- (none)
---
{scripts/lib/wic/canned-wks => meta/wic}/common.wks.inc | 0
.../wic/canned-wks => meta/wic}/directdisk-bootloader-config.cfg | 0
.../wic/canned-wks => meta/wic}/directdisk-bootloader-config.wks | 0
{scripts/lib/wic/canned-wks => meta/wic}/directdisk-gpt.wks | 0
.../lib/wic/canned-wks => meta/wic}/directdisk-multi-rootfs.wks | 0
{scripts/lib/wic/canned-wks => meta/wic}/directdisk.wks | 0
{scripts/lib/wic/canned-wks => meta/wic}/efi-bootdisk.wks.in | 0
{scripts/lib/wic/canned-wks => meta/wic}/efi-uki-bootdisk.wks.in | 0
{scripts/lib/wic/canned-wks => meta/wic}/mkefidisk.wks | 0
{scripts/lib/wic/canned-wks => meta/wic}/mkhybridiso.wks | 0
{scripts/lib/wic/canned-wks => meta/wic}/qemuloongarch.wks | 0
{scripts/lib/wic/canned-wks => meta/wic}/qemuriscv.wks | 0
{scripts/lib/wic/canned-wks => meta/wic}/qemux86-directdisk.wks | 0
{scripts/lib/wic/canned-wks => meta/wic}/sdimage-bootpart.wks | 0
{scripts/lib/wic/canned-wks => meta/wic}/systemd-bootdisk.wks | 0
15 files changed, 0 insertions(+), 0 deletions(-)
rename {scripts/lib/wic/canned-wks => meta/wic}/common.wks.inc (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/directdisk-bootloader-config.cfg (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/directdisk-bootloader-config.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/directdisk-gpt.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/directdisk-multi-rootfs.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/directdisk.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/efi-bootdisk.wks.in (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/efi-uki-bootdisk.wks.in (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/mkefidisk.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/mkhybridiso.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/qemuloongarch.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/qemuriscv.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/qemux86-directdisk.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/sdimage-bootpart.wks (100%)
rename {scripts/lib/wic/canned-wks => meta/wic}/systemd-bootdisk.wks (100%)

diff --git a/scripts/lib/wic/canned-wks/common.wks.inc b/meta/wic/common.wks.inc
similarity index 100%
rename from scripts/lib/wic/canned-wks/common.wks.inc
rename to meta/wic/common.wks.inc
diff --git a/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg b/meta/wic/directdisk-bootloader-config.cfg
similarity index 100%
rename from scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg
rename to meta/wic/directdisk-bootloader-config.cfg
diff --git a/scripts/lib/wic/canned-wks/directdisk-bootloader-config.wks b/meta/wic/directdisk-bootloader-config.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/directdisk-bootloader-config.wks
rename to meta/wic/directdisk-bootloader-config.wks
diff --git a/scripts/lib/wic/canned-wks/directdisk-gpt.wks b/meta/wic/directdisk-gpt.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/directdisk-gpt.wks
rename to meta/wic/directdisk-gpt.wks
diff --git a/scripts/lib/wic/canned-wks/directdisk-multi-rootfs.wks b/meta/wic/directdisk-multi-rootfs.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/directdisk-multi-rootfs.wks
rename to meta/wic/directdisk-multi-rootfs.wks
diff --git a/scripts/lib/wic/canned-wks/directdisk.wks b/meta/wic/directdisk.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/directdisk.wks
rename to meta/wic/directdisk.wks
diff --git a/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in b/meta/wic/efi-bootdisk.wks.in
similarity index 100%
rename from scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
rename to meta/wic/efi-bootdisk.wks.in
diff --git a/scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in b/meta/wic/efi-uki-bootdisk.wks.in
similarity index 100%
rename from scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in
rename to meta/wic/efi-uki-bootdisk.wks.in
diff --git a/scripts/lib/wic/canned-wks/mkefidisk.wks b/meta/wic/mkefidisk.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/mkefidisk.wks
rename to meta/wic/mkefidisk.wks
diff --git a/scripts/lib/wic/canned-wks/mkhybridiso.wks b/meta/wic/mkhybridiso.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/mkhybridiso.wks
rename to meta/wic/mkhybridiso.wks
diff --git a/scripts/lib/wic/canned-wks/qemuloongarch.wks b/meta/wic/qemuloongarch.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/qemuloongarch.wks
rename to meta/wic/qemuloongarch.wks
diff --git a/scripts/lib/wic/canned-wks/qemuriscv.wks b/meta/wic/qemuriscv.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/qemuriscv.wks
rename to meta/wic/qemuriscv.wks
diff --git a/scripts/lib/wic/canned-wks/qemux86-directdisk.wks b/meta/wic/qemux86-directdisk.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/qemux86-directdisk.wks
rename to meta/wic/qemux86-directdisk.wks
diff --git a/scripts/lib/wic/canned-wks/sdimage-bootpart.wks b/meta/wic/sdimage-bootpart.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/sdimage-bootpart.wks
rename to meta/wic/sdimage-bootpart.wks
diff --git a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks b/meta/wic/systemd-bootdisk.wks
similarity index 100%
rename from scripts/lib/wic/canned-wks/systemd-bootdisk.wks
rename to meta/wic/systemd-bootdisk.wks
--
2.51.0