Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] image_types.bbclass: refactor cpio images generation.
Date: Thu, 02 Feb 2012 09:52:28 -0800	[thread overview]
Message-ID: <4F2ACD5C.6000409@linux.intel.com> (raw)
In-Reply-To: <1327561790-10307-1-git-send-email-andrea.adami@gmail.com>

On 01/25/2012 11:09 PM, Andrea Adami wrote:
> * Add common check for the presence of an /init
> * symlink, being 'touch' would fail with it
> * and 'touch -h' is not yet generally supported
> * (depends on distro on build host).
>
> Signed-off-by: Andrea Adami<andrea.adami@gmail.com>
> ---
>   meta/classes/image_types.bbclass |   21 +++++++++++++++++----
>   1 files changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index 4908ed9..eef554d 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -115,16 +115,29 @@ IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS}&&  tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME
>   IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS}&&  tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ."
>   IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS}&&  tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ."
>   IMAGE_CMD_tar.xz = "cd ${IMAGE_ROOTFS}&&  tar --xz -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.xz ."
> -IMAGE_CMD_cpio () {
> +
> +CPIO_TOUCH_INIT () {
> +	if [ ! -L ${IMAGE_ROOTFS}/init ]
> +	then
>   	touch ${IMAGE_ROOTFS}/init
> +	fi
> +}
> +IMAGE_CMD_cpio () {
> +	${CPIO_TOUCH_INIT}
>   	cd ${IMAGE_ROOTFS}&&  (find . | cpio -o -H newc>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
>   }
>   IMAGE_CMD_cpio.gz () {
> -	touch ${IMAGE_ROOTFS}/init
> +	${CPIO_TOUCH_INIT}
>   	cd ${IMAGE_ROOTFS}&&  (find . | cpio -o -H newc | gzip -c -9>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz)
>   }
> -IMAGE_CMD_cpio.xz = "type cpio>/dev/null; cd ${IMAGE_ROOTFS}&&  (find . | cpio -o -H newc | xz -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK}>  ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.xz) ${EXTRA_IMAGECMD}"
> -IMAGE_CMD_cpio.lzma = "type cpio>/dev/null; cd ${IMAGE_ROOTFS}&&  (find . | cpio -o -H newc | xz --format=lzma -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK}>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD}"
> +IMAGE_CMD_cpio.xz () {
> +	${CPIO_TOUCH_INIT}
> +	cd ${IMAGE_ROOTFS}&&  (find . | cpio -o -H newc | xz -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK}>  ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.xz) ${EXTRA_IMAGECMD}
> +}
> +IMAGE_CMD_cpio.lzma () {
> +	${CPIO_TOUCH_INIT}
> +	cd ${IMAGE_ROOTFS}&&  (find . | cpio -o -H newc | xz --format=lzma -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK}>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD}
> +}
>
>   UBI_VOLNAME ?= "${MACHINE}-rootfs"
>

Merged into OE-core

Thanks
	Sau!



      reply	other threads:[~2012-02-02 18:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26  7:09 [PATCH 2/2] image_types.bbclass: refactor cpio images generation Andrea Adami
2012-02-02 17:52 ` Saul Wold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F2ACD5C.6000409@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox