* [RFC] fix for MACHINE_KERNEL_PR stuff
@ 2009-06-03 11:25 Marcin Juszkiewicz
2009-06-03 11:45 ` Koen Kooi
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Marcin Juszkiewicz @ 2009-06-03 11:25 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 2335 bytes --]
This patch unbreaks current behaviour which was introduced by
MACHINE_KERNEL_PR variable.
As most of target machines do not use it they have PR with broken value
(set to "r0" instead of value in recipe). I took other way which makes
both types of users happy -- those with MACHINE_KERNEL_PR in use and
those without it.
By default we set M_K_PR to empty string instead of "r0" - this allows
to check is it set at all or not. If it is set then we set PR to this value.
Otherwise we ignore existance of that variable and use PR from recipe.
Please test and review it. If this will work I will request it for stable/2009.
Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 1323228..757b704 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -20,6 +20,12 @@ python __anonymous () {
image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
if image != '' and image is not None:
bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
+
+ pr = bb.data.getVar('PR', d, True)
+ machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
+
+ if machine_kernel_pr:
+ bb.data.setVar('PR', machine_kernel_pr, d)
}
INITRAMFS_IMAGE ?= ""
@@ -64,10 +70,6 @@ export CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "tt
KERNEL_VERSION = "${@get_kernelversion('${S}')}"
KERNEL_MAJOR_VERSION = "${@get_kernelmajorversion('${KERNEL_VERSION}')}"
-# A machine.conf or local.conf can increase MACHINE_KERNEL_PR to force
-# rebuilds for kernel and external modules
-PR = "${MACHINE_KERNEL_PR}"
-
KERNEL_LOCALVERSION ?= ""
# kernels are generally machine specific
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index e711a1f..7bd548d 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -164,7 +164,7 @@ P = "${PN}-${PV}"
# Define a PR for kernels that machines can override so things like
# modules get rebuilt
-MACHINE_KERNEL_PR ?= "r0"
+MACHINE_KERNEL_PR = ""
# Base package name
# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
Regards,
--
JID: hrw@jabber.org
Website: http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 204 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RFC] fix for MACHINE_KERNEL_PR stuff
2009-06-03 11:25 [RFC] fix for MACHINE_KERNEL_PR stuff Marcin Juszkiewicz
@ 2009-06-03 11:45 ` Koen Kooi
2009-06-03 11:59 ` Marcin Juszkiewicz
2009-06-03 12:32 ` Phil Blundell
2009-06-08 15:54 ` Marcin Juszkiewicz
2 siblings, 1 reply; 7+ messages in thread
From: Koen Kooi @ 2009-06-03 11:45 UTC (permalink / raw)
To: openembedded-devel
On 03-06-09 13:25, Marcin Juszkiewicz wrote:
>
> This patch unbreaks current behaviour which was introduced by
> MACHINE_KERNEL_PR variable.
>
> As most of target machines do not use it they have PR with broken value
> (set to "r0" instead of value in recipe). I took other way which makes
> both types of users happy -- those with MACHINE_KERNEL_PR in use and
> those without it.
>
> By default we set M_K_PR to empty string instead of "r0" - this allows
> to check is it set at all or not. If it is set then we set PR to this value.
> Otherwise we ignore existance of that variable and use PR from recipe.
>
> Please test and review it. If this will work I will request it for stable/2009.
>
> Signed-off-by: Marcin Juszkiewicz<marcin@juszkiewicz.com.pl>
>
> diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
> index 1323228..757b704 100644
> --- a/classes/kernel.bbclass
> +++ b/classes/kernel.bbclass
> @@ -20,6 +20,12 @@ python __anonymous () {
> image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
> if image != '' and image is not None:
> bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
> +
> + pr = bb.data.getVar('PR', d, True)
You're not using 'pr' anywhere in the code you add. Looks fine
otherwise, although I haven't tested it.
regards,
Koen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] fix for MACHINE_KERNEL_PR stuff
2009-06-03 11:45 ` Koen Kooi
@ 2009-06-03 11:59 ` Marcin Juszkiewicz
2009-06-08 17:51 ` Koen Kooi
0 siblings, 1 reply; 7+ messages in thread
From: Marcin Juszkiewicz @ 2009-06-03 11:59 UTC (permalink / raw)
To: openembedded-devel
Dnia środa, 3 czerwca 2009 o 13:45:24 Koen Kooi napisał(a):
> On 03-06-09 13:25, Marcin Juszkiewicz wrote:
> > + pr = bb.data.getVar('PR', d, True)
>
> You're not using 'pr' anywhere in the code you add. Looks fine
> otherwise, although I haven't tested it.
Thats leftover from older version of patch.
Regards,
--
JID: hrw@jabber.org
Website: http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] fix for MACHINE_KERNEL_PR stuff
2009-06-03 11:25 [RFC] fix for MACHINE_KERNEL_PR stuff Marcin Juszkiewicz
2009-06-03 11:45 ` Koen Kooi
@ 2009-06-03 12:32 ` Phil Blundell
2009-06-08 15:54 ` Marcin Juszkiewicz
2 siblings, 0 replies; 7+ messages in thread
From: Phil Blundell @ 2009-06-03 12:32 UTC (permalink / raw)
To: openembedded-devel
On Wed, 2009-06-03 at 13:25 +0200, Marcin Juszkiewicz wrote:
> This patch unbreaks current behaviour which was introduced by
> MACHINE_KERNEL_PR variable.
>
> As most of target machines do not use it they have PR with broken value
> (set to "r0" instead of value in recipe). I took other way which makes
> both types of users happy -- those with MACHINE_KERNEL_PR in use and
> those without it.
>
> By default we set M_K_PR to empty string instead of "r0" - this allows
> to check is it set at all or not. If it is set then we set PR to this value.
> Otherwise we ignore existance of that variable and use PR from recipe.
Thanks for the patch. This does look like a reasonable compromise: as
you say, it should prevent MACHINE_KERNEL_PR causing trouble for those
people who don't want it. So, +1 from me.
p.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] fix for MACHINE_KERNEL_PR stuff
2009-06-03 11:25 [RFC] fix for MACHINE_KERNEL_PR stuff Marcin Juszkiewicz
2009-06-03 11:45 ` Koen Kooi
2009-06-03 12:32 ` Phil Blundell
@ 2009-06-08 15:54 ` Marcin Juszkiewicz
2009-06-09 4:05 ` Rolf Leggewie
2 siblings, 1 reply; 7+ messages in thread
From: Marcin Juszkiewicz @ 2009-06-08 15:54 UTC (permalink / raw)
To: openembedded-devel
Dnia środa, 3 czerwca 2009 o 13:25:43 Marcin Juszkiewicz napisał(a):
> This patch unbreaks current behaviour which was introduced by
> MACHINE_KERNEL_PR variable.
>
> As most of target machines do not use it they have PR with broken
> value (set to "r0" instead of value in recipe). I took other way
> which makes both types of users happy -- those with MACHINE_KERNEL_PR
> in use and those without it.
>
> By default we set M_K_PR to empty string instead of "r0" - this
> allows to check is it set at all or not. If it is set then we set PR
> to this value. Otherwise we ignore existance of that variable and use
> PR from recipe.
>
> Please test and review it. If this will work I will request it for
> stable/2009.
Someone tested that? I would like to get it in .dev and stable/2009 but
not without testing.
Regards,
--
JID: hrw@jabber.org
Website: http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] fix for MACHINE_KERNEL_PR stuff
2009-06-03 11:59 ` Marcin Juszkiewicz
@ 2009-06-08 17:51 ` Koen Kooi
0 siblings, 0 replies; 7+ messages in thread
From: Koen Kooi @ 2009-06-08 17:51 UTC (permalink / raw)
To: openembedded-devel
On 03-06-09 13:59, Marcin Juszkiewicz wrote:
> Dnia środa, 3 czerwca 2009 o 13:45:24 Koen Kooi napisał(a):
>> On 03-06-09 13:25, Marcin Juszkiewicz wrote:
>
>>> + pr = bb.data.getVar('PR', d, True)
>>
>> You're not using 'pr' anywhere in the code you add. Looks fine
>> otherwise, although I haven't tested it.
>
> Thats leftover from older version of patch.
So where's the new version of this patch without cruft?
regards,
koen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] fix for MACHINE_KERNEL_PR stuff
2009-06-08 15:54 ` Marcin Juszkiewicz
@ 2009-06-09 4:05 ` Rolf Leggewie
0 siblings, 0 replies; 7+ messages in thread
From: Rolf Leggewie @ 2009-06-09 4:05 UTC (permalink / raw)
To: openembedded-devel
Marcin Juszkiewicz wrote:
> Someone tested that?
Looks like its doing the right thing.
Tested with minimal distro and machine wrt54. bb file specifies r2.
without patch, it's r0 in bitbake. With the patch, it's r2 as it should be.
Thank you for fixing this, especially since it wasn't you who broke things.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-06-09 4:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-03 11:25 [RFC] fix for MACHINE_KERNEL_PR stuff Marcin Juszkiewicz
2009-06-03 11:45 ` Koen Kooi
2009-06-03 11:59 ` Marcin Juszkiewicz
2009-06-08 17:51 ` Koen Kooi
2009-06-03 12:32 ` Phil Blundell
2009-06-08 15:54 ` Marcin Juszkiewicz
2009-06-09 4:05 ` Rolf Leggewie
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.