Openembedded Devel Discussions
 help / color / mirror / Atom feed
* generate a named kernel in ${DEPLOY_DIR_IMAGE}
@ 2010-09-28 16:54 Frans Meulenbroeks
  2010-09-28 17:20 ` Denys Dmytriyenko
  2010-09-28 23:23 ` Andrea Adami
  0 siblings, 2 replies; 11+ messages in thread
From: Frans Meulenbroeks @ 2010-09-28 16:54 UTC (permalink / raw)
  To: openembedded-devel

Hi,

As I needed to generate two different kernels for the same machine I
had some kind of problem (as emailed yesterday).
For now I've solved it as follows:

I created a 2nd recipe (in an overlay):
linux-small_2.6.34.bb
this one essentially only requires linux_2.6.34.bb and sets S to the linux_${PN}
Then I can just add a dir linux-small and add the small defconfig in it.

That way bitbake linux-small should give me the 2nd kernel.
And actually it builds the kernel but this one is also packaged in a
kernel-*.ipk.
I could have made two different machines, but that seemed somewhat
overkill, so in the end I decided to modify do_install_append in
linux.inc.

This function currently reads:

do_install_append() {
	oe_runmake headers_install
INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION}
ARCH=$ARCH
}

And I just added a line:
    cp ${D}/boot/uImage ${DEPLOY_DIR_IMAGE}/uImage-${PN}

That way both kernels end up with different names in the deploy dir.
In the image recipe I can then just copy them in a post process
command to the proper location.
(btw that is also why I went for uImage-${PN} and not for
uImage-${PN}-${KERNEL_VERSION}, the kernel version is not known in the
image recipe so it is much harder to copy the right/latest uImage to
the kernel.

Rationale for typing this message is threefold:
- first of all I wanted to record and share what I have done, so
others can use it
- secondly I would appreciate feedback on my solutions (and maybe
someone sees a way to improve it)
- and lastly I would like to inquire if people feel the above line
would be a nice addition to the stock linux.inc. If so I'l happily
prepare a patch.

Your feedback is appreciated.

Frans



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-09-29 19:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 16:54 generate a named kernel in ${DEPLOY_DIR_IMAGE} Frans Meulenbroeks
2010-09-28 17:20 ` Denys Dmytriyenko
2010-09-28 17:59   ` Frans Meulenbroeks
2010-09-28 23:23 ` Andrea Adami
2010-09-29  6:28   ` Frans Meulenbroeks
2010-09-29 17:47     ` Denys Dmytriyenko
2010-09-29 19:19       ` Frans Meulenbroeks
2010-09-29  6:54   ` Frans Meulenbroeks
2010-09-29 11:44     ` Andrea Adami
2010-09-29 13:10       ` Frans Meulenbroeks
2010-09-29 15:18         ` Andrea Adami

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox