summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2014-11-14 14:51:27 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-21 12:37:53 +0000
commitd1aced444f565e580ccc362a360625baae4a0aef (patch)
tree328db1b44e956b0c6708698e94a906d9aa74e4fa /meta/classes/kernel.bbclass
parent86893e4ea5896199a6f02f8475f4f17aa1124c37 (diff)
downloadpoky-d1aced444f565e580ccc362a360625baae4a0aef.tar.gz
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. (From OE-Core rev: 4b981e4fd5a4744d0d83053219274296e7785e77) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass23
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() {
223 # 223 #
224 224
225 echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion 225 echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion
226
227 # Copy files required for module builds
228 cp System.map $kerneldir/System.map-${KERNEL_VERSION}
229 cp Module.symvers $kerneldir/
230 cp .config $kerneldir/
231 mkdir -p $kerneldir/include/config
232 cp include/config/kernel.release $kerneldir/include/config/kernel.release
233
234 # As of Linux kernel version 3.0.1, the clean target removes
235 # arch/powerpc/lib/crtsavres.o which is present in
236 # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
237 if [ ${ARCH} = "powerpc" ]; then
238 mkdir -p $kerneldir/arch/powerpc/lib/
239 cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
240 fi
241
242 mkdir -p $kerneldir/include/generated/
243 cp -fR include/generated/* $kerneldir/include/generated/
244
245 if [ -d arch/${ARCH}/include/generated ]; then
246 mkdir -p $kerneldir/arch/${ARCH}/include/generated/
247 cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
248 fi
226} 249}
227do_install[prefuncs] += "package_get_auto_pr" 250do_install[prefuncs] += "package_get_auto_pr"
228 251