* [PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
@ 2010-05-03 21:21 Eric Benard
2010-05-12 15:34 ` Eric Bénard
2010-05-14 15:10 ` [RFC][PATCH] " Eric Bénard
0 siblings, 2 replies; 13+ messages in thread
From: Eric Benard @ 2010-05-03 21:21 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Eric Benard <eric@eukrea.com>
---
classes/module-base.bbclass | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/classes/module-base.bbclass b/classes/module-base.bbclass
index bc53e1b..9aaaa4e 100644
--- a/classes/module-base.bbclass
+++ b/classes/module-base.bbclass
@@ -7,7 +7,12 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
# A machine.conf or local.conf can increase MACHINE_KERNEL_PR to force
# rebuilds for kernel and external modules
-PR = "${MACHINE_KERNEL_PR}"
+python __anonymous () {
+ machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
+
+ if machine_kernel_pr:
+ bb.data.setVar('PR', machine_kernel_pr, d)
+}
export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}"
--
1.6.3.3
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-03 21:21 [PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set Eric Benard
@ 2010-05-12 15:34 ` Eric Bénard
2010-05-14 15:10 ` [RFC][PATCH] " Eric Bénard
1 sibling, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2010-05-12 15:34 UTC (permalink / raw)
To: openembedded-devel; +Cc: k.kooi
Le 03/05/2010 23:21, Eric Benard a écrit :
> Signed-off-by: Eric Benard<eric@eukrea.com>
> ---
> classes/module-base.bbclass | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/classes/module-base.bbclass b/classes/module-base.bbclass
> index bc53e1b..9aaaa4e 100644
> --- a/classes/module-base.bbclass
> +++ b/classes/module-base.bbclass
> @@ -7,7 +7,12 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
>
> # A machine.conf or local.conf can increase MACHINE_KERNEL_PR to force
> # rebuilds for kernel and external modules
> -PR = "${MACHINE_KERNEL_PR}"
> +python __anonymous () {
> + machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
> +
> + if machine_kernel_pr:
> + bb.data.setVar('PR', machine_kernel_pr, d)
> +}
>
> export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
> export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}"
Actually, we loose PR if MACHINE_KERNEL_PR is not set.
Is this patch fine to solve this problem or is there another prefered way ?
Thanks,
Eric
^ permalink raw reply [flat|nested] 13+ messages in thread* [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-03 21:21 [PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set Eric Benard
2010-05-12 15:34 ` Eric Bénard
@ 2010-05-14 15:10 ` Eric Bénard
2010-05-14 15:52 ` Koen Kooi
2010-05-14 16:25 ` Phil Blundell
1 sibling, 2 replies; 13+ messages in thread
From: Eric Bénard @ 2010-05-14 15:10 UTC (permalink / raw)
To: k.kooi; +Cc: openembedded-devel
Hi Koen,
I was told you are the person to contact about MACHINE_KERNEL_PR so may
you please have a look to the patch below - also available here :
http://patchwork.openembedded.org/patch/2012/
Actually, when compiling modules (out of tree), we loose PR if
MACHINE_KERNEL_PR is not set.
Is this patch fine to solve this problem or is there another prefered way ?
The same problem was already solved in kernel.bbclass by the following
comit
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=35e7b34d3b5b96ed11bc7ed6b2a5d08e6183d8a3
Thanks,
Eric
Signed-off-by: Eric Benard<eric@eukrea.com>
---
classes/module-base.bbclass | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/classes/module-base.bbclass b/classes/module-base.bbclass
index bc53e1b..9aaaa4e 100644
--- a/classes/module-base.bbclass
+++ b/classes/module-base.bbclass
@@ -7,7 +7,12 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
# A machine.conf or local.conf can increase MACHINE_KERNEL_PR to force
# rebuilds for kernel and external modules
-PR = "${MACHINE_KERNEL_PR}"
+python __anonymous () {
+ machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
+
+ if machine_kernel_pr:
+ bb.data.setVar('PR', machine_kernel_pr, d)
+}
export KERNEL_VERSION =
"${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
export KERNEL_SOURCE =
"${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}"
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-14 15:10 ` [RFC][PATCH] " Eric Bénard
@ 2010-05-14 15:52 ` Koen Kooi
2010-05-14 17:17 ` Eric Bénard
2010-05-14 16:25 ` Phil Blundell
1 sibling, 1 reply; 13+ messages in thread
From: Koen Kooi @ 2010-05-14 15:52 UTC (permalink / raw)
To: Eric Bénard; +Cc: openembedded-devel
Op 14 mei 2010, om 17:10 heeft Eric Bénard het volgende geschreven:
> Hi Koen,
>
> I was told you are the person to contact about MACHINE_KERNEL_PR so may you please have a look to the patch below - also available here : http://patchwork.openembedded.org/patch/2012/
>
> Actually, when compiling modules (out of tree), we loose PR if MACHINE_KERNEL_PR is not set.
I don't believe that when MACHINE_KERNEL_PR isn't set people care about PR.
regards,
Koen
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-14 15:52 ` Koen Kooi
@ 2010-05-14 17:17 ` Eric Bénard
2010-05-14 17:34 ` Koen Kooi
0 siblings, 1 reply; 13+ messages in thread
From: Eric Bénard @ 2010-05-14 17:17 UTC (permalink / raw)
To: k.kooi; +Cc: openembedded-devel
Le 14/05/2010 17:52, Koen Kooi a écrit :
> Op 14 mei 2010, om 17:10 heeft Eric Bénard het volgende geschreven:
>> I was told you are the person to contact about MACHINE_KERNEL_PR so may you please have a look to the patch below - also available here : http://patchwork.openembedded.org/patch/2012/
>>
>> Actually, when compiling modules (out of tree), we loose PR if MACHINE_KERNEL_PR is not set.
>
> I don't believe that when MACHINE_KERNEL_PR isn't set people care about PR.
>
Does that mean that policy is that MACHINE_KERNEL_PR should be set for
every machine ?
If yes, maybe this should be added in the doc.
Actually only 7 files (4 machines + 3 include) in conf/machine have this
set and conf/bitbake set it to "" as a default so what aboutdoing ?=
"r0" in bitbake.conf in order to have a default value as for PR ?
Eric
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-14 17:17 ` Eric Bénard
@ 2010-05-14 17:34 ` Koen Kooi
2010-05-14 17:45 ` Eric Bénard
0 siblings, 1 reply; 13+ messages in thread
From: Koen Kooi @ 2010-05-14 17:34 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 14-05-10 19:17, Eric Bénard wrote:
> Le 14/05/2010 17:52, Koen Kooi a écrit :
>> Op 14 mei 2010, om 17:10 heeft Eric Bénard het volgende geschreven:
>>> I was told you are the person to contact about MACHINE_KERNEL_PR so
>>> may you please have a look to the patch below - also available here :
>>> http://patchwork.openembedded.org/patch/2012/
>>>
>>> Actually, when compiling modules (out of tree), we loose PR if
>>> MACHINE_KERNEL_PR is not set.
>>
>> I don't believe that when MACHINE_KERNEL_PR isn't set people care
>> about PR.
>>
> Does that mean that policy is that MACHINE_KERNEL_PR should be set for
> every machine ?
> If yes, maybe this should be added in the doc.
IMO yes, but some people were against it. Either their kernel never
changes or they don't care about out-of-tree modules breaking on kernel
changes.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFL7YmVMkyGM64RGpERAsf2AJ45yUaAIVL0HCm7jCfxwkmq9C5gnACfcV8w
vGcI7BJka3fCXJJ+RL3Y+Yc=
=RLGB
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-14 17:34 ` Koen Kooi
@ 2010-05-14 17:45 ` Eric Bénard
2010-05-14 19:55 ` Phil Blundell
0 siblings, 1 reply; 13+ messages in thread
From: Eric Bénard @ 2010-05-14 17:45 UTC (permalink / raw)
To: openembedded-devel
Le 14/05/2010 19:34, Koen Kooi a écrit :
> On 14-05-10 19:17, Eric Bénard wrote:
>> Le 14/05/2010 17:52, Koen Kooi a écrit :
>>> Op 14 mei 2010, om 17:10 heeft Eric Bénard het volgende geschreven:
>>>> I was told you are the person to contact about MACHINE_KERNEL_PR so
>>>> may you please have a look to the patch below - also available here :
>>>> http://patchwork.openembedded.org/patch/2012/
>>>>
>>>> Actually, when compiling modules (out of tree), we loose PR if
>>>> MACHINE_KERNEL_PR is not set.
>>>
>>> I don't believe that when MACHINE_KERNEL_PR isn't set people care
>>> about PR.
>>>
>> Does that mean that policy is that MACHINE_KERNEL_PR should be set for
>> every machine ?
>> If yes, maybe this should be added in the doc.
>
> IMO yes, but some people were against it. Either their kernel never
> changes or they don't care about out-of-tree modules breaking on kernel
> changes.
>
so why not setting r0 as a default in bitbake.conf as a compromise ?
Eric
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-14 17:45 ` Eric Bénard
@ 2010-05-14 19:55 ` Phil Blundell
2010-05-14 20:15 ` Eric Bénard
0 siblings, 1 reply; 13+ messages in thread
From: Phil Blundell @ 2010-05-14 19:55 UTC (permalink / raw)
To: openembedded-devel
On Fri, 2010-05-14 at 19:45 +0200, Eric Bénard wrote:
> so why not setting r0 as a default in bitbake.conf as a compromise ?
A default MACHINE_KERNEL_PR, you mean? That would cause PR to suddenly
go backwards for a whole bunch of machines, which would definitely not
be a good thing. See the mailing list archive; there was quite a lot of
discussion of these kinds of issues at the time that the M_K_PR change
was originally landed.
p.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-14 19:55 ` Phil Blundell
@ 2010-05-14 20:15 ` Eric Bénard
2010-05-14 21:02 ` Phil Blundell
0 siblings, 1 reply; 13+ messages in thread
From: Eric Bénard @ 2010-05-14 20:15 UTC (permalink / raw)
To: openembedded-devel
Le 14/05/2010 21:55, Phil Blundell a écrit :
> On Fri, 2010-05-14 at 19:45 +0200, Eric Bénard wrote:
>> so why not setting r0 as a default in bitbake.conf as a compromise ?
>
> A default MACHINE_KERNEL_PR, you mean? That would cause PR to suddenly
> go backwards for a whole bunch of machines, which would definitely not
> be a good thing. See the mailing list archive; there was quite a lot of
> discussion of these kinds of issues at the time that the M_K_PR change
> was originally landed.
>
yes, in this case MACHINE_KERNEL_PR would overide kernel's PR which is
not what we want.
So actually the fix I propose is needed as while MACHINE_KERNEL_PR is
not required by policy, module-base.bbclass is broken for machines
without MACHINE_KERNEL_PR.
Eric
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-14 20:15 ` Eric Bénard
@ 2010-05-14 21:02 ` Phil Blundell
2010-05-17 7:12 ` Eric Bénard
0 siblings, 1 reply; 13+ messages in thread
From: Phil Blundell @ 2010-05-14 21:02 UTC (permalink / raw)
To: openembedded-devel
On Fri, 2010-05-14 at 22:15 +0200, Eric Bénard wrote:
> So actually the fix I propose is needed as while MACHINE_KERNEL_PR is
> not required by policy, module-base.bbclass is broken for machines
> without MACHINE_KERNEL_PR.
Yes, agreed. I think your fix is the right thing.
p.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-14 21:02 ` Phil Blundell
@ 2010-05-17 7:12 ` Eric Bénard
2010-05-17 8:02 ` Phil Blundell
0 siblings, 1 reply; 13+ messages in thread
From: Eric Bénard @ 2010-05-17 7:12 UTC (permalink / raw)
To: openembedded-devel
Le 14/05/2010 23:02, Phil Blundell a écrit :
> On Fri, 2010-05-14 at 22:15 +0200, Eric Bénard wrote:
>> So actually the fix I propose is needed as while MACHINE_KERNEL_PR is
>> not required by policy, module-base.bbclass is broken for machines
>> without MACHINE_KERNEL_PR.
>
> Yes, agreed. I think your fix is the right thing.
>
Is this an ack so can I push it ?
Eric
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-17 7:12 ` Eric Bénard
@ 2010-05-17 8:02 ` Phil Blundell
0 siblings, 0 replies; 13+ messages in thread
From: Phil Blundell @ 2010-05-17 8:02 UTC (permalink / raw)
To: openembedded-devel
On Mon, 2010-05-17 at 09:12 +0200, Eric Bénard wrote:
> Le 14/05/2010 23:02, Phil Blundell a écrit :
> > On Fri, 2010-05-14 at 22:15 +0200, Eric Bénard wrote:
> >> So actually the fix I propose is needed as while MACHINE_KERNEL_PR is
> >> not required by policy, module-base.bbclass is broken for machines
> >> without MACHINE_KERNEL_PR.
> >
> > Yes, agreed. I think your fix is the right thing.
> >
> Is this an ack so can I push it ?
Yes, please go ahead.
p.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
2010-05-14 15:10 ` [RFC][PATCH] " Eric Bénard
2010-05-14 15:52 ` Koen Kooi
@ 2010-05-14 16:25 ` Phil Blundell
1 sibling, 0 replies; 13+ messages in thread
From: Phil Blundell @ 2010-05-14 16:25 UTC (permalink / raw)
To: openembedded-devel; +Cc: k.kooi
On Fri, 2010-05-14 at 17:10 +0200, Eric Bénard wrote:
> -PR = "${MACHINE_KERNEL_PR}"
> +python __anonymous () {
> + machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
> +
> + if machine_kernel_pr:
> + bb.data.setVar('PR', machine_kernel_pr, d)
> +}
Looks reasonable to me. It seems a little bit sad to have this code
duplicated in both kernel.bbclass and module-base.bbclass but I guess
that is not a very big deal.
p.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-05-17 8:06 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03 21:21 [PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set Eric Benard
2010-05-12 15:34 ` Eric Bénard
2010-05-14 15:10 ` [RFC][PATCH] " Eric Bénard
2010-05-14 15:52 ` Koen Kooi
2010-05-14 17:17 ` Eric Bénard
2010-05-14 17:34 ` Koen Kooi
2010-05-14 17:45 ` Eric Bénard
2010-05-14 19:55 ` Phil Blundell
2010-05-14 20:15 ` Eric Bénard
2010-05-14 21:02 ` Phil Blundell
2010-05-17 7:12 ` Eric Bénard
2010-05-17 8:02 ` Phil Blundell
2010-05-14 16:25 ` Phil Blundell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.