* initramfs support in Yocto
@ 2012-03-02 9:59 Luo Zhenhua-B19537
2012-03-02 16:06 ` Darren Hart
0 siblings, 1 reply; 5+ messages in thread
From: Luo Zhenhua-B19537 @ 2012-03-02 9:59 UTC (permalink / raw)
To: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 83 bytes --]
Hello all,
Does Yocto support initramfs build?
Best Regards,
Zhenhua
[-- Attachment #2: Type: text/html, Size: 4779 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: initramfs support in Yocto
2012-03-02 9:59 initramfs support in Yocto Luo Zhenhua-B19537
@ 2012-03-02 16:06 ` Darren Hart
2012-03-02 18:09 ` Jeremy Puhlman
2012-03-05 7:20 ` Joshua Immanuel
0 siblings, 2 replies; 5+ messages in thread
From: Darren Hart @ 2012-03-02 16:06 UTC (permalink / raw)
To: Luo Zhenhua-B19537; +Cc: yocto@yoctoproject.org
Hi Zhenhua,
On 03/02/2012 01:59 AM, Luo Zhenhua-B19537 wrote:
> Hello all,
>
> Does Yocto support initramfs build?
Can you be more specific about what you are looking for? When you build
an image with the cpio.gz image type, you can boot that as an initramfs
with the following kernel command line:
initrd=core-image-minimal-fri2.cpio.gz root=/dev/ram0
If you are looking for something beyond that, please elaborate.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: initramfs support in Yocto
2012-03-02 16:06 ` Darren Hart
@ 2012-03-02 18:09 ` Jeremy Puhlman
2012-03-05 7:20 ` Joshua Immanuel
1 sibling, 0 replies; 5+ messages in thread
From: Jeremy Puhlman @ 2012-03-02 18:09 UTC (permalink / raw)
To: Darren Hart; +Cc: yocto@yoctoproject.org
> Can you be more specific about what you are looking for? When you build
> an image with the cpio.gz image type, you can boot that as an initramfs
> with the following kernel command line:
>
> initrd=core-image-minimal-fri2.cpio.gz root=/dev/ram0
>
> If you are looking for something beyond that, please elaborate.
>
When most people refer to initramfs support it is compiling a built
image in to the kernel binary(e.g. CONFIG_INITRAMFS_SOURCE).
INITRAMFS_IMAGE
is part of the kernel class that should enable that in the build.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: initramfs support in Yocto
2012-03-02 16:06 ` Darren Hart
2012-03-02 18:09 ` Jeremy Puhlman
@ 2012-03-05 7:20 ` Joshua Immanuel
2012-03-05 16:41 ` Paul Eggleton
1 sibling, 1 reply; 5+ messages in thread
From: Joshua Immanuel @ 2012-03-05 7:20 UTC (permalink / raw)
To: Darren Hart; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]
Hello Darren,
On Fri, 2012-03-02 at 08:06 -0800, Darren Hart wrote:
> Can you be more specific about what you are looking for? When you
> build an image with the cpio.gz image type, you can boot that as an
> initramfs
I find that the cpio.gz image is created by running the following
command inside ${IMAGE_ROOTFS} directory
find . | cpio -o -H newc | gzip -c -9 > <name>.rootfs.cpio.gz
Which means that the initramfs contains the entire rootfs filesystem
including the user space applications and its related libraries. In my
case, the size of initramfs comes to 158 MB gziped to 66 MB. Most of the
files in that are not needed for initramfs.
Is there any other way of reducing the initramfs size?
Moreover, I find in the bootimg.bbclass file that it uses the INITRD and
ROOTFS variables to generate the final hddimage. And these variables
usage is seen in image-live.bbclass. So, I guess I have to point the
INITRD variable (in my custom-image.bb recipe and inherit bootimg) to
core-image-minimal-initramfs generated file in deploy images directory.
The problem with this method is
1. It uses syslinux bootloader by default. I have to override this
class (bootimg.bbclass) if I want to use something else like
grub.
2. I have to point the INITRD variable directly to the initramfs
file in the deploy directory. (like
${DEPLOY_DIR_IMAGE}/core-image-minimal-initramfs-${MACHINE}.cpio.gz). But the cpio.gz extension is based on machine configuration. It can be cpio, cpio.gz, cpio.xz or cpio.lzma
This is what I inferred from the existing code. Am I completely in the
wrong direction?
Regards
Joshua
--
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: initramfs support in Yocto
2012-03-05 7:20 ` Joshua Immanuel
@ 2012-03-05 16:41 ` Paul Eggleton
0 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-03-05 16:41 UTC (permalink / raw)
To: yocto; +Cc: Darren Hart
On Monday 05 March 2012 12:50:03 Joshua Immanuel wrote:
> Which means that the initramfs contains the entire rootfs filesystem
> including the user space applications and its related libraries. In my
> case, the size of initramfs comes to 158 MB gziped to 66 MB. Most of the
> files in that are not needed for initramfs.
The recommendation here would be to use a separate recipe to produce the
intramfs image - we have an example of this in recipes-core/images/core-image-
minimal-initramfs.bb. This way you can fully control the content of the
initramfs independent of your root filesystem.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-05 16:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 9:59 initramfs support in Yocto Luo Zhenhua-B19537
2012-03-02 16:06 ` Darren Hart
2012-03-02 18:09 ` Jeremy Puhlman
2012-03-05 7:20 ` Joshua Immanuel
2012-03-05 16:41 ` Paul Eggleton
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.