[oe-commits] Darren Hart : kernel: restore crtsavres. o to enable building external modules on powerpc

git version control git at git.openembedded.org
Wed Aug 17 14:57:39 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: 2e83e6755441cb14bd907d306974338c15173189
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=2e83e6755441cb14bd907d306974338c15173189

Author: Darren Hart <dvhart at linux.intel.com>
Date:   Tue Aug 16 21:16:53 2011 -0700

kernel: restore crtsavres.o to enable building external modules on powerpc

Fixes [YOCTO #1276]

As of Linux kernel version 3.0.1, and much earlier, the make clean target
removes arch/powerpc/lib/crtsavres.o. As this object is present in
KBUILD_LDFLAGS_MODULE, it is required to build external modules, and should
therefor not be removed by make clean.

While I do not advocate fixing buggy kernels in the generic kernel classes,
we should probably account for this one in kernel.bbclass as it affects
such a long list of kernel versions.

Signed-off-by: Darren Hart <dvhart at linux.intel.com>
CC: Bruce Ashfield <bruce.ashfield at windriver.com>
CC: Tom Zanussi <tom.zanussi at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/kernel.bbclass |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 7dc9cc6..386b05e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -159,6 +159,13 @@ kernel_do_install() {
 	find $kerneldir -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \;
 	find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \;
 
+	# 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
+		cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+	fi
+
 	# Remove the following binaries which cause strip errors
 	# during do_package for cross-compiled platforms
 	bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \





More information about the Openembedded-commits mailing list