Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] Re-Use KERNEL_LOCALVERSION
@ 2013-04-10 21:47 Chase Maupin
  2013-04-10 21:47 ` [PATCH] kernel: Add KERNEL_LOCALVERSION to control version string Chase Maupin
  0 siblings, 1 reply; 7+ messages in thread
From: Chase Maupin @ 2013-04-10 21:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: Chase Maupin

All,

I could not find anyone actually using KERNEL_LOCALVERSION so
I was hoping to re-purpose this to allow setting and extra
version string in the kernel version.  Is anyone actively
using this variable for something else?

Chase Maupin (1):
  kernel: Add KERNEL_LOCALVERSION to control version string

 meta/classes/kernel.bbclass |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)




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

* [PATCH] kernel: Add KERNEL_LOCALVERSION to control version string
  2013-04-10 21:47 [PATCH] Re-Use KERNEL_LOCALVERSION Chase Maupin
@ 2013-04-10 21:47 ` Chase Maupin
  2013-04-11  0:42   ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Chase Maupin @ 2013-04-10 21:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: Chase Maupin

* Add a variable called KERNEL_LOCALVERSION which when set will
  place a version string in the .scmversion file of the kernel
  sources.  This string will be picked up by the kernel Makefile
  and will be appended to the kernel version.  This is done to
  make it easier to identify what revision of the kernel sources
  are being run.  For example you can use a setting like the
  following to add the short commit id to the kernel version
  string:

KERNEL_LOCALVERSION = "-g${@d.getVar('SRCPV', True).partition('+')[2][0:7]}"

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
---
 meta/classes/kernel.bbclass |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index af58887..9757465 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -48,6 +48,9 @@ export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
 
 KERNEL_VERSION = "${@get_kernelversion('${B}')}"
 
+# Setting KERNEL_LOCALVERSION will place a string in the .scmversion file
+# of the kernel tree.  This string will be picked up by the build system
+# of the kernel and appended to the kernel version.
 KERNEL_LOCALVERSION ?= ""
 
 # kernels are generally machine specific
@@ -210,7 +213,8 @@ kernel_do_configure() {
 	# $ scripts/setlocalversion . => +
 	# $ make kernelversion => 2.6.37
 	# $ make kernelrelease => 2.6.37+
-	touch ${B}/.scmversion ${S}/.scmversion
+	echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+	echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
 
 	# Copy defconfig to .config if .config does not exist. This allows
 	# recipes to manage the .config themselves in do_configure_prepend().
-- 
1.7.0.4




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

* Re: [PATCH] kernel: Add KERNEL_LOCALVERSION to control version string
  2013-04-10 21:47 ` [PATCH] kernel: Add KERNEL_LOCALVERSION to control version string Chase Maupin
@ 2013-04-11  0:42   ` Bruce Ashfield
  2013-04-11 12:44     ` Maupin, Chase
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Ashfield @ 2013-04-11  0:42 UTC (permalink / raw)
  To: Chase Maupin; +Cc: Patches and discussions about the oe-core layer

On Wed, Apr 10, 2013 at 5:47 PM, Chase Maupin <Chase.Maupin@ti.com> wrote:
> * Add a variable called KERNEL_LOCALVERSION which when set will
>   place a version string in the .scmversion file of the kernel
>   sources.  This string will be picked up by the kernel Makefile
>   and will be appended to the kernel version.  This is done to
>   make it easier to identify what revision of the kernel sources
>   are being run.  For example you can use a setting like the
>   following to add the short commit id to the kernel version
>   string:
>
> KERNEL_LOCALVERSION = "-g${@d.getVar('SRCPV', True).partition('+')[2][0:7]}"
>
> Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
> ---
>  meta/classes/kernel.bbclass |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index af58887..9757465 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -48,6 +48,9 @@ export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
>
>  KERNEL_VERSION = "${@get_kernelversion('${B}')}"
>
> +# Setting KERNEL_LOCALVERSION will place a string in the .scmversion file
> +# of the kernel tree.  This string will be picked up by the build system
> +# of the kernel and appended to the kernel version.
>  KERNEL_LOCALVERSION ?= ""
>
>  # kernels are generally machine specific
> @@ -210,7 +213,8 @@ kernel_do_configure() {
>         # $ scripts/setlocalversion . => +
>         # $ make kernelversion => 2.6.37
>         # $ make kernelrelease => 2.6.37+
> -       touch ${B}/.scmversion ${S}/.scmversion
> +       echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
> +       echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion

This would clobber trees that already patch, or otherwise have the file in place
in their source directory.  A test to see if it already exists and only echo
the variable if no one has already set it in their tree would be safer.

This will still be overridden by CONFIG_LOCALVERSION, so it is safe
from that angle, but also note that it can be inhibited by setting
# CONFIG_LOCALVERSION_AUTO is not set, in your .config and
setting LOCALVERSION, but you probably already knew that!

Cheers,

Bruce

>
>         # Copy defconfig to .config if .config does not exist. This allows
>         # recipes to manage the .config themselves in do_configure_prepend().
> --
> 1.7.0.4
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/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] 7+ messages in thread

* Re: [PATCH] kernel: Add KERNEL_LOCALVERSION to control version string
  2013-04-11  0:42   ` Bruce Ashfield
@ 2013-04-11 12:44     ` Maupin, Chase
  2013-04-11 12:53       ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Maupin, Chase @ 2013-04-11 12:44 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

> -----Original Message-----
> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
> Sent: Wednesday, April 10, 2013 7:42 PM
> To: Maupin, Chase
> Cc: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH] kernel: Add KERNEL_LOCALVERSION to
> control version string
> 
> On Wed, Apr 10, 2013 at 5:47 PM, Chase Maupin
> <Chase.Maupin@ti.com> wrote:
> > * Add a variable called KERNEL_LOCALVERSION which when set will
> >   place a version string in the .scmversion file of the kernel
> >   sources.  This string will be picked up by the kernel
> Makefile
> >   and will be appended to the kernel version.  This is done to
> >   make it easier to identify what revision of the kernel
> sources
> >   are being run.  For example you can use a setting like the
> >   following to add the short commit id to the kernel version
> >   string:
> >
> > KERNEL_LOCALVERSION = "-g${@d.getVar('SRCPV',
> True).partition('+')[2][0:7]}"
> >
> > Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
> > ---
> >  meta/classes/kernel.bbclass |    6 +++++-
> >  1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > diff --git a/meta/classes/kernel.bbclass
> b/meta/classes/kernel.bbclass
> > index af58887..9757465 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -48,6 +48,9 @@ export CMDLINE_CONSOLE =
> "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
> >
> >  KERNEL_VERSION = "${@get_kernelversion('${B}')}"
> >
> > +# Setting KERNEL_LOCALVERSION will place a string in the
> .scmversion file
> > +# of the kernel tree.  This string will be picked up by the
> build system
> > +# of the kernel and appended to the kernel version.
> >  KERNEL_LOCALVERSION ?= ""
> >
> >  # kernels are generally machine specific
> > @@ -210,7 +213,8 @@ kernel_do_configure() {
> >         # $ scripts/setlocalversion . => +
> >         # $ make kernelversion => 2.6.37
> >         # $ make kernelrelease => 2.6.37+
> > -       touch ${B}/.scmversion ${S}/.scmversion
> > +       echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
> > +       echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
> 
> This would clobber trees that already patch, or otherwise have
> the file in place
> in their source directory.  A test to see if it already exists
> and only echo
> the variable if no one has already set it in their tree would be
> safer.

Good point.  I'll wrap this in a check and submit version 2.  I'll do the same for the U-Boot version as well.

> 
> This will still be overridden by CONFIG_LOCALVERSION, so it is
> safe
> from that angle, but also note that it can be inhibited by
> setting
> # CONFIG_LOCALVERSION_AUTO is not set, in your .config and
> setting LOCALVERSION, but you probably already knew that!
> 
> Cheers,
> 
> Bruce
> 
> >
> >         # Copy defconfig to .config if .config does not exist.
> This allows
> >         # recipes to manage the .config themselves in
> do_configure_prepend().
> > --
> > 1.7.0.4
> >
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-
> bin/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] 7+ messages in thread

* Re: [PATCH] kernel: Add KERNEL_LOCALVERSION to control version string
  2013-04-11 12:44     ` Maupin, Chase
@ 2013-04-11 12:53       ` Bruce Ashfield
  2013-04-11 13:17         ` Denys Dmytriyenko
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Ashfield @ 2013-04-11 12:53 UTC (permalink / raw)
  To: Maupin, Chase; +Cc: Patches and discussions about the oe-core layer

On Thu, Apr 11, 2013 at 8:44 AM, Maupin, Chase <chase.maupin@ti.com> wrote:
>> -----Original Message-----
>> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
>> Sent: Wednesday, April 10, 2013 7:42 PM
>> To: Maupin, Chase
>> Cc: Patches and discussions about the oe-core layer
>> Subject: Re: [OE-core] [PATCH] kernel: Add KERNEL_LOCALVERSION to
>> control version string
>>
>> On Wed, Apr 10, 2013 at 5:47 PM, Chase Maupin
>> <Chase.Maupin@ti.com> wrote:
>> > * Add a variable called KERNEL_LOCALVERSION which when set will
>> >   place a version string in the .scmversion file of the kernel
>> >   sources.  This string will be picked up by the kernel
>> Makefile
>> >   and will be appended to the kernel version.  This is done to
>> >   make it easier to identify what revision of the kernel
>> sources
>> >   are being run.  For example you can use a setting like the
>> >   following to add the short commit id to the kernel version
>> >   string:
>> >
>> > KERNEL_LOCALVERSION = "-g${@d.getVar('SRCPV',
>> True).partition('+')[2][0:7]}"
>> >
>> > Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
>> > ---
>> >  meta/classes/kernel.bbclass |    6 +++++-
>> >  1 files changed, 5 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/meta/classes/kernel.bbclass
>> b/meta/classes/kernel.bbclass
>> > index af58887..9757465 100644
>> > --- a/meta/classes/kernel.bbclass
>> > +++ b/meta/classes/kernel.bbclass
>> > @@ -48,6 +48,9 @@ export CMDLINE_CONSOLE =
>> "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
>> >
>> >  KERNEL_VERSION = "${@get_kernelversion('${B}')}"
>> >
>> > +# Setting KERNEL_LOCALVERSION will place a string in the
>> .scmversion file
>> > +# of the kernel tree.  This string will be picked up by the
>> build system
>> > +# of the kernel and appended to the kernel version.
>> >  KERNEL_LOCALVERSION ?= ""
>> >
>> >  # kernels are generally machine specific
>> > @@ -210,7 +213,8 @@ kernel_do_configure() {
>> >         # $ scripts/setlocalversion . => +
>> >         # $ make kernelversion => 2.6.37
>> >         # $ make kernelrelease => 2.6.37+
>> > -       touch ${B}/.scmversion ${S}/.scmversion
>> > +       echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
>> > +       echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
>>
>> This would clobber trees that already patch, or otherwise have
>> the file in place
>> in their source directory.  A test to see if it already exists
>> and only echo
>> the variable if no one has already set it in their tree would be
>> safer.
>
> Good point.  I'll wrap this in a check and submit version 2.  I'll do the same for the U-Boot version as well.

Another option for the kernel is to use a localversion-yocto file. It
will serve the same purpose and keep us from running afoul of those
that want scm version to provide a format that is similar to the one
that the kernel internally generates.

Just a thought. I typically use localversion-<foo> now for all my
localversions, and will switch the kernel-yocto over to it in master
now that all older supported kernels have been pushed off the cliff :)

Cheers,

Bruce

>
>>
>> This will still be overridden by CONFIG_LOCALVERSION, so it is
>> safe
>> from that angle, but also note that it can be inhibited by
>> setting
>> # CONFIG_LOCALVERSION_AUTO is not set, in your .config and
>> setting LOCALVERSION, but you probably already knew that!
>>
>> Cheers,
>>
>> Bruce
>>
>> >
>> >         # Copy defconfig to .config if .config does not exist.
>> This allows
>> >         # recipes to manage the .config themselves in
>> do_configure_prepend().
>> > --
>> > 1.7.0.4
>> >
>> >
>> > _______________________________________________
>> > Openembedded-core mailing list
>> > Openembedded-core@lists.openembedded.org
>> > http://lists.linuxtogo.org/cgi-
>> bin/mailman/listinfo/openembedded-core
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness
>> await
>> thee at its end"



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



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

* Re: [PATCH] kernel: Add KERNEL_LOCALVERSION to control version string
  2013-04-11 12:53       ` Bruce Ashfield
@ 2013-04-11 13:17         ` Denys Dmytriyenko
  2013-04-11 13:29           ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Denys Dmytriyenko @ 2013-04-11 13:17 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

On Thu, Apr 11, 2013 at 08:53:57AM -0400, Bruce Ashfield wrote:
> On Thu, Apr 11, 2013 at 8:44 AM, Maupin, Chase <chase.maupin@ti.com> wrote:
> >> -----Original Message-----
> >> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
> >> Sent: Wednesday, April 10, 2013 7:42 PM
> >> To: Maupin, Chase
> >> Cc: Patches and discussions about the oe-core layer
> >> Subject: Re: [OE-core] [PATCH] kernel: Add KERNEL_LOCALVERSION to
> >> control version string
> >>
> >> On Wed, Apr 10, 2013 at 5:47 PM, Chase Maupin
> >> <Chase.Maupin@ti.com> wrote:
> >> > * Add a variable called KERNEL_LOCALVERSION which when set will
> >> >   place a version string in the .scmversion file of the kernel
> >> >   sources.  This string will be picked up by the kernel
> >> Makefile
> >> >   and will be appended to the kernel version.  This is done to
> >> >   make it easier to identify what revision of the kernel
> >> sources
> >> >   are being run.  For example you can use a setting like the
> >> >   following to add the short commit id to the kernel version
> >> >   string:
> >> >
> >> > KERNEL_LOCALVERSION = "-g${@d.getVar('SRCPV',
> >> True).partition('+')[2][0:7]}"
> >> >
> >> > Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
> >> > ---
> >> >  meta/classes/kernel.bbclass |    6 +++++-
> >> >  1 files changed, 5 insertions(+), 1 deletions(-)
> >> >
> >> > diff --git a/meta/classes/kernel.bbclass
> >> b/meta/classes/kernel.bbclass
> >> > index af58887..9757465 100644
> >> > --- a/meta/classes/kernel.bbclass
> >> > +++ b/meta/classes/kernel.bbclass
> >> > @@ -48,6 +48,9 @@ export CMDLINE_CONSOLE =
> >> "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
> >> >
> >> >  KERNEL_VERSION = "${@get_kernelversion('${B}')}"
> >> >
> >> > +# Setting KERNEL_LOCALVERSION will place a string in the
> >> .scmversion file
> >> > +# of the kernel tree.  This string will be picked up by the
> >> build system
> >> > +# of the kernel and appended to the kernel version.
> >> >  KERNEL_LOCALVERSION ?= ""
> >> >
> >> >  # kernels are generally machine specific
> >> > @@ -210,7 +213,8 @@ kernel_do_configure() {
> >> >         # $ scripts/setlocalversion . => +
> >> >         # $ make kernelversion => 2.6.37
> >> >         # $ make kernelrelease => 2.6.37+
> >> > -       touch ${B}/.scmversion ${S}/.scmversion
> >> > +       echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
> >> > +       echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
> >>
> >> This would clobber trees that already patch, or otherwise have
> >> the file in place
> >> in their source directory.  A test to see if it already exists
> >> and only echo
> >> the variable if no one has already set it in their tree would be
> >> safer.
> >
> > Good point.  I'll wrap this in a check and submit version 2.  I'll do the 
> > same for the U-Boot version as well.
> 
> Another option for the kernel is to use a localversion-yocto file. It
> will serve the same purpose and keep us from running afoul of those
> that want scm version to provide a format that is similar to the one
> that the kernel internally generates.
> 
> Just a thought. I typically use localversion-<foo> now for all my
> localversions, and will switch the kernel-yocto over to it in master
> now that all older supported kernels have been pushed off the cliff :)

