[OE-core] [PATCH 12/17] image_types.bbclass: add wic image type

Ed Bartosh ed.bartosh at linux.intel.com
Wed Aug 26 15:54:53 UTC 2015


On Tue, Aug 25, 2015 at 05:46:08PM +0000, Ahsan, Noor wrote:
> Would it not be better approach if we don't hardcore the name and path and handle it using some variable?
> 
Can you elaborate a bit? I don't see any hardcoded names and paths in
this patch.

Regards,
Ed
> Noor
> 
> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf Of Ed Bartosh
> Sent: Tuesday, August 25, 2015 2:04 PM
> To: openembedded-core at lists.openembedded.org
> Subject: [OE-core] [PATCH 12/17] image_types.bbclass: add wic image type
> 
> wic image type is used to produce partitioned images.
> 
> Image configuration should be stored in either <recipe>.<machine>.wks or <recipe>.wks file.
> .wks file should be put to the same location as image recipe and have the same name.
> 
> [YOCTO #7672]
> 
> Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
> ---
>  meta/classes/image_types.bbclass | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index 8547574..cdd66ff 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -154,6 +154,16 @@ 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}
> +	wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.${MACHINE}.wks
> +	[ -e $wks ] || wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.wks
> +	[ -e $wks ] || bbfatal "Kiskstart file $wks doesn't exist"
> +	BUILDDIR=${TOPDIR} wic create $wks --vars ${STAGING_DIR_TARGET}/imgdata/ -e ${IMAGE_BASENAME} -o $out/
> +	mv $out/build/${IMAGE_BASENAME}*.direct $out.rootfs.wic
> +	rm -rf $out/
> +}
> +
>  EXTRA_IMAGECMD = ""
>  
>  inherit siteinfo
> @@ -182,6 +192,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"
>  
>  # This variable is available to request which values are suitable for IMAGE_FSTYPES  IMAGE_TYPES = " \ @@ -201,6 +212,7 @@ IMAGE_TYPES = " \
>      vdi \
>      qcow2 \
>      elf \
> +    wic wic.gz wic.bz2 wic.lzma \
>  "
>  
>  COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum"
> --
> 2.1.4
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
--
Regards,
Ed



More information about the Openembedded-core mailing list