All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-raspberrypi][PATCH] linux-raspberrypi-base.bbclass: allow -rt kernels
@ 2016-11-28 19:07 Trevor Woerner
  2016-11-28 23:16 ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Trevor Woerner @ 2016-11-28 19:07 UTC (permalink / raw)
  To: yocto

If the PREEMPT_RT patch is applied, the kernel version becomes, say,
4.4.32-rt43 (instead of 4.4.32). This confuses the version handling code in
this class. Update how the version string is processed so that trailing rt-
strings are properly handled, in addition to handling the existing cases.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 classes/linux-raspberrypi-base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/linux-raspberrypi-base.bbclass b/classes/linux-raspberrypi-base.bbclass
index 3a6e33d..fecac30 100644
--- a/classes/linux-raspberrypi-base.bbclass
+++ b/classes/linux-raspberrypi-base.bbclass
@@ -15,7 +15,7 @@ def get_dts(d, ver=None):
         ver = get_kernelversion_file(staging_dir)
 
     if ver is not None:
-        min_ver = ver.split('.', 3)
+        min_ver = re.split(r'[.-]+', ver, maxsplit=3)
     else:
         return dts
 
-- 
2.10.2



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

* Re: [meta-raspberrypi][PATCH] linux-raspberrypi-base.bbclass: allow -rt kernels
  2016-11-28 19:07 [meta-raspberrypi][PATCH] linux-raspberrypi-base.bbclass: allow -rt kernels Trevor Woerner
@ 2016-11-28 23:16 ` Khem Raj
  2016-11-29  1:37   ` Trevor Woerner
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2016-11-28 23:16 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto


> On Nov 28, 2016, at 11:07 AM, Trevor Woerner <twoerner@gmail.com> wrote:
> 
> If the PREEMPT_RT patch is applied, the kernel version becomes, say,
> 4.4.32-rt43 (instead of 4.4.32). This confuses the version handling code in
> this class. Update how the version string is processed so that trailing rt-
> strings are properly handled, in addition to handling the existing cases.
> 

This probably will solve the issue I see with 4.9-rcX recipes that are in my tree on kraj/master

> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
> classes/linux-raspberrypi-base.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/classes/linux-raspberrypi-base.bbclass b/classes/linux-raspberrypi-base.bbclass
> index 3a6e33d..fecac30 100644
> --- a/classes/linux-raspberrypi-base.bbclass
> +++ b/classes/linux-raspberrypi-base.bbclass
> @@ -15,7 +15,7 @@ def get_dts(d, ver=None):
>         ver = get_kernelversion_file(staging_dir)
> 
>     if ver is not None:
> -        min_ver = ver.split('.', 3)
> +        min_ver = re.split(r'[.-]+', ver, maxsplit=3)
>     else:
>         return dts
> 
> -- 
> 2.10.2
> 
> -- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



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

* Re: [meta-raspberrypi][PATCH] linux-raspberrypi-base.bbclass: allow -rt kernels
  2016-11-28 23:16 ` Khem Raj
@ 2016-11-29  1:37   ` Trevor Woerner
  2016-12-06 18:27     ` Andrei Gherzan
  0 siblings, 1 reply; 6+ messages in thread
From: Trevor Woerner @ 2016-11-29  1:37 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

On Mon 2016-11-28 @ 03:16:11 PM, Khem Raj wrote:
> 
> > On Nov 28, 2016, at 11:07 AM, Trevor Woerner <twoerner@gmail.com> wrote:
> > 
> > If the PREEMPT_RT patch is applied, the kernel version becomes, say,
> > 4.4.32-rt43 (instead of 4.4.32). This confuses the version handling code in
> > this class. Update how the version string is processed so that trailing rt-
> > strings are properly handled, in addition to handling the existing cases.
> > 
> 
> This probably will solve the issue I see with 4.9-rcX recipes that are in my tree on kraj/master

I'm not familiar with the issue you're seeing, but the existing and new code
are looking for 3 int()s separated by periods. If your recipes have the string
"4.9-rcX" then I'm guessing there might still be an issue since the third
int() will be "-rcX" in your case. If this is true, you'll need to take a look
at where "int(min_ver[2])" is used further down in that bbclass file.

> 
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> > classes/linux-raspberrypi-base.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/classes/linux-raspberrypi-base.bbclass b/classes/linux-raspberrypi-base.bbclass
> > index 3a6e33d..fecac30 100644
> > --- a/classes/linux-raspberrypi-base.bbclass
> > +++ b/classes/linux-raspberrypi-base.bbclass
> > @@ -15,7 +15,7 @@ def get_dts(d, ver=None):
> >         ver = get_kernelversion_file(staging_dir)
> > 
> >     if ver is not None:
> > -        min_ver = ver.split('.', 3)
> > +        min_ver = re.split(r'[.-]+', ver, maxsplit=3)
> >     else:
> >         return dts
> > 
> > -- 
> > 2.10.2
> > 
> > -- 
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> 


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

* Re: [meta-raspberrypi][PATCH] linux-raspberrypi-base.bbclass: allow -rt kernels
  2016-11-29  1:37   ` Trevor Woerner
@ 2016-12-06 18:27     ` Andrei Gherzan
  2016-12-06 18:37       ` Andrei Gherzan
  0 siblings, 1 reply; 6+ messages in thread
From: Andrei Gherzan @ 2016-12-06 18:27 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]

On Mon, Nov 28, 2016 at 08:37:09PM -0500, Trevor Woerner wrote:
> On Mon 2016-11-28 @ 03:16:11 PM, Khem Raj wrote:
> >
> > > On Nov 28, 2016, at 11:07 AM, Trevor Woerner <twoerner@gmail.com> wrote:
> > >
> > > If the PREEMPT_RT patch is applied, the kernel version becomes, say,
> > > 4.4.32-rt43 (instead of 4.4.32). This confuses the version handling code in
> > > this class. Update how the version string is processed so that trailing rt-
> > > strings are properly handled, in addition to handling the existing cases.
> > >
> >
> > This probably will solve the issue I see with 4.9-rcX recipes that are in my tree on kraj/master
>
> I'm not familiar with the issue you're seeing, but the existing and new code
> are looking for 3 int()s separated by periods. If your recipes have the string
> "4.9-rcX" then I'm guessing there might still be an issue since the third
> int() will be "-rcX" in your case. If this is true, you'll need to take a look
> at where "int(min_ver[2])" is used further down in that bbclass file.

I agreed this is not the best implementation of this. We should only get
the version using a regex that would get X.Y.Z-R with an optional Z and
R.

--
Andrei Gherzan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 817 bytes --]

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

* Re: [meta-raspberrypi][PATCH] linux-raspberrypi-base.bbclass: allow -rt kernels
  2016-12-06 18:27     ` Andrei Gherzan
@ 2016-12-06 18:37       ` Andrei Gherzan
  2016-12-07  8:02         ` Andreas Müller
  0 siblings, 1 reply; 6+ messages in thread
From: Andrei Gherzan @ 2016-12-06 18:37 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

On Tue, Dec 06, 2016 at 06:27:32PM +0000, Andrei Gherzan wrote:
> On Mon, Nov 28, 2016 at 08:37:09PM -0500, Trevor Woerner wrote:
> > On Mon 2016-11-28 @ 03:16:11 PM, Khem Raj wrote:
> > >
> > > > On Nov 28, 2016, at 11:07 AM, Trevor Woerner <twoerner@gmail.com> wrote:
> > > >
> > > > If the PREEMPT_RT patch is applied, the kernel version becomes, say,
> > > > 4.4.32-rt43 (instead of 4.4.32). This confuses the version handling code in
> > > > this class. Update how the version string is processed so that trailing rt-
> > > > strings are properly handled, in addition to handling the existing cases.
> > > >
> > >
> > > This probably will solve the issue I see with 4.9-rcX recipes that are in my tree on kraj/master
> >
> > I'm not familiar with the issue you're seeing, but the existing and new code
> > are looking for 3 int()s separated by periods. If your recipes have the string
> > "4.9-rcX" then I'm guessing there might still be an issue since the third
> > int() will be "-rcX" in your case. If this is true, you'll need to take a look
> > at where "int(min_ver[2])" is used further down in that bbclass file.
>
> I agreed this is not the best implementation of this. We should only get

agree*

> the version using a regex that would get X.Y.Z-R with an optional Z and
> R.
>
> --
> Andrei Gherzan
--
Andrei Gherzan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 817 bytes --]

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

* Re: [meta-raspberrypi][PATCH] linux-raspberrypi-base.bbclass: allow -rt kernels
  2016-12-06 18:37       ` Andrei Gherzan
@ 2016-12-07  8:02         ` Andreas Müller
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Müller @ 2016-12-07  8:02 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: Yocto Project

On Tue, Dec 6, 2016 at 7:37 PM, Andrei Gherzan <andrei@gherzan.ro> wrote:
> On Tue, Dec 06, 2016 at 06:27:32PM +0000, Andrei Gherzan wrote:
>> On Mon, Nov 28, 2016 at 08:37:09PM -0500, Trevor Woerner wrote:
>> > On Mon 2016-11-28 @ 03:16:11 PM, Khem Raj wrote:
>> > >
>> > > > On Nov 28, 2016, at 11:07 AM, Trevor Woerner <twoerner@gmail.com> wrote:
>> > > >
>> > > > If the PREEMPT_RT patch is applied, the kernel version becomes, say,
>> > > > 4.4.32-rt43 (instead of 4.4.32). This confuses the version handling code in
>> > > > this class. Update how the version string is processed so that trailing rt-
>> > > > strings are properly handled, in addition to handling the existing cases.
>> > > >
>> > >
>> > > This probably will solve the issue I see with 4.9-rcX recipes that are in my tree on kraj/master
>> >
>> > I'm not familiar with the issue you're seeing, but the existing and new code
>> > are looking for 3 int()s separated by periods. If your recipes have the string
>> > "4.9-rcX" then I'm guessing there might still be an issue since the third
>> > int() will be "-rcX" in your case. If this is true, you'll need to take a look
>> > at where "int(min_ver[2])" is used further down in that bbclass file.
>>
>> I agreed this is not the best implementation of this. We should only get
>
> agree*
>
>> the version using a regex that would get X.Y.Z-R with an optional Z and
>> R.
>>
>> --
>> Andrei Gherzan
> --
> Andrei Gherzan
>
Question is if this version dance in get_dts is still necessary: We
don't have kernel < 3.18 or kernel 4.4.<6 around. Why not use what is
set in KERNEL_DEVICETREE?

Andreas


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

end of thread, other threads:[~2016-12-07  8:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28 19:07 [meta-raspberrypi][PATCH] linux-raspberrypi-base.bbclass: allow -rt kernels Trevor Woerner
2016-11-28 23:16 ` Khem Raj
2016-11-29  1:37   ` Trevor Woerner
2016-12-06 18:27     ` Andrei Gherzan
2016-12-06 18:37       ` Andrei Gherzan
2016-12-07  8:02         ` Andreas Müller

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.