Skip to contentSkip to conversation

backports: allow building backports package on 4.0+ kernel

PATCH In review Arend van Spriel 4 participants 8 messages Feb 26, 2015 – Apr 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backports: allow building backports package on 4.0+ kernel

When attempting to build backport package the error message "Kernel version parse failed" popped up. Realizing the machine was already running a 4.0-rc1 kernel, this patch fixes the issue. At least until kernel 9.x it will.

---
 backport/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
backport/Makefile +1 -1
index c21b813..1c39f64 100644
@@ -85,7 +85,7 @@ mrproper:
 			done								\
 		) > Kconfig.kernel							;\
 		kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) kernelversion |	\
-			sed 's/^\(\(3\|2\.6\)\.[0-9]\+\).*/\1/;t;d')			;\
+			sed 's/^\(\([3-9]\|2\.6\)\.[0-9]\+\).*/\1/;t;d')			;\
 		test "$$kver" != "" || echo "Kernel version parse failed!"		;\
 		test "$$kver" != ""							;\
 		kvers="$$(seq 14 39 | sed 's/^/2.6./')"					;\
Signature · 1 line
1.9.1
#1 lore raw
Quoted 4 lines · Arend van Spriel

When attempting to build backport package the error message "Kernel version parse failed" popped up. Realizing the machine was already running a 4.0-rc1 kernel, this patch fixes the issue. At least until kernel 9.x it will.

Is this really enough? we also generate those kernel version Kconfig symbols for dependencies - I htink that needs to be adjusted as well.

johannes

#2 lore raw
Quoted 8 lines · Johannes Berg
Quoted 4 lines · Arend van Spriel

When attempting to build backport package the error message "Kernel version parse failed" popped up. Realizing the machine was already running a 4.0-rc1 kernel, this patch fixes the issue. At least until kernel 9.x it will.

Is this really enough? we also generate those kernel version Kconfig symbols for dependencies - I htink that needs to be adjusted as well.

Will double-check the results. Building it worked without issues, but it could be due to the fact that backport and target kernel versions are the same. You made me a bit wary to actually load the modules, but I will do it anyway ;-)

Arend

Quoted 2 lines

johannes

#3 lore raw
Quoted 7 lines · Arend van Spriel
Quoted 6 lines · Johannes Berg
Quoted 4 lines · Arend van Spriel

When attempting to build backport package the error message "Kernel version parse failed" popped up. Realizing the machine was already running a 4.0-rc1 kernel, this patch fixes the issue. At least until kernel 9.x it will.

Quoted 7 lines
Quoted 2 lines

Is this really enough? we also generate those kernel version Kconfig symbols for dependencies - I htink that needs to be adjusted as well.

Will double-check the results. Building it worked without issues, but it could be due to the fact that backport and target kernel versions are the same. You made me a bit wary to actually load the modules, but I will do it anyway ;-)

Seems to be really enough for this (unlikely) scenario.

Regards,
Arend

Quoted 9 lines

Arend

Quoted 2 lines

johannes

--
To unsubscribe from this list: send the line "unsubscribe backports" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 1 line · Arend van Spriel

Seems to be really enough for this (unlikely) scenario.

I think it'll be fine until somebody puts

SOME_SYMBOL 4.0

into the dependencies file.

I guess you could try that with some random symbol and see what happens? I think it would never be selectable.

johannes

#5 lore raw

PATCH 1/1 backports: add support for 4.x kernels

From: Luciano Coelho <[email protected]>

Adjust the kernel version parsing and list of backport files generation for 4.x kernels.

---
I was working on the same thing and Johannes told me that Arend had a similar patch. Maybe this one can be used?

 backport/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
backport/Makefile +3 -2
index ea3982b..c4962c9 100644
@@ -85,11 +85,12 @@ mrproper:
 			done								\
 		) > Kconfig.kernel							;\
 		kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) kernelversion |	\
-			sed 's/^\(\(3\|2\.6\)\.[0-9]\+\).*/\1/;t;d')			;\
+			sed 's/^\(\([3-4]\|2\.6\)\.[0-9]\+\).*/\1/;t;d')		;\
 		test "$$kver" != "" || echo "Kernel version parse failed!"		;\
 		test "$$kver" != ""							;\
 		kvers="$$(seq 14 39 | sed 's/^/2.6./')"					;\
-		kvers="$$kvers $$(seq 0 99 | sed 's/^/3./')"				;\
+		kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')"				;\
+		kvers="$$kvers $$(seq 0 99 | sed 's/^/4./')"				;\
 		print=0									;\
 		for v in $$kvers ; do							\
 			if [ "$$print" = "1" ] ; then					\
Signature · 1 line
2.1.4
#6 lore raw

Re: [PATCH] backports: add support for 4.x kernels

backport/Makefile mrproper: · line 93

Quoted 3 lines · Luca Coelho
backport/Makefile +2 -1
-		kvers="$$kvers $$(seq 0 99 | sed 's/^/3./')"				;\
+		kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')"				;\
+		kvers="$$kvers $$(seq 0 99 | sed 's/^/4./')"				;\

This seems to be the part I was concerned was missing in Arend's patch.

johannes

#7 lore raw

Re: [PATCH] backports: add support for 4.x kernels

In reply to Luca Coelho
Quoted 5 lines · Luca Coelho

From: Luciano Coelho <[email protected]>

Adjust the kernel version parsing and list of backport files generation for 4.x kernels.

Quoted 7 lines

---
I was working on the same thing and Johannes told me that Arend had a similar patch. Maybe this one can be used?

 backport/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Thank you for the patch it was applied to backports.

Hauke