Patchwork kernel.bbclass: fix external module building

login
register
mail settings
Submitter Khem Raj
Date July 20, 2012, 5:36 a.m.
Message ID <1342762570-29343-1-git-send-email-raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/32689/
State Accepted
Commit 2d114fd0cdf7486f18e53f2bf41c4f559e4b4a8d
Headers show

Comments

Khem Raj - July 20, 2012, 5:36 a.m.
From: Denis Carikli <GNUtoo@no-log.org>

Without that fix we have the following while compiling compat-wireless.
  include/linux/mmzone.h:18:30: fatal error: generated/bounds.h: No such file or directory

Note that the compat-wireless recipe will be added in another commit.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/classes/kernel.bbclass |    3 +++
 1 file changed, 3 insertions(+)
Darren Hart - July 20, 2012, 7:20 a.m.
On 07/19/2012 10:36 PM, Khem Raj wrote:
> From: Denis Carikli <GNUtoo@no-log.org>
> 
> Without that fix we have the following while compiling compat-wireless.
>   include/linux/mmzone.h:18:30: fatal error: generated/bounds.h: No such file or directory
> 
> Note that the compat-wireless recipe will be added in another commit.
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
>  meta/classes/kernel.bbclass |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 08b5e61..ce4d7de 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -187,6 +187,9 @@ kernel_do_install() {
>  		cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
>  	fi
>  
> +	# Necessary for building modules like compat-wireless.
> +	cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
> +

Hrm... I'm not clear on why this is necessary. I understand why you need
bounds.h... but I don't see why it isn't there already.

A few lines up we do:

cp -fR * $kerneldir

Which should cover include/generated/bounds.h...

Perhaps "make -C $kerneldir _mrproper_scripts" clears that out... Ah,
yes, that seems to be the case. Grumble.

OK,

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Paul Eggleton - July 20, 2012, 10:07 a.m.
On Friday 20 July 2012 00:20:01 Darren Hart wrote:
> On 07/19/2012 10:36 PM, Khem Raj wrote:
> > From: Denis Carikli <GNUtoo@no-log.org>
> > 
> > Without that fix we have the following while compiling compat-wireless.
> > 
> >   include/linux/mmzone.h:18:30: fatal error: generated/bounds.h: No such
> >   file or directory> 
> > Note that the compat-wireless recipe will be added in another commit.
> > 
> > Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
> > Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> > ---
> > 
> >  meta/classes/kernel.bbclass |    3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > index 08b5e61..ce4d7de 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -187,6 +187,9 @@ kernel_do_install() {
> > 
> >  		cp arch/powerpc/lib/crtsavres.o 
$kerneldir/arch/powerpc/lib/crtsavres.o
> >  	
> >  	fi
> > 
> > +	# Necessary for building modules like compat-wireless.
> > +	cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
> > +
> 
> Hrm... I'm not clear on why this is necessary. I understand why you need
> bounds.h... but I don't see why it isn't there already.
> 
> A few lines up we do:
> 
> cp -fR * $kerneldir
> 
> Which should cover include/generated/bounds.h...
> 
> Perhaps "make -C $kerneldir _mrproper_scripts" clears that out... Ah,
> yes, that seems to be the case. Grumble.
> 
> OK,
> 
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>

Having established why this is needed, could the commit message and/or comment 
clearly state the reason so that there's something to refer to in future?

Thanks,
Paul

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 08b5e61..ce4d7de 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -187,6 +187,9 @@  kernel_do_install() {
 		cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
 	fi
 
+	# Necessary for building modules like compat-wireless.
+	cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
+
 	# Remove the following binaries which cause strip or arch QA errors
 	# during do_package for cross-compiled platforms
 	bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \