[oe] conf/kernel.bbclass: staging for linux >= 2.6.24 on x86 needs fixing
Richard Purdie
rpurdie at rpsys.net
Tue Feb 19 09:16:08 UTC 2008
On Tue, 2008-02-19 at 09:15 +0100, Jeremy Lainé wrote:
> Up until linux 2.6.23, for x86 archs we put arch/i386/Makefile* into
> staging, but it looks as though from 2.6.24 onwards we should be
> staging arch/x86/Makefile* instead.
>
> The attached patch works for me, but I am not sure this is the proper
> way to fix this as it introduces some arch-specific code in an
> otherwise generic bbclass. Any ideas?
>
> ============================================================
> --- classes/kernel.bbclass 3aa638c9a8de8e90342e08b530a40c8c2f120497
> +++ classes/kernel.bbclass 7b688b82d6be204068a4bdbb29bd16cfb63d7b2f
> @@ -128,6 +128,9 @@ kernel_do_stage() {
> if [ -e arch/${ARCH}/Makefile ]; then
> install -d ${STAGING_KERNEL_DIR}/arch/${ARCH}
> install -m 0644 arch/${ARCH}/Makefile* ${STAGING_KERNEL_DIR}/arch/${ARCH}
> + elif [ "${ARCH}" = "i386" -a -e arch/x86/Makefile ]; then
> + install -d ${STAGING_KERNEL_DIR}/arch/x86
> + install -m 0644 arch/x86/Makefile* ${STAGING_KERNEL_DIR}/arch/x86
> fi
> cp -fR include/config* ${STAGING_KERNEL_DIR}/include/
> install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE}
That solution looks fine to me. As mentioned on irc we also need to deal
with ARCH = x86_64 and rather than a big complex if clause I think its
simply easiest to use x86 as a fallback so:
elif [ -e arch/x86/Makefile ]; then
shouldn't cause any problems.
Maybe just add a comment about this being to catch the ARCH = i386 and
x86_64 cases so we remember why we did this in a years time :).
Cheers,
Richard
More information about the Openembedded-devel
mailing list