[4/6] kernel.bbclass: fix extra + in kernelrelease

Submitted by Martin Jansa on March 23, 2012, 12:56 p.m.

Details

Message ID 0f5173c469e4ae3e5155d5d3f0643d3a63e25b91.1332507302.git.Martin.Jansa@gmail.com
State Accepted
Commit 56fe5300ab5ab072c20acd03d7fc26e9cae4e652
Headers show

Commit Message

Martin Jansa March 23, 2012, 12:56 p.m.
* see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 5e4cdd4..736768e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -204,6 +204,12 @@  sysroot_stage_all_append() {
 }
 
 kernel_do_configure() {
+	# fixes extra + in /lib/modules/2.6.37+
+	# $ scripts/setlocalversion . => +
+	# $ make kernelversion => 2.6.37
+	# $ make kernelrelease => 2.6.37+
+	touch ${B}/.scmversion
+
 	# Copy defconfig to .config if .config does not exist. This allows
 	# recipes to manage the .config themselves in do_configure_prepend().
 	if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then

Comments

Bruce Ashfield March 23, 2012, 1:24 p.m.
On 12-03-23 08:56 AM, Martin Jansa wrote:
> * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html

I was just looking at this in the past day or so and was
wondering where it had gone. Saved me the effort!

Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>

>
> Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> ---
>   meta/classes/kernel.bbclass |    6 ++++++
>   1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 5e4cdd4..736768e 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
>   }
>
>   kernel_do_configure() {
> +	# fixes extra + in /lib/modules/2.6.37+
> +	# $ scripts/setlocalversion . =>  +
> +	# $ make kernelversion =>  2.6.37
> +	# $ make kernelrelease =>  2.6.37+
> +	touch ${B}/.scmversion
> +
>   	# Copy defconfig to .config if .config does not exist. This allows
>   	# recipes to manage the .config themselves in do_configure_prepend().
>   	if [ -f "${WORKDIR}/defconfig" ]&&  [ ! -f "${B}/.config" ]; then
Martin Jansa March 23, 2012, 1:31 p.m.
On Fri, Mar 23, 2012 at 09:24:56AM -0400, Bruce Ashfield wrote:
> On 12-03-23 08:56 AM, Martin Jansa wrote:
> > * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html
> 
> I was just looking at this in the past day or so and was
> wondering where it had gone. Saved me the effort!
> 

Please bump PR in kernel recipes you care about (I did for mine.. )

> Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> 
> >
> > Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> > ---
> >   meta/classes/kernel.bbclass |    6 ++++++
> >   1 files changed, 6 insertions(+), 0 deletions(-)
> >
> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > index 5e4cdd4..736768e 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
> >   }
> >
> >   kernel_do_configure() {
> > +	# fixes extra + in /lib/modules/2.6.37+
> > +	# $ scripts/setlocalversion . =>  +
> > +	# $ make kernelversion =>  2.6.37
> > +	# $ make kernelrelease =>  2.6.37+
> > +	touch ${B}/.scmversion
> > +
> >   	# Copy defconfig to .config if .config does not exist. This allows
> >   	# recipes to manage the .config themselves in do_configure_prepend().
> >   	if [ -f "${WORKDIR}/defconfig" ]&&  [ ! -f "${B}/.config" ]; then
>
Martin Jansa March 26, 2012, 4:02 p.m.
On Fri, Mar 23, 2012 at 02:31:02PM +0100, Martin Jansa wrote:
> On Fri, Mar 23, 2012 at 09:24:56AM -0400, Bruce Ashfield wrote:
> > On 12-03-23 08:56 AM, Martin Jansa wrote:
> > > * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html
> > 
> > I was just looking at this in the past day or so and was
> > wondering where it had gone. Saved me the effort!
> > 
> 
> Please bump PR in kernel recipes you care about (I did for mine.. )

I was testing your patch
"linux-yocto: common-pc: Add PCNET32 to the config"
to see if this patch fixes + also in linux-yocto recipes and somehow it
seems still keeping +

OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
$ ../linux/scripts/setlocalversion .
-yocto-standard

seems ok, but
root@qemux86-64:/lib/modules# opkg files kernel-module-uvesafb
Package kernel-module-uvesafb
(3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1)
is installed on root and has the following files:
/lib/modules/
/lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/
/lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/uvesafb.ko

and also:
OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
$ make kernelrelease
  GEN
/OE/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
3.2.11-yocto-standard+

Any idea why it doesn't work with linux-yocto layout and works with
other kernels from git (tested on kernels from meta-smartphone).

Cheers,

> 
> > Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> > 
> > >
> > > Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> > > ---
> > >   meta/classes/kernel.bbclass |    6 ++++++
> > >   1 files changed, 6 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > > index 5e4cdd4..736768e 100644
> > > --- a/meta/classes/kernel.bbclass
> > > +++ b/meta/classes/kernel.bbclass
> > > @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
> > >   }
> > >
> > >   kernel_do_configure() {
> > > +	# fixes extra + in /lib/modules/2.6.37+
> > > +	# $ scripts/setlocalversion . =>  +
> > > +	# $ make kernelversion =>  2.6.37
> > > +	# $ make kernelrelease =>  2.6.37+
> > > +	touch ${B}/.scmversion
> > > +
> > >   	# Copy defconfig to .config if .config does not exist. This allows
> > >   	# recipes to manage the .config themselves in do_configure_prepend().
> > >   	if [ -f "${WORKDIR}/defconfig" ]&&  [ ! -f "${B}/.config" ]; then
> > 
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
Martin Jansa March 26, 2012, 4:05 p.m.
On Mon, Mar 26, 2012 at 06:02:46PM +0200, Martin Jansa wrote:
> On Fri, Mar 23, 2012 at 02:31:02PM +0100, Martin Jansa wrote:
> > On Fri, Mar 23, 2012 at 09:24:56AM -0400, Bruce Ashfield wrote:
> > > On 12-03-23 08:56 AM, Martin Jansa wrote:
> > > > * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html
> > > 
> > > I was just looking at this in the past day or so and was
> > > wondering where it had gone. Saved me the effort!
> > > 
> > 
> > Please bump PR in kernel recipes you care about (I did for mine.. )
> 
> I was testing your patch
> "linux-yocto: common-pc: Add PCNET32 to the config"
> to see if this patch fixes + also in linux-yocto recipes and somehow it
> seems still keeping +
> 
> OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
> $ ../linux/scripts/setlocalversion .
> -yocto-standard
> 
> seems ok, but
> root@qemux86-64:/lib/modules# opkg files kernel-module-uvesafb
> Package kernel-module-uvesafb
> (3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1)
> is installed on root and has the following files:
> /lib/modules/
> /lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/
> /lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/uvesafb.ko
> 
> and also:
> OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
> $ make kernelrelease
>   GEN
> /OE/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build/Makefile
> scripts/kconfig/conf --silentoldconfig Kconfig
> 3.2.11-yocto-standard+
> 
> Any idea why it doesn't work with linux-yocto layout and works with
> other kernels from git (tested on kernels from meta-smartphone).

Just one more note to this

OE @
~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
$ ../linux/scripts/setlocalversion ../linux
-yocto-standard+

so if it calls setlocalversion against in ../linux tree we can touch
.scmversion also in that directory instead of ${B}.

Cheers,

> 
> Cheers,
> 
> > 
> > > Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> > > 
> > > >
> > > > Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> > > > ---
> > > >   meta/classes/kernel.bbclass |    6 ++++++
> > > >   1 files changed, 6 insertions(+), 0 deletions(-)
> > > >
> > > > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > > > index 5e4cdd4..736768e 100644
> > > > --- a/meta/classes/kernel.bbclass
> > > > +++ b/meta/classes/kernel.bbclass
> > > > @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
> > > >   }
> > > >
> > > >   kernel_do_configure() {
> > > > +	# fixes extra + in /lib/modules/2.6.37+
> > > > +	# $ scripts/setlocalversion . =>  +
> > > > +	# $ make kernelversion =>  2.6.37
> > > > +	# $ make kernelrelease =>  2.6.37+
> > > > +	touch ${B}/.scmversion
> > > > +
> > > >   	# Copy defconfig to .config if .config does not exist. This allows
> > > >   	# recipes to manage the .config themselves in do_configure_prepend().
> > > >   	if [ -f "${WORKDIR}/defconfig" ]&&  [ ! -f "${B}/.config" ]; then
> > > 
> > 
> > -- 
> > Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
> 
> 
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
Bruce Ashfield March 26, 2012, 4:25 p.m.
On 12-03-26 12:02 PM, Martin Jansa wrote:
> On Fri, Mar 23, 2012 at 02:31:02PM +0100, Martin Jansa wrote:
>> On Fri, Mar 23, 2012 at 09:24:56AM -0400, Bruce Ashfield wrote:
>>> On 12-03-23 08:56 AM, Martin Jansa wrote:
>>>> * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html
>>>
>>> I was just looking at this in the past day or so and was
>>> wondering where it had gone. Saved me the effort!
>>>
>>
>> Please bump PR in kernel recipes you care about (I did for mine.. )
>
> I was testing your patch
> "linux-yocto: common-pc: Add PCNET32 to the config"
> to see if this patch fixes + also in linux-yocto recipes and somehow it
> seems still keeping +
>
> OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
> $ ../linux/scripts/setlocalversion .
> -yocto-standard
>
> seems ok, but
> root@qemux86-64:/lib/modules# opkg files kernel-module-uvesafb
> Package kernel-module-uvesafb
> (3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1)
> is installed on root and has the following files:
> /lib/modules/
> /lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/
> /lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/uvesafb.ko
>
> and also:
> OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
> $ make kernelrelease
>    GEN
> /OE/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build/Makefile
> scripts/kconfig/conf --silentoldconfig Kconfig
> 3.2.11-yocto-standard+
>
> Any idea why it doesn't work with linux-yocto layout and works with
> other kernels from git (tested on kernels from meta-smartphone).

I haven't had a chance to poke much at this yet, since I've been
tied up working with some repository tweaks.

But I can have a look shortly. There are some old(ish) patches that
deal with local version, both in the tree, and in some infrastructure
that could be interacting here. I'll spawn some builds (and actually
let the packaging run), and have a look.

Cheers,

Bruce

>
> Cheers,
>
>>
>>> Acked-by: Bruce Ashfield<bruce.ashfield@windriver.com>
>>>
>>>>
>>>> Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
>>>> ---
>>>>    meta/classes/kernel.bbclass |    6 ++++++
>>>>    1 files changed, 6 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>>>> index 5e4cdd4..736768e 100644
>>>> --- a/meta/classes/kernel.bbclass
>>>> +++ b/meta/classes/kernel.bbclass
>>>> @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
>>>>    }
>>>>
>>>>    kernel_do_configure() {
>>>> +	# fixes extra + in /lib/modules/2.6.37+
>>>> +	# $ scripts/setlocalversion . =>   +
>>>> +	# $ make kernelversion =>   2.6.37
>>>> +	# $ make kernelrelease =>   2.6.37+
>>>> +	touch ${B}/.scmversion
>>>> +
>>>>    	# Copy defconfig to .config if .config does not exist. This allows
>>>>    	# recipes to manage the .config themselves in do_configure_prepend().
>>>>    	if [ -f "${WORKDIR}/defconfig" ]&&   [ ! -f "${B}/.config" ]; then
>>>
>>
>> --
>> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
>
>
>