public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] kernel-devsrc: Handle ppc crtsaves.o explictly for now
@ 2014-12-21 12:29 Richard Purdie
  2014-12-22  3:43 ` Bruce Ashfield
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2014-12-21 12:29 UTC (permalink / raw)
  To: openembedded-core

Resolve kernel module build failures for qemuppc by including crtsaves.o.

I'm not particularly happy to be doing this, it should perhaps be contained 
in the kernel-dev package. Until the overlap between kernel-devsrc and 
kernel-dev is resolved, this at least removed the regressions.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 2872f17..1557c27 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -46,6 +46,14 @@ do_install() {
         cd ${S}
         find . -type d -name '.git*' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
         oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts
+
+        # As of Linux kernel version 3.0.1, the clean target removes
+        # arch/powerpc/lib/crtsavres.o which is present in
+        # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
+        if [ ${ARCH} = "powerpc" ]; then
+                mkdir -p $kerneldir/arch/powerpc/lib/
+                cp ${S}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+        fi
 }
 
 PACKAGES = "kernel-devsrc"




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel-devsrc: Handle ppc crtsaves.o explictly for now
  2014-12-21 12:29 [PATCH] kernel-devsrc: Handle ppc crtsaves.o explictly for now Richard Purdie
@ 2014-12-22  3:43 ` Bruce Ashfield
  2014-12-22  9:09   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2014-12-22  3:43 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Sun, Dec 21, 2014 at 8:29 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Resolve kernel module build failures for qemuppc by including crtsaves.o.
>
> I'm not particularly happy to be doing this, it should perhaps be contained
> in the kernel-dev package. Until the overlap between kernel-devsrc and
> kernel-dev is resolved, this at least removed the regressions.

Interesting. I built qemuppc for core-image-kerneldev and core-image-sato and
didn't see this.

Are the build steps that triggered this captured in the bug ? Or are they in the
mailing list thread ? Either way, I'd like to run them here as part of
any follow
on cleanups.

But the patch makes sense, and looks fine to me for the current state.

Bruce

>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
> index 2872f17..1557c27 100644
> --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
> +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
> @@ -46,6 +46,14 @@ do_install() {
>          cd ${S}
>          find . -type d -name '.git*' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
>          oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts
> +
> +        # As of Linux kernel version 3.0.1, the clean target removes
> +        # arch/powerpc/lib/crtsavres.o which is present in
> +        # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
> +        if [ ${ARCH} = "powerpc" ]; then
> +                mkdir -p $kerneldir/arch/powerpc/lib/
> +                cp ${S}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
> +        fi
>  }
>
>  PACKAGES = "kernel-devsrc"
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel-devsrc: Handle ppc crtsaves.o explictly for now
  2014-12-22  3:43 ` Bruce Ashfield
@ 2014-12-22  9:09   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2014-12-22  9:09 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: openembedded-core

On Sun, 2014-12-21 at 23:43 -0400, Bruce Ashfield wrote:
> On Sun, Dec 21, 2014 at 8:29 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > Resolve kernel module build failures for qemuppc by including crtsaves.o.
> >
> > I'm not particularly happy to be doing this, it should perhaps be contained
> > in the kernel-dev package. Until the overlap between kernel-devsrc and
> > kernel-dev is resolved, this at least removed the regressions.
> 
> Interesting. I built qemuppc for core-image-kerneldev and core-image-sato and
> didn't see this.
> 
> Are the build steps that triggered this captured in the bug ? Or are they in the
> mailing list thread ? Either way, I'd like to run them here as part of
> any follow
> on cleanups.
> 
> But the patch makes sense, and looks fine to me for the current state.

Reproducer is/was in local.conf:

TEST_IMAGE = "1"
TEST_SUITES = "kernelmodule"

MACHINE=qemuppc bitbake core-image-sato-sdk

which will then build the image, boot it and then try and build a kernel
module. I did cheat and disable QT4 when I did it locally.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-22  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-21 12:29 [PATCH] kernel-devsrc: Handle ppc crtsaves.o explictly for now Richard Purdie
2014-12-22  3:43 ` Bruce Ashfield
2014-12-22  9:09   ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox