summaryrefslogtreecommitdiff
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2010-05-18 14:46:33 +0100
committerJoshua Lock <josh@linux.intel.com>2010-05-19 12:20:08 +0100
commit5e07bc91281969d54896dd0a13e3d6134e432027 (patch)
tree1ec4ee7f783cf1351bcae5cfb791d92cab4ea363 /meta/classes/kernel.bbclass
parent53d98d76fd05e3f9204f27788eaadf34a7fb1b7f (diff)
downloadopenembedded-core-5e07bc91281969d54896dd0a13e3d6134e432027.tar.gz
openembedded-core-5e07bc91281969d54896dd0a13e3d6134e432027.tar.bz2
openembedded-core-5e07bc91281969d54896dd0a13e3d6134e432027.zip
kernel.bbclass: fix installing of kernels 2.6.34 and above
Changes merged from upstream to cope with changes to directory structures in recent kernels when building for x86 Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass39
1 files changed, 22 insertions, 17 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 6f8ee31ffc..6963184881 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -107,45 +107,50 @@ kernel_do_install() {
fi
kerneldir=${D}/kernel/
- ASMDIR=`readlink include/asm`
- mkdir -p $kerneldir/include/$ASMDIR
- cp -fR include/$ASMDIR/* $kerneldir/include/$ASMDIR/
+ if [ -e include/asm ] ; then
+ # This link is generated only in kernel before 2.6.33-rc1, don't stage it for newer kernels
+ ASMDIR=`readlink include/asm`
+
+ mkdir -p $kerneldir/include/$ASMDIR
+ cp -fR include/$ASMDIR/* $kerneldir/include/$ASMDIR/
+ fi
+
# Kernel 2.6.27 moved headers from includes/asm-${ARCH} to arch/${ARCH}/include/asm
if [ -e arch/${ARCH}/include/asm/ ] ; then
- cp -fR arch/${ARCH}/include/asm/* $kerneldir/include/$ASMDIR/
+ if [ -e include/asm ] ; then
+ cp -fR arch/${ARCH}/include/asm/* $kerneldir/include/$ASMDIR/
+ fi
install -d $kerneldir/arch/${ARCH}/include
cp -fR arch/${ARCH}/* $kerneldir/arch/${ARCH}/
# Check for arch/x86 on i386
elif [ -d arch/x86/include/asm/ ]; then
+ mkdir -p $kerneldir/include/asm-x86/
cp -fR arch/x86/include/asm/* $kerneldir/include/asm-x86/
install -d $kerneldir/arch/x86/include
cp -fR arch/x86/* $kerneldir/arch/x86/
fi
- rm -f $kerneldir/include/asm
- ln -sf $ASMDIR $kerneldir/include/asm
+ if [ -e include/asm ] ; then
+ rm -f $kerneldir/include/asm
+ ln -sf $ASMDIR $kerneldir/include/asm
+ fi
mkdir -p $kerneldir/include/asm-generic
cp -fR include/asm-generic/* $kerneldir/include/asm-generic/
- mkdir -p $kerneldir/include/linux
- cp -fR include/linux/* $kerneldir/include/linux/
-
- mkdir -p $kerneldir/include/net
- cp -fR include/net/* $kerneldir/include/net/
-
- mkdir -p $kerneldir/include/pcmcia
- cp -fR include/pcmcia/* $kerneldir/include/pcmcia/
-
- for entry in drivers/crypto drivers/media include/media include/acpi include/sound include/video include/scsi include/trace; do
+ for entry in drivers/crypto drivers/media include/generated include/linux include/net include/pcmcia include/media include/acpi include/sound include/video include/scsi include/trace include/mtd include/rdma include/drm include/xen; do
if [ -d $entry ]; then
mkdir -p $kerneldir/$entry
cp -fR $entry/* $kerneldir/$entry/
fi
done
+ if [ -f include/Kbuild ]; then
+ cp -fR include/Kbuild $kerneldir/include
+ fi
+
if [ -d drivers/sound ]; then
# 2.4 alsa needs some headers from this directory
mkdir -p $kerneldir/include/drivers/sound
@@ -309,7 +314,7 @@ python populate_packages_prepend () {
dvar = bb.data.getVar('PKGD', d, 1)
if not dvar:
- bb.error("D not defined")
+ bb.error("PKGD not defined")
return
kernelver = bb.data.getVar('KERNEL_VERSION', d, 1)