summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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() {
107 fi 107 fi
108 108
109 kerneldir=${D}/kernel/ 109 kerneldir=${D}/kernel/
110 ASMDIR=`readlink include/asm`
111 110
112 mkdir -p $kerneldir/include/$ASMDIR 111 if [ -e include/asm ] ; then
113 cp -fR include/$ASMDIR/* $kerneldir/include/$ASMDIR/ 112 # This link is generated only in kernel before 2.6.33-rc1, don't stage it for newer kernels
113 ASMDIR=`readlink include/asm`
114
115 mkdir -p $kerneldir/include/$ASMDIR
116 cp -fR include/$ASMDIR/* $kerneldir/include/$ASMDIR/
117 fi
118
114 # Kernel 2.6.27 moved headers from includes/asm-${ARCH} to arch/${ARCH}/include/asm 119 # Kernel 2.6.27 moved headers from includes/asm-${ARCH} to arch/${ARCH}/include/asm
115 if [ -e arch/${ARCH}/include/asm/ ] ; then 120 if [ -e arch/${ARCH}/include/asm/ ] ; then
116 cp -fR arch/${ARCH}/include/asm/* $kerneldir/include/$ASMDIR/ 121 if [ -e include/asm ] ; then
122 cp -fR arch/${ARCH}/include/asm/* $kerneldir/include/$ASMDIR/
123 fi
117 install -d $kerneldir/arch/${ARCH}/include 124 install -d $kerneldir/arch/${ARCH}/include
118 cp -fR arch/${ARCH}/* $kerneldir/arch/${ARCH}/ 125 cp -fR arch/${ARCH}/* $kerneldir/arch/${ARCH}/
119 126
120 # Check for arch/x86 on i386 127 # Check for arch/x86 on i386
121 elif [ -d arch/x86/include/asm/ ]; then 128 elif [ -d arch/x86/include/asm/ ]; then
129 mkdir -p $kerneldir/include/asm-x86/
122 cp -fR arch/x86/include/asm/* $kerneldir/include/asm-x86/ 130 cp -fR arch/x86/include/asm/* $kerneldir/include/asm-x86/
123 install -d $kerneldir/arch/x86/include 131 install -d $kerneldir/arch/x86/include
124 cp -fR arch/x86/* $kerneldir/arch/x86/ 132 cp -fR arch/x86/* $kerneldir/arch/x86/
125 fi 133 fi
126 134
127 rm -f $kerneldir/include/asm 135 if [ -e include/asm ] ; then
128 ln -sf $ASMDIR $kerneldir/include/asm 136 rm -f $kerneldir/include/asm
137 ln -sf $ASMDIR $kerneldir/include/asm
138 fi
129 139
130 mkdir -p $kerneldir/include/asm-generic 140 mkdir -p $kerneldir/include/asm-generic
131 cp -fR include/asm-generic/* $kerneldir/include/asm-generic/ 141 cp -fR include/asm-generic/* $kerneldir/include/asm-generic/
132 142
133 mkdir -p $kerneldir/include/linux 143 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
134 cp -fR include/linux/* $kerneldir/include/linux/
135
136 mkdir -p $kerneldir/include/net
137 cp -fR include/net/* $kerneldir/include/net/
138
139 mkdir -p $kerneldir/include/pcmcia
140 cp -fR include/pcmcia/* $kerneldir/include/pcmcia/
141
142 for entry in drivers/crypto drivers/media include/media include/acpi include/sound include/video include/scsi include/trace; do
143 if [ -d $entry ]; then 144 if [ -d $entry ]; then
144 mkdir -p $kerneldir/$entry 145 mkdir -p $kerneldir/$entry
145 cp -fR $entry/* $kerneldir/$entry/ 146 cp -fR $entry/* $kerneldir/$entry/
146 fi 147 fi
147 done 148 done
148 149
150 if [ -f include/Kbuild ]; then
151 cp -fR include/Kbuild $kerneldir/include
152 fi
153
149 if [ -d drivers/sound ]; then 154 if [ -d drivers/sound ]; then
150 # 2.4 alsa needs some headers from this directory 155 # 2.4 alsa needs some headers from this directory
151 mkdir -p $kerneldir/include/drivers/sound 156 mkdir -p $kerneldir/include/drivers/sound
@@ -309,7 +314,7 @@ python populate_packages_prepend () {
309 314
310 dvar = bb.data.getVar('PKGD', d, 1) 315 dvar = bb.data.getVar('PKGD', d, 1)
311 if not dvar: 316 if not dvar:
312 bb.error("D not defined") 317 bb.error("PKGD not defined")
313 return 318 return
314 319
315 kernelver = bb.data.getVar('KERNEL_VERSION', d, 1) 320 kernelver = bb.data.getVar('KERNEL_VERSION', d, 1)