[oe] Bug in kernel-arch.bbclass
Henning Heinold
heinold at inf.fu-berlin.de
Tue Mar 24 09:35:20 UTC 2009
Hi,
while compiling 2.6.28 for wrap board(geodegx) I noticed that the asm-headers didnt install into staging.
After examine kernel-arch.bbclass and kernel.bblcass I found the following lines
kernel-arch.bbclass
def map_kernel_arch(a, d):
import bb, re
valid_archs = bb.data.getVar('valid_archs', d, 1).split()
if re.match('(i.86|athlon)$', a): return '386'
elif re.match('arm26$', a): return 'arm26'
elif re.match('armeb$', a): return 'arm'
elif re.match('mipsel$', a): return 'mips'
elif re.match('sh(3|4)$', a): return 'sh'
elif re.match('bfin', a): return 'blackfin'
elif a in valid_archs: return a
else:
bb.error("cannot map '%s' to a linux kernel architecture" % a)
export ARCH = "${@map_kernel_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}"
kernel.bbclass
kernel_do_stage() {
ASMDIR=`readlink include/asm`
mkdir -p ${STAGING_KERNEL_DIR}/include/$ASMDIR
cp -fR include/$ASMDIR/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
# 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/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
install -d ${STAGING_KERNEL_DIR}/arch/${ARCH}/include
cp -fR arch/${ARCH}/* ${STAGING_KERNEL_DIR}/arch/${ARCH}/
As you can see this can not work because the ARCH-variable is set to 386 and so the "-e arch/${ARCH}/include/asm/"
is not true. For backward compatiblity I attached a patch, which covers this problem.
Is this okay for checkin?
Bye Henning
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kernel_bbclass.patch
Type: text/x-diff
Size: 738 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20090324/59402dc5/attachment-0002.bin>
More information about the Openembedded-devel
mailing list