diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-11-14 14:51:27 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-20 11:24:03 +0000 |
commit | 4b981e4fd5a4744d0d83053219274296e7785e77 (patch) | |
tree | d45caedfb9238be839117f6aaacaa897f00d96ee | |
parent | 3b3f7e785e27990ba21bc7cd97289c826a9a95d1 (diff) | |
download | openembedded-core-4b981e4fd5a4744d0d83053219274296e7785e77.tar.gz openembedded-core-4b981e4fd5a4744d0d83053219274296e7785e77.tar.bz2 openembedded-core-4b981e4fd5a4744d0d83053219274296e7785e77.zip |
kernel: fix out of tree module builds
With the kernel build optimizations, we no longer copy the source from
the built kernel into the staging dir, since the kernel is unpacked and built
directly from the staging dir.
This means that a few build artifacts need to be restored to allow out of
tree modules to once again build.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/kernel.bbclass | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index bca34f4698..6eb87acf06 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -223,6 +223,29 @@ kernel_do_install() { # echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion + + # Copy files required for module builds + cp System.map $kerneldir/System.map-${KERNEL_VERSION} + cp Module.symvers $kerneldir/ + cp .config $kerneldir/ + mkdir -p $kerneldir/include/config + cp include/config/kernel.release $kerneldir/include/config/kernel.release + + # As of Linux kernel version 3.0.1, the clean target removes + # arch/powerpc/lib/crtsavres.o which is present in + # KBUILD_LDFLAGS_MODULE, making it required to build external modules. + if [ ${ARCH} = "powerpc" ]; then + mkdir -p $kerneldir/arch/powerpc/lib/ + cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o + fi + + mkdir -p $kerneldir/include/generated/ + cp -fR include/generated/* $kerneldir/include/generated/ + + if [ -d arch/${ARCH}/include/generated ]; then + mkdir -p $kerneldir/arch/${ARCH}/include/generated/ + cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/ + fi } do_install[prefuncs] += "package_get_auto_pr" |