summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2024-02-22 19:55:27 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-24 16:10:23 +0000
commitee014ca524642c02295af505f6d02f538769ebc1 (patch)
treefb6fa38b657a47cc894e2315f0c1adcb225fb421 /meta/classes-recipe
parenta75218da7a4391bd32e48b941118da5f8300e6e5 (diff)
downloadpoky-ee014ca524642c02295af505f6d02f538769ebc1.tar.gz
wic: allow imager-specific filename extensions
Currently there is only one defined imager as part of oe-core's wic implementation: 'direct'. However, having a highly plugin-based design, wic allows users to define their own imagers (and sources). Therefore don't hard-code the filename extension of the imager output to be 'direct' (i.e. the default imager). Allow the extension to follow the name of the imager being used. A user can specify a custom imager via the WIC_CREATE_EXTRA_ARGS variable. If the user does not specify an imager, then 'direct' is assumed. (From OE-Core rev: dc5a7c76761ed47e0456228956de900d806063bb) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r--meta/classes-recipe/image_types_wic.bbclass19
1 files changed, 18 insertions, 1 deletions
diff --git a/meta/classes-recipe/image_types_wic.bbclass b/meta/classes-recipe/image_types_wic.bbclass
index 00620fdc9d..ce7125f6f1 100644
--- a/meta/classes-recipe/image_types_wic.bbclass
+++ b/meta/classes-recipe/image_types_wic.bbclass
@@ -71,7 +71,24 @@ IMAGE_CMD:wic () {
71 bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately." 71 bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
72 fi 72 fi
73 BUILDDIR="${TOPDIR}" PSEUDO_UNLOAD=1 wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" -w "$tmp_wic" ${WIC_CREATE_EXTRA_ARGS} 73 BUILDDIR="${TOPDIR}" PSEUDO_UNLOAD=1 wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" -w "$tmp_wic" ${WIC_CREATE_EXTRA_ARGS}
74 mv "$build_wic/$(basename "${wks%.wks}")"*.direct "$out.wic" 74
75 # look to see if the user specifies a custom imager
76 IMAGER=direct
77 eval set -- "${WIC_CREATE_EXTRA_ARGS} --"
78 while [ 1 ]; do
79 case "$1" in
80 --imager|-i)
81 shift
82 IMAGER=$1
83 ;;
84 --)
85 shift
86 break
87 ;;
88 esac
89 shift
90 done
91 mv "$build_wic/$(basename "${wks%.wks}")"*.${IMAGER} "$out.wic"
75} 92}
76IMAGE_CMD:wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR" 93IMAGE_CMD:wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR"
77do_image_wic[cleandirs] = "${WORKDIR}/build-wic" 94do_image_wic[cleandirs] = "${WORKDIR}/build-wic"