[yocto] Need help for building kernel image with embedded initramfs.cpio

Gary Thomas gary at mlbassoc.com
Thu May 3 03:26:52 PDT 2012


On 2012-05-03 04:22, giovanni.pavoni at exorint.it wrote:
> Dear Sirs,
>
> for my cortex A8 based system, I am in the need to deploy
> a sort of "safe mode image" that should bootstrap only
> in case of system recovery.
>
> This image fits particularily well the model of a ramfs based system
> with contents such as core-image-minimal-mtdutils plus some tools addition.
>
> I defined a "myimage.bb" recipe for this image that generates a "myimage.cpio"
>
> However I am in the need to:
>
> 1. establish in myimage.bb a relation with virtual/kernel and ask to generate
> kernel modules only.
>
> 2. retrieve modules only from the kernel staging area and made them part of
> "myimage.cpio"
>
> 3. change the config of my kernel to add CONFIG_INITRAMFS_SOURCE = "myimage.cpio"
> and copy myimage.cpio from staging area to kernel build location.
>
> 4. build kernel and deploy the emitted uImage as "mykernel+myimage"
>
> Anyone can help with suggestions/guidelines and/or codesnips?

Why not use an 'initrd' image + kernel instead?  It's much simpler
to build and U-Boot has good support for this.  I use this method
all the time for just the scenario you mention.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------



More information about the yocto mailing list