From: Darren Hart <darren.hart@intel.com>
To: Yocto Project <yocto@yoctoproject.org>,
raj.khem@gmail.com, koen@dominion.thruhere.net,
kergoth@gmail.com, martin.jansa@gmail.com,
Bruce Ashfield <bruce.ashfield@windriver.com>,
Tom Zanussi <tom.zanussi@intel.com>,
Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: Re: [PATCH 3/3] image_types: Ensure /init exists for cpio rootfs archives
Date: Wed, 28 Dec 2011 15:52:43 -0800 [thread overview]
Message-ID: <4EFBABCB.3000203@intel.com> (raw)
In-Reply-To: <fbed4e9f94ed9bd1bb5a9c8fa37113e325f89371.1325115602.git.dvhart@linux.intel.com>
Apologies, this should have gone to oe-core :/
I will forward there.
On 12/28/2011 03:45 PM, Darren Hart wrote:
> In order for the kernel to accept an initramfs as a rootfs,
> it must have /init - even if it is an empty file. Touch /init
> to ensure it exists for cpio and cpio.gz image types.
>
> When used with initrd and rootfs=/dev/ram0, this allows the
> cpio and cpio.gz images to be used as the rootfs.
>
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> ---
> meta/classes/image_types.bbclass | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index 6893e38..ebff0ba 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -110,8 +110,14 @@ 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 = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)"
> -IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz)"
> +IMAGE_CMD_cpio () {
> + touch ${IMAGE_ROOTFS}/init
> + cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
> +}
> +IMAGE_CMD_cpio.gz () {
> + touch ${IMAGE_ROOTFS}/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}"
>
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2011-12-28 23:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-28 23:45 [PATCH V3 0/3] New distribution definition for poky-tiny Darren Hart
2011-12-28 23:45 ` [PATCH 1/3] distro: Add POKY_DEFAULT_EXTRA_R* variables Darren Hart
2011-12-28 23:45 ` [PATCH 2/3] distro: Add poky-tiny distro definition Darren Hart
2012-01-04 0:19 ` Khem Raj
2012-01-04 16:16 ` Darren Hart
2012-01-04 16:31 ` Chris Larson
2012-01-04 13:56 ` Leon Woestenberg
2012-01-04 14:12 ` Richard Purdie
2011-12-28 23:45 ` [PATCH 3/3] image_types: Ensure /init exists for cpio rootfs archives Darren Hart
2011-12-28 23:52 ` Darren Hart [this message]
2011-12-28 23:54 ` [PATCH] " Darren Hart
2011-12-29 17:39 ` Chris Larson
2011-12-30 8:25 ` Andrea Adami
2011-12-30 23:18 ` Darren Hart
2012-01-03 14:57 ` Andrea Adami
2012-01-04 0:07 ` Saul Wold
2012-01-04 23:49 ` Andrea Adami
2012-01-05 0:05 ` Andrea Adami
2012-01-05 12:30 ` Richard Purdie
2012-01-05 23:36 ` Darren Hart
2012-01-06 1:00 ` Andrea Adami
2012-01-06 1:10 ` Andrea Adami
2012-01-06 10:57 ` Richard Purdie
2012-01-06 22:58 ` Andrea Adami
2012-01-10 23:07 ` Andrea Adami
2012-01-10 23:28 ` Andrea Adami
2011-12-29 0:16 ` [PATCH V3 0/3] New distribution definition for poky-tiny Chris Larson
2011-12-29 1:07 ` Leon Woestenberg
2011-12-29 1:51 ` Chris Larson
2011-12-29 2:12 ` Leon Woestenberg
2012-01-06 11:52 ` Richard Purdie
2011-12-29 5:55 ` Darren Hart
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=4EFBABCB.3000203@intel.com \
--to=darren.hart@intel.com \
--cc=bruce.ashfield@windriver.com \
--cc=kergoth@gmail.com \
--cc=koen@dominion.thruhere.net \
--cc=martin.jansa@gmail.com \
--cc=raj.khem@gmail.com \
--cc=richard.purdie@linuxfoundation.org \
--cc=tom.zanussi@intel.com \
--cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.