Skip to content

Instantly share code, notes, and snippets.

@bart0sh
Created August 14, 2015 14:15
Show Gist options
  • Save bart0sh/c3155ab9d007e7c6df3f to your computer and use it in GitHub Desktop.
Save bart0sh/c3155ab9d007e7c6df3f to your computer and use it in GitHub Desktop.
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index cc789fc..b7a9e8c 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -142,6 +142,14 @@ IMAGE_CMD_ubi = "multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}" "${UBI_VOLNAM
IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"
+
+IMAGE_CMD_wic () {
+ out=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}
+ wic create ${FILE_DIRNAME}/${IMAGE_BASENAME}.wks -e ${IMAGE_BASENAME} -o $out/
+ mv $out/build/${IMAGE_BASENAME}*.direct $out.wic
+ rm -rf $out/
+}
+
EXTRA_IMAGECMD = ""
inherit siteinfo
@@ -170,6 +178,7 @@ IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native"
IMAGE_DEPENDS_ubi = "mtd-utils-native"
IMAGE_DEPENDS_ubifs = "mtd-utils-native"
IMAGE_DEPENDS_multiubi = "mtd-utils-native"
+IMAGE_DEPENDS_wic = "parted-native dosfstools-native mtools-native"
# This variable is available to request which values are suitable for IMAGE_FSTYPES
IMAGE_TYPES = " \
@@ -189,6 +198,7 @@ IMAGE_TYPES = " \
vdi \
qcow2 \
elf \
+ wic \
"
COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment