]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
wic: move canned *wks files
authorTrevor Woerner <twoerner@gmail.com>
Fri, 3 Apr 2026 18:35:40 +0000 (14:35 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 7 Apr 2026 21:05:58 +0000 (22:05 +0100)
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

[RP: Updated meta/wic -> meta/files/wic]
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
15 files changed:
meta/files/wic/common.wks.inc [moved from scripts/lib/wic/canned-wks/common.wks.inc with 100% similarity]
meta/files/wic/directdisk-bootloader-config.cfg [moved from scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg with 100% similarity]
meta/files/wic/directdisk-bootloader-config.wks [moved from scripts/lib/wic/canned-wks/directdisk-bootloader-config.wks with 100% similarity]
meta/files/wic/directdisk-gpt.wks [moved from scripts/lib/wic/canned-wks/directdisk-gpt.wks with 100% similarity]
meta/files/wic/directdisk-multi-rootfs.wks [moved from scripts/lib/wic/canned-wks/directdisk-multi-rootfs.wks with 100% similarity]
meta/files/wic/directdisk.wks [moved from scripts/lib/wic/canned-wks/directdisk.wks with 100% similarity]
meta/files/wic/efi-bootdisk.wks.in [moved from scripts/lib/wic/canned-wks/efi-bootdisk.wks.in with 100% similarity]
meta/files/wic/efi-uki-bootdisk.wks.in [moved from scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in with 100% similarity]
meta/files/wic/mkefidisk.wks [moved from scripts/lib/wic/canned-wks/mkefidisk.wks with 100% similarity]
meta/files/wic/mkhybridiso.wks [moved from scripts/lib/wic/canned-wks/mkhybridiso.wks with 100% similarity]
meta/files/wic/qemuloongarch.wks [moved from scripts/lib/wic/canned-wks/qemuloongarch.wks with 100% similarity]
meta/files/wic/qemuriscv.wks [moved from scripts/lib/wic/canned-wks/qemuriscv.wks with 100% similarity]
meta/files/wic/qemux86-directdisk.wks [moved from scripts/lib/wic/canned-wks/qemux86-directdisk.wks with 100% similarity]
meta/files/wic/sdimage-bootpart.wks [moved from scripts/lib/wic/canned-wks/sdimage-bootpart.wks with 100% similarity]
meta/files/wic/systemd-bootdisk.wks [moved from scripts/lib/wic/canned-wks/systemd-bootdisk.wks with 100% similarity]