Skip to contentSkip to conversation

package/linux-headers: fix support for -rc kernels

PATCH New Arnout Vandecappelle (Essensium/Mind) 5 participants 7 messages Mar 6, 2019 – Mar 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/linux-headers: fix support for -rc kernels

-rc kernels after v3.x are no longer available in the testing subdirectory. Instead they should be fetched from cgit.

Commit ff4cccbdcf5417a5a8c251ff302791a306023cc1 did this for linux itself, now we also do it for linux-headers.

When fetched from cgit, .tar.xz can't be used. Adding this to the existing condition is not so simple, so refactor how _SOURCE is set:
simply set it explicitly in each branch of the condition. While more verbose (it is repeated 4 times), it's easier to understand and to maintain.

---
 package/linux-headers/linux-headers.mk | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)
package/linux-headers/linux-headers.mk +10 -13
index 45e17688c5..4b5ebf8d97 100644
@@ -27,28 +27,29 @@ LINUX_HEADERS_CUSTOM_TARBALL_LOCATION = $(call qstrip,$(BR2_KERNEL_HEADERS_CUSTO
 LINUX_HEADERS_REPO_URL = $(call qstrip,$(BR2_KERNEL_HEADERS_CUSTOM_REPO_URL))
 endif # BR2_KERNEL_HEADERS_AS_KERNEL
 
-# Configure tarball filenames.
+# Compute LINUX_HEADERS_SOURCE and LINUX_HEADERS_SITE from the configuration
 ifeq ($(LINUX_HEADERS_CUSTOM_TARBALL),y)
 LINUX_HEADERS_SOURCE = $(notdir $(LINUX_HEADERS_CUSTOM_TARBALL_LOCATION))
-else ifeq ($(LINUX_HEADERS_CUSTOM_GIT)$(LINUX_HEADERS_CUSTOM_HG)$(LINUX_HEADERS_CUSTOM_SVN),y)
-LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz
-else
-LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz
-endif
-
-# Configure the various kernel source locations.
-ifeq ($(LINUX_HEADERS_CUSTOM_TARBALL),y)
 LINUX_HEADERS_SITE = $(patsubst %/,%,$(dir $(LINUX_HEADERS_CUSTOM_TARBALL_LOCATION)))
 else ifeq ($(LINUX_HEADERS_CUSTOM_GIT),y)
+LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz
 LINUX_HEADERS_SITE = $(LINUX_HEADERS_REPO_URL)
 LINUX_HEADERS_SITE_METHOD = git
 else ifeq ($(LINUX_HEADERS_CUSTOM_HG),y)
+LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz
 LINUX_HEADERS_SITE = $(LINUX_HEADERS_REPO_URL)
 LINUX_HEADERS_SITE_METHOD = hg
 else ifeq ($(LINUX_HEADERS_CUSTOM_SVN),y)
+LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz
 LINUX_HEADERS_SITE = $(LINUX_HEADERS_REPO_URL)
 LINUX_HEADERS_SITE_METHOD = svn
+else ifneq ($(findstring -rc,$(LINUX_HEADERS_VERSION)),)
+# Since 4.12-rc1, -rc kernels are generated from cgit. This also works for
+# older -rc kernels.
+LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz
+LINUX_HEADERS_SITE = https://git.kernel.org/torvalds/t
 else
+LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz
 # In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
 # to use the $(word) function. We support versions such as 4.0, 3.1,
 # 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
@@ -59,10 +60,6 @@ LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
 else ifeq ($(findstring x4.,x$(LINUX_HEADERS_VERSION)),x4.)
 LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
 endif # x2.6
-# release candidates are in testing/ subdir
-ifneq ($(findstring -rc,$(LINUX_HEADERS_VERSION)),)
-LINUX_HEADERS_SITE := $(LINUX_HEADERS_SITE)/testing
-endif # -rc
 endif # LINUX_HEADERS_CUSTOM_TARBALL
 
 # Apply any necessary patches if we are using the headers from a kernel
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 linux{, -headers}: support downloads of v5+

With the arrival of linux v5.0, we need yet another condition to set _SITE correctly. Instead of continuing this madness, solve the problem
generically: use v2.6 for 2.6.*, and use the number before the first dot in the other cases.

While we're at it, remove the comment which has been incorrect since 80d7b68167a5c8893e906ace6b5f0b0166336406 (7 years ago).

---
 linux/linux.mk                         | 9 ++-------
 package/linux-headers/linux-headers.mk | 9 ++-------
 2 files changed, 4 insertions(+), 14 deletions(-)
linux/linux.mk +2 -7
index 2b5d096e14..c7081db88f 100644
@@ -37,15 +37,10 @@ else ifneq ($(findstring -rc,$(LINUX_VERSION)),)
 LINUX_SITE = https://git.kernel.org/torvalds/t
 else
 LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
-# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
-# to use the $(word) function. We support versions such as 4.0, 3.1,
-# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
 ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.)
 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
-else ifeq ($(findstring x3.,x$(LINUX_VERSION)),x3.)
-LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
-else ifeq ($(findstring x4.,x$(LINUX_VERSION)),x4.)
-LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
+else
+LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword $(subst ., ,$(LINUX_VERSION))).x
 endif
 endif
 
