Skip to contentSkip to conversation

linux-raspberrypi-base.bbclass: allow -rt kernels

PATCH In review Trevor Woerner 4 participants 6 messages Nov 28, 2016 – Dec 7, 2016 Broadcom BCM2711/BCM2835 Arm architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-raspberrypi-base.bbclass: allow -rt kernels

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.

---
 classes/linux-raspberrypi-base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/linux-raspberrypi-base.bbclass +1 -1
index 3a6e33d..fecac30 100644
@@ -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
 
Signature · 1 line
2.10.2
#1 lore raw
Quoted 8 lines · Trevor Woerner

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

Quoted 26 lines

---
classes/linux-raspberrypi-base.bbclass | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
classes/linux-raspberrypi-base.bbclass +1 -1
index 3a6e33d..fecac30 100644
@@ -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
 
Signature · 7 lines
2.10.2

-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
#2 lore raw
Quoted 10 lines · Khem Raj
Quoted 8 lines · Trevor Woerner

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.

Quoted 28 lines
Quoted 27 lines

---
classes/linux-raspberrypi-base.bbclass | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
classes/linux-raspberrypi-base.bbclass +1 -1
index 3a6e33d..fecac30 100644
@@ -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
 
Signature · 7 lines
2.10.2

-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
#3 lore raw
Quoted 10 lines · Trevor Woerner
Quoted 9 lines · Khem Raj
Quoted 8 lines · Trevor Woerner

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.

Quoted 7 lines
Quoted 1 line

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

#4 lore raw
Quoted 13 lines · Andrei Gherzan
Quoted 12 lines · Trevor Woerner
Quoted 10 lines · Khem Raj
Quoted 8 lines · Trevor Woerner

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

Quoted 7 lines
Quoted 5 lines

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*

Quoted 5 lines

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

--
Andrei Gherzan

--
Andrei Gherzan

#5 lore raw
Quoted 24 lines · Andrei Gherzan
Quoted 13 lines · Andrei Gherzan
Quoted 12 lines · Trevor Woerner
Quoted 10 lines · Khem Raj
Quoted 8 lines · Trevor Woerner

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

Quoted 7 lines
Quoted 5 lines

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*

Quoted 8 lines
Quoted 5 lines

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