That would be great once everyone starts using linux-yocto kernels! :) 
Unfortunately that is still not the case...

-- 
Denys

> >> This will still be overridden by CONFIG_LOCALVERSION, so it is
> >> safe
> >> from that angle, but also note that it can be inhibited by
> >> setting
> >> # CONFIG_LOCALVERSION_AUTO is not set, in your .config and
> >> setting LOCALVERSION, but you probably already knew that!
> >>
> >> Cheers,
> >>
> >> Bruce
> >>
> >> >
> >> >         # Copy defconfig to .config if .config does not exist.
> >> This allows
> >> >         # recipes to manage the .config themselves in
> >> do_configure_prepend().
> >> > --
> >> > 1.7.0.4
> >> >
> >> >
> >> > _______________________________________________
> >> > Openembedded-core mailing list
> >> > Openembedded-core@lists.openembedded.org
> >> > http://lists.linuxtogo.org/cgi-
> >> bin/mailman/listinfo/openembedded-core
> >>
> >>
> >>
> >> --
> >> "Thou shalt not follow the NULL pointer, for chaos and madness
> >> await
> >> thee at its end"
> 
> 
> 
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



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

* Re: [PATCH] kernel: Add KERNEL_LOCALVERSION to control version string
  2013-04-11 13:17         ` Denys Dmytriyenko
@ 2013-04-11 13:29           ` Bruce Ashfield
  0 siblings, 0 replies; 7+ messages in thread
From: Bruce Ashfield @ 2013-04-11 13:29 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: Patches and discussions about the oe-core layer

On Thu, Apr 11, 2013 at 9:17 AM, Denys Dmytriyenko <denis@denix.org> wrote:
> On Thu, Apr 11, 2013 at 08:53:57AM -0400, Bruce Ashfield wrote:
>> On Thu, Apr 11, 2013 at 8:44 AM, Maupin, Chase <chase.maupin@ti.com> wrote:
>> >> -----Original Message-----
>> >> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
>> >> Sent: Wednesday, April 10, 2013 7:42 PM
>> >> To: Maupin, Chase
>> >> Cc: Patches and discussions about the oe-core layer
>> >> Subject: Re: [OE-core] [PATCH] kernel: Add KERNEL_LOCALVERSION to
>> >> control version string
>> >>
>> >> On Wed, Apr 10, 2013 at 5:47 PM, Chase Maupin
>> >> <Chase.Maupin@ti.com> wrote:
>> >> > * Add a variable called KERNEL_LOCALVERSION which when set will
>> >> >   place a version string in the .scmversion file of the kernel
>> >> >   sources.  This string will be picked up by the kernel
>> >> Makefile
>> >> >   and will be appended to the kernel version.  This is done to
>> >> >   make it easier to identify what revision of the kernel
>> >> sources
>> >> >   are being run.  For example you can use a setting like the
>> >> >   following to add the short commit id to the kernel version
>> >> >   string:
>> >> >
>> >> > KERNEL_LOCALVERSION = "-g${@d.getVar('SRCPV',
>> >> True).partition('+')[2][0:7]}"
>> >> >
>> >> > Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
>> >> > ---
>> >> >  meta/classes/kernel.bbclass |    6 +++++-
>> >> >  1 files changed, 5 insertions(+), 1 deletions(-)
>> >> >
>> >> > diff --git a/meta/classes/kernel.bbclass
>> >> b/meta/classes/kernel.bbclass
>> >> > index af58887..9757465 100644
>> >> > --- a/meta/classes/kernel.bbclass
>> >> > +++ b/meta/classes/kernel.bbclass
>> >> > @@ -48,6 +48,9 @@ export CMDLINE_CONSOLE =
>> >> "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
>> >> >
>> >> >  KERNEL_VERSION = "${@get_kernelversion('${B}')}"
>> >> >
>> >> > +# Setting KERNEL_LOCALVERSION will place a string in the
>> >> .scmversion file
>> >> > +# of the kernel tree.  This string will be picked up by the
>> >> build system
>> >> > +# of the kernel and appended to the kernel version.
>> >> >  KERNEL_LOCALVERSION ?= ""
>> >> >
>> >> >  # kernels are generally machine specific
>> >> > @@ -210,7 +213,8 @@ kernel_do_configure() {
>> >> >         # $ scripts/setlocalversion . => +
>> >> >         # $ make kernelversion => 2.6.37
>> >> >         # $ make kernelrelease => 2.6.37+
>> >> > -       touch ${B}/.scmversion ${S}/.scmversion
>> >> > +       echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
>> >> > +       echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
>> >>
>> >> This would clobber trees that already patch, or otherwise have
>> >> the file in place
>> >> in their source directory.  A test to see if it already exists
>> >> and only echo
>> >> the variable if no one has already set it in their tree would be
>> >> safer.
>> >
>> > Good point.  I'll wrap this in a check and submit version 2.  I'll do the
>> > same for the U-Boot version as well.
>>
>> Another option for the kernel is to use a localversion-yocto file. It
>> will serve the same purpose and keep us from running afoul of those
>> that want scm version to provide a format that is similar to the one
>> that the kernel internally generates.
>>
>> Just a thought. I typically use localversion-<foo> now for all my
>> localversions, and will switch the kernel-yocto over to it in master
>> now that all older supported kernels have been pushed off the cliff :)
>
> That would be great once everyone starts using linux-yocto kernels! :)
> Unfortunately that is still not the case...

What!? they aren't!? :)

I know (and everyone knows that I know :P) I was actually more meaning
to convey that kernel.bbclass can do this, and the tools extensions for
yocto can use it just like any other derived recipe.

Cheers,

Bruce

>
> --
> Denys
>
>> >> This will still be overridden by CONFIG_LOCALVERSION, so it is
>> >> safe
>> >> from that angle, but also note that it can be inhibited by
>> >> setting
>> >> # CONFIG_LOCALVERSION_AUTO is not set, in your .config and
>> >> setting LOCALVERSION, but you probably already knew that!
>> >>
>> >> Cheers,
>> >>
>> >> Bruce
>> >>
>> >> >
>> >> >         # Copy defconfig to .config if .config does not exist.
>> >> This allows
>> >> >         # recipes to manage the .config themselves in
>> >> do_configure_prepend().
>> >> > --
>> >> > 1.7.0.4
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > Openembedded-core mailing list
>> >> > Openembedded-core@lists.openembedded.org
>> >> > http://lists.linuxtogo.org/cgi-
>> >> bin/mailman/listinfo/openembedded-core
>> >>
>> >>
>> >>
>> >> --
>> >> "Thou shalt not follow the NULL pointer, for chaos and madness
>> >> await
>> >> thee at its end"
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end"
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/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] 7+ messages in thread

end of thread, other threads:[~2013-04-11 13:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10 21:47 [PATCH] Re-Use KERNEL_LOCALVERSION Chase Maupin
2013-04-10 21:47 ` [PATCH] kernel: Add KERNEL_LOCALVERSION to control version string Chase Maupin
2013-04-11  0:42   ` Bruce Ashfield
2013-04-11 12:44     ` Maupin, Chase
2013-04-11 12:53       ` Bruce Ashfield
2013-04-11 13:17         ` Denys Dmytriyenko
2013-04-11 13:29           ` Bruce Ashfield

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