[oe] [patch] build kernel in output dir

Tom Rini tom_rini at mentor.com
Tue Mar 9 19:15:40 UTC 2010


On Tue, 2010-03-09 at 10:06 -0800, C Michael Sundius wrote:
> We build our kernel in an output directory so that the objects don't
> muck up our source directory. We do this since during development,
> most engineers just set up a link to their SCM Project directory
> containing the source rather than having bitbake copy all the files
> in to the ${S} directory.
> 
> I made some mods to the kernel.bbclass to allow us to build in the
> out directory and included it here in the attached patch (along w/ our
> own recipe for building the kernel). These mods *should* allow other
> kernel recipes to build unchanged.
> 
> I'd love to get comments on this, understanding that:
> 1) there might be a better way someone else is already using
> 2) that I've screwed stuff up
> 3) something else.
> 
> I'd also love to see this get pushed upstream if others find it useful..

As a concept, yay!  I'd make a few suggestions on implementation
however:
- B is the normal shorthand for where we build.  See gcc / gdb / etc for
examples of where $B != $S
- We should change $B to be something like, from the above example,
B="${WORKDIR}/build-${MACHINE}
- We should then always work like this, rather than conditionally (since
a kernel build where O=... fails is a bug, this should be fine).

-- 
Tom Rini <tom_rini at mentor.com>
Mentor Graphics Corporation




More information about the Openembedded-devel mailing list