package/linux-headers/linux-headers.mk +2 -7
index 4b5ebf8d97..95432ade83 100644
@@ -50,15 +50,10 @@ LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz
 LINUX_HEADERS_SITE = https://git.kernel.org/torvalds/t
 else
 LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz
-# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
-# to use the $(word) function. We support versions such as 4.0, 3.1,
-# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
 ifeq ($(findstring x2.6.,x$(LINUX_HEADERS_VERSION)),x2.6.)
 LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
-else ifeq ($(findstring x3.,x$(LINUX_HEADERS_VERSION)),x3.)
-LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
-else ifeq ($(findstring x4.,x$(LINUX_HEADERS_VERSION)),x4.)
-LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
+else
+LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword $(subst ., ,$(LINUX_HEADERS_VERSION))).x
 endif # x2.6
 endif # LINUX_HEADERS_CUSTOM_TARBALL
 
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/2 linux{, -headers}: support downloads of v5+

Quoted 58 lines · Arnout Vandecappelle (Essensium/Mind)

With the arrival of linux v5.0, we need yet another condition to set _SITE correctly. Instead of continuing this madness, solve the problem
generically: use v2.6 for 2.6.*, and use the number before the first dot in the other cases.

While we're at it, remove the comment which has been incorrect since 80d7b68167a5c8893e906ace6b5f0b0166336406 (7 years ago).

---
 linux/linux.mk                         | 9 ++-------
 package/linux-headers/linux-headers.mk | 9 ++-------
 2 files changed, 4 insertions(+), 14 deletions(-)
linux/linux.mk +2 -7
index 2b5d096e14..c7081db88f 100644
@@ -37,15 +37,10 @@ else ifneq ($(findstring -rc,$(LINUX_VERSION)),)
 LINUX_SITE = https://git.kernel.org/torvalds/t
 else
 LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
-# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
-# to use the $(word) function. We support versions such as 4.0, 3.1,
-# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
 ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.)
 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
-else ifeq ($(findstring x3.,x$(LINUX_VERSION)),x3.)
-LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
-else ifeq ($(findstring x4.,x$(LINUX_VERSION)),x4.)
-LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
+else
+LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword 

$(subst ., ,$(LINUX_VERSION))).x
endif
endif

package/linux-headers/linux-headers.mk +0 -0
index 4b5ebf8d97..95432ade83 100644
@@ -50,15 +50,10 @@ LINUX_HEADERS_SOURCE = 

linux-$(LINUX_HEADERS_VERSION).tar.gz
LINUX_HEADERS_SITE = https://git.kernel.org/torvalds/t
else
LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz

package/linux-headers/linux-headers.mk +2 -7
-# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
-# to use the $(word) function. We support versions such as 4.0, 3.1,
-# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
 ifeq ($(findstring x2.6.,x$(LINUX_HEADERS_VERSION)),x2.6.)
 LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
-else ifeq ($(findstring x3.,x$(LINUX_HEADERS_VERSION)),x3.)
-LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
-else ifeq ($(findstring x4.,x$(LINUX_HEADERS_VERSION)),x4.)
-LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
+else
+LINUX_HEADERS_SITE = 
Quoted 5 lines

$(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword $(subst ., ,$(LINUX_HEADERS_VERSION))).x
endif # x2.6
endif # LINUX_HEADERS_CUSTOM_TARBALL

Thanks!

Jan

#3 lore raw

PATCH 2/2 linux{, -headers}: support downloads of v5+

All;

Quoted 76 lines · Jan Kundr?t
Quoted 58 lines · Arnout Vandecappelle (Essensium/Mind)

With the arrival of linux v5.0, we need yet another condition to set _SITE correctly. Instead of continuing this madness, solve the problem
generically: use v2.6 for 2.6.*, and use the number before the first dot in the other cases.

While we're at it, remove the comment which has been incorrect since 80d7b68167a5c8893e906ace6b5f0b0166336406 (7 years ago).

---
 linux/linux.mk                         | 9 ++-------
 package/linux-headers/linux-headers.mk | 9 ++-------
 2 files changed, 4 insertions(+), 14 deletions(-)
linux/linux.mk +2 -7
index 2b5d096e14..c7081db88f 100644
@@ -37,15 +37,10 @@ else ifneq ($(findstring -rc,$(LINUX_VERSION)),)
 LINUX_SITE = https://git.kernel.org/torvalds/t
 else
 LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
-# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
-# to use the $(word) function. We support versions such as 4.0, 3.1,
-# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
 ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.)
 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
-else ifeq ($(findstring x3.,x$(LINUX_VERSION)),x3.)
-LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
-else ifeq ($(findstring x4.,x$(LINUX_VERSION)),x4.)
-LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
+else
+LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword

$(subst ., ,$(LINUX_VERSION))).x
endif
endif

package/linux-headers/linux-headers.mk +0 -0
index 4b5ebf8d97..95432ade83 100644
@@ -50,15 +50,10 @@ LINUX_HEADERS_SOURCE =

linux-$(LINUX_HEADERS_VERSION).tar.gz
LINUX_HEADERS_SITE = https://git.kernel.org/torvalds/t
else
LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz

package/linux-headers/linux-headers.mk +2 -7
-# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
-# to use the $(word) function. We support versions such as 4.0, 3.1,
-# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
 ifeq ($(findstring x2.6.,x$(LINUX_HEADERS_VERSION)),x2.6.)
 LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
-else ifeq ($(findstring x3.,x$(LINUX_HEADERS_VERSION)),x3.)
-LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
-else ifeq ($(findstring x4.,x$(LINUX_HEADERS_VERSION)),x4.)
-LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
+else
+LINUX_HEADERS_SITE =
Quoted 5 lines

$(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword $(subst ., ,$(LINUX_HEADERS_VERSION))).x
endif # x2.6
endif # LINUX_HEADERS_CUSTOM_TARBALL

Thanks!

Jan
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH 2/2 linux{, -headers}: support downloads of v5+

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

With the arrival of linux v5.0, we need yet another condition to set _SITE correctly. Instead of continuing this madness, solve the problem
generically: use v2.6 for 2.6.*, and use the number before the first dot in the other cases.

While we're at it, remove the comment which has been incorrect since 80d7b68167a5c8893e906ace6b5f0b0166336406 (7 years ago).

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/2 package/linux-headers: fix support for -rc kernels

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 12 lines · On Wed, 6 Mar 2019 22:28:14 +0100 "Arnout Vandecappelle (Essensium/Mind)"…

-rc kernels after v3.x are no longer available in the testing subdirectory. Instead they should be fetched from cgit.

Commit ff4cccbdcf5417a5a8c251ff302791a306023cc1 did this for linux itself, now we also do it for linux-headers.

When fetched from cgit, .tar.xz can't be used. Adding this to the existing condition is not so simple, so refactor how _SOURCE is set:
simply set it explicitly in each branch of the condition. While more verbose (it is repeated 4 times), it's easier to understand and to maintain.

Quoted 4 lines
---
 package/linux-headers/linux-headers.mk | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

Both applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/2 package/linux-headers: fix support for -rc kernels

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

-rc kernels after v3.x are no longer available in the testing subdirectory. Instead they should be fetched from cgit.

Commit ff4cccbdcf5417a5a8c251ff302791a306023cc1 did this for linux itself, now we also do it for linux-headers.

Quoted 7 lines

When fetched from cgit, .tar.xz can't be used. Adding this to the existing condition is not so simple, so refactor how _SOURCE is set:
simply set it explicitly in each branch of the condition. While more verbose (it is repeated 4 times), it's easier to understand and to maintain.

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard