[oe] multiple kernels and images

Andrea Adami andrea.adami at gmail.com
Mon Sep 27 14:54:29 UTC 2010


On Mon, Sep 27, 2010 at 4:15 PM, Frans Meulenbroeks
<fransmeulenbroeks at gmail.com> wrote:
> Hi all,
>
> I'm faced with the following problem:
> I need two kernels for my machine. One kernel will be a lightweight
> kernel (to reduce loading time) which boots then flashes the real
> kernel to NAND.

It sounds like a perfect initramfs task: 1st kernel + initramfs (flash
tools and some scripts/binaries) will flash 2nd kernel

Give a look at the initramfs* images we have in OE.

>
> To create two images I tricked a little bit and created two recipes
> (using require of course).
> As these have different names (linux-A_2.6.34.bb and
> linux-B_2.6.34.bb) I can give them different dirs and different
> defconfigs
> (linux-A/defconfig resp linux-B/defconfig).
>
> So far so good, but how do I now get the right kernel in my sd card image.
> Basically both recipes create a package kernel, so adding kernel to
> the image does not work.
> Anyone an idea on how to fix this?

To do this I would add a third recipe 'xy-installer' depending on the
linux-bootflasher kernel and linux-flashme kernel. Booting from e.g.
SD card would just need the two files (both packaged together).

Regards

Andrea

>
> Additional remarks:
>
> I'm aware of multi-kernel.inc but that still seems to leave me with
> the problem how to add the kernel to my image
>
> I can also create a 2nd machine in which case maybe things can be made
> to work, but that seems a fairly ugly hack (and still might give me a
> selection problem).
> Hence looking for a better solution.
>
> BTW wouldn't it be better to have the linux recipes package things
> (also?) in linux-A_2.6.34-r1_${MACHINE}.ipk or something like that
> instead of kernel_2.6.34-r1_${MACHINE}.ipk.
> Then an image could explicitly state the kernel recipe it wants to use
> (and virtual/kernel could be used to specify the default kernel).
>
> Your ideas/feedback is appreciated.
>
> Thanks alot!
> Frans.
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>




More information about the Openembedded-devel mailing list