]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel: copy defconfig to {B} vs {S}
authorBruce Ashfield <bruce.ashfield@windriver.com>
Wed, 20 Jul 2011 20:22:31 +0000 (16:22 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Jul 2011 10:47:44 +0000 (11:47 +0100)
For kernel's that use a split source/object build the copy
of defconfig to {S} in the base kernel class is problematic.
The previous solution for this was to override the do_configure
of the base kernel class in a subclass. While this is still
a viable/valid option, it does mean that changes to the base
do_configure will be missed.

The solution to this is to copy a defconfig to {B} which is
typically the same as {S}, so most kernel recipes won't see or
care about this change.

With this change in place, linux-yocto.bbclass can drop its
override of do_configure.

Tested with linux-yocto and oe linux recipes.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
meta/classes/kernel-yocto.bbclass
meta/classes/kernel.bbclass

index 98272fcc3b4c0a4386efc80b6d396738a8c61d76..a374df13bee3b7c130ba0f268e772c4631b6e353 100644 (file)
@@ -118,12 +118,6 @@ python do_kernel_configcheck() {
     bb.plain( "%s" % result )
 }
 
-# overrides the base kernel_do_configure, since we don't want all the
-# defconfig processing in there
-kernel_do_configure() {
-        yes '' | oe_runmake oldconfig
-}
-
 
 # Ensure that the branches (BSP and meta) are on the locatios specified by
 # their SRCREV values. If they are NOT on the right commits, the branches
index 2e36e86eb8f189e7f0d1729520024dbb3d18808b..9c492a3ecc84828c927b034b926495001f9bd40d 100644 (file)
@@ -181,8 +181,8 @@ sysroot_stage_all_append() {
 kernel_do_configure() {
        # Copy defconfig to .config if .config does not exist. This allows
        # recipes to manage the .config themselves in do_configure_prepend().
-       if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${S}/.config" ]; then
-               cp "${WORKDIR}/defconfig" "${S}/.config"
+       if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
+               cp "${WORKDIR}/defconfig" "${B}/.config"
        fi
        yes '' | oe_runmake oldconfig