[oe] Bug in kernel-arch.bbclass
Khem Raj
raj.khem at gmail.com
Fri Mar 27 04:16:52 UTC 2009
On Tuesday 24 March 2009 02:35:20 Henning Heinold wrote:
> 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?
your patch installs like old dir structure, I wonder if it should install in arch/$ARCH/include too
>
>
> Bye Henning
>
--
Khem Raj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20090326/b94c5bd2/attachment-0002.sig>
More information about the Openembedded-devel
mailing list