diff mbox series

[next,2/2] package/linux-backports: add version 5.15.58

Message ID 20220817213724.10547-2-ju.o@free.fr
State Accepted
Headers show
Series [next,1/2] package/linux-backports: bump version to 5.10.110 | expand

Commit Message

Julien Olivain Aug. 17, 2022, 9:37 p.m. UTC
This commit add a new package version, while keeping the previous one.

This was suggested in:
https://lists.buildroot.org/pipermail/buildroot/2022-August/649398.html

This is because linux-backports increased its minimal requirements on
kernel version. Since Buildroot want to support a wide range of kernel
versions, this package now supports several backport versions, one for
each kernel version era (backports v5.10.110 for kernels down to version
3.10, backports v5.15.58 for kernels down to version 4.4).

For detailed release commit log, see:
https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/log/?h=v5.15.58-1

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/linux-backports/Config.in            | 20 ++++++++++++++---
 package/linux-backports/linux-backports.hash |  2 ++
 package/linux-backports/linux-backports.mk   | 23 +++++++++++++++-----
 3 files changed, 37 insertions(+), 8 deletions(-)

Comments

Yann E. MORIN Aug. 20, 2022, 9:24 a.m. UTC | #1
Julien, All,

On 2022-08-17 23:37 +0200, Julien Olivain spake thusly:
> This commit add a new package version, while keeping the previous one.
> 
> This was suggested in:
> https://lists.buildroot.org/pipermail/buildroot/2022-August/649398.html
> 
> This is because linux-backports increased its minimal requirements on
> kernel version. Since Buildroot want to support a wide range of kernel
> versions, this package now supports several backport versions, one for
> each kernel version era (backports v5.10.110 for kernels down to version
> 3.10, backports v5.15.58 for kernels down to version 4.4).
> 
> For detailed release commit log, see:
> https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/log/?h=v5.15.58-1
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

I've modified and simplified the help text for the choice, and applied
to next, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/linux-backports/Config.in            | 20 ++++++++++++++---
>  package/linux-backports/linux-backports.hash |  2 ++
>  package/linux-backports/linux-backports.mk   | 23 +++++++++++++++-----
>  3 files changed, 37 insertions(+), 8 deletions(-)
> 
> diff --git a/package/linux-backports/Config.in b/package/linux-backports/Config.in
> index 251d202fd2..bdc1074ebd 100644
> --- a/package/linux-backports/Config.in
> +++ b/package/linux-backports/Config.in
> @@ -8,13 +8,27 @@ config BR2_PACKAGE_LINUX_BACKPORTS
>  	  The linux-backports package includes many Linux drivers from
>  	  recent kernels, backported to older ones.
>  
> -	  This version of linux-backports supports kernels starting
> -	  from 3.10.
> -
>  	  https://backports.wiki.kernel.org
>  
>  if BR2_PACKAGE_LINUX_BACKPORTS
>  
> +choice
> +	prompt "Linux Backports version"
> +	default BR2_PACKAGE_LINUX_BACKPORTS_5_15_X
> +	help
> +	  Newer Linux Backports version increased the minimal kernel
> +	  version requirement. This package has several versions, to
> +	  keep support for older kernels. Select the higher version
> +	  that will support the kernel version.
> +
> +config BR2_PACKAGE_LINUX_BACKPORTS_5_15_X
> +	bool "5.15.x (for kernels back to 4.4)"
> +
> +config BR2_PACKAGE_LINUX_BACKPORTS_5_10_X
> +	bool "5.10.x (for kernels back to 3.10)"
> +
> +endchoice
> +
>  choice
>  	prompt "Linux kernel driver backports configuration"
>  	default BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG
> diff --git a/package/linux-backports/linux-backports.hash b/package/linux-backports/linux-backports.hash
> index 83a3e54cd7..ce4278dffa 100644
> --- a/package/linux-backports/linux-backports.hash
> +++ b/package/linux-backports/linux-backports.hash
> @@ -1,5 +1,7 @@
>  # From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.10.110/sha256sums.asc
>  sha256  3d958154080c059adaf26512430fd1a8888d65a2228e5e70e48d028201e148b1  backports-5.10.110-1.tar.xz
> +# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.15.58/sha256sums.asc
> +sha256  a3c2a2b7bbaf8943c65fd72f4e7d7ad5e205aeae28b26c835f9d8afa0f9810bf  backports-5.15.58-1.tar.xz
>  # Locally computed
>  sha256  fb5a425bd3b3cd6071a3a9aff9909a859e7c1158d54d32e07658398cd67eb6a0  COPYING
>  sha256  8e378ab93586eb55135d3bc119cce787f7324f48394777d00c34fa3d0be3303f  LICENSES/exceptions/Linux-syscall-note
> diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
> index a39891336d..dd3ff8271e 100644
> --- a/package/linux-backports/linux-backports.mk
> +++ b/package/linux-backports/linux-backports.mk
> @@ -4,7 +4,17 @@
>  #
>  ################################################################################
>  
> +ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_5_10_X),y)
>  LINUX_BACKPORTS_VERSION_MAJOR = 5.10.110
> +LINUX_BACKPORTS_MINIMAL_KVER_MAJOR = 3
> +LINUX_BACKPORTS_MINIMAL_KVER_MINOR = 10
> +else
> +# use default the latest version as default
> +LINUX_BACKPORTS_VERSION_MAJOR = 5.15.58
> +LINUX_BACKPORTS_MINIMAL_KVER_MAJOR = 4
> +LINUX_BACKPORTS_MINIMAL_KVER_MINOR = 4
> +endif
> +
>  LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
>  LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
>  LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
> @@ -93,8 +103,8 @@ $(eval $(kconfig-package))
>  # can't use it as a stamp file. We use the LINUX_KCONFIG_STAMP_DOTCONFIG
>  # instead.
>  #
> -# Furthermore, we want to check the kernel version, since linux-backports
> -# only supports kernels >= 3.10. To avoid overriding linux-backports'
> +# Furthermore, we want to check the kernel version is compatible with
> +# linux-backports. To avoid overriding linux-backports'
>  # KCONFIG_STAMP_DOTCONFIG rule defined in the kconfig-package infra, we
>  # use an intermediate stamp-file.
>  #
> @@ -107,11 +117,14 @@ $(LINUX_BACKPORTS_DIR)/$(LINUX_BACKPORTS_KCONFIG_STAMP_DOTCONFIG): $(LINUX_BACKP
>  .SECONDEXPANSION:
>  $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/$$(LINUX_KCONFIG_STAMP_DOTCONFIG)
>  	$(Q)KVER=$(LINUX_VERSION_PROBED); \
> +	MIN_KVER_MAJOR=$(LINUX_BACKPORTS_MINIMAL_KVER_MAJOR); \
> +	MIN_KVER_MINOR=$(LINUX_BACKPORTS_MINIMAL_KVER_MINOR); \
>  	KVER_MAJOR=`echo $${KVER} | sed 's/^\([0-9]*\)\..*/\1/'`; \
>  	KVER_MINOR=`echo $${KVER} | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`; \
> -	if [ $${KVER_MAJOR} -lt 3 -o \( $${KVER_MAJOR} -eq 3 -a $${KVER_MINOR} -lt 10 \) ]; then \
> -		printf "Linux version '%s' is too old for linux-backports (needs 3.10 or later)\n" \
> -			"$${KVER}"; \
> +	if [ $${KVER_MAJOR} -lt $${MIN_KVER_MAJOR} -o \
> +		\( $${KVER_MAJOR} -eq $${MIN_KVER_MAJOR} -a $${KVER_MINOR} -lt $${MIN_KVER_MINOR} \) ]; then \
> +		printf "Linux version '%s' is too old for linux-backports (needs %s.%s or later)\n" \
> +			"$${KVER}" "$${MIN_KVER_MAJOR}" "$${MIN_KVER_MINOR}"; \
>  		exit 1; \
>  	fi
>  	$(Q)touch $(@)
> -- 
> 2.37.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/linux-backports/Config.in b/package/linux-backports/Config.in
index 251d202fd2..bdc1074ebd 100644
--- a/package/linux-backports/Config.in
+++ b/package/linux-backports/Config.in
@@ -8,13 +8,27 @@  config BR2_PACKAGE_LINUX_BACKPORTS
 	  The linux-backports package includes many Linux drivers from
 	  recent kernels, backported to older ones.
 
-	  This version of linux-backports supports kernels starting
-	  from 3.10.
-
 	  https://backports.wiki.kernel.org
 
 if BR2_PACKAGE_LINUX_BACKPORTS
 
+choice
+	prompt "Linux Backports version"
+	default BR2_PACKAGE_LINUX_BACKPORTS_5_15_X
+	help
+	  Newer Linux Backports version increased the minimal kernel
+	  version requirement. This package has several versions, to
+	  keep support for older kernels. Select the higher version
+	  that will support the kernel version.
+
+config BR2_PACKAGE_LINUX_BACKPORTS_5_15_X
+	bool "5.15.x (for kernels back to 4.4)"
+
+config BR2_PACKAGE_LINUX_BACKPORTS_5_10_X
+	bool "5.10.x (for kernels back to 3.10)"
+
+endchoice
+
 choice
 	prompt "Linux kernel driver backports configuration"
 	default BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG
diff --git a/package/linux-backports/linux-backports.hash b/package/linux-backports/linux-backports.hash
index 83a3e54cd7..ce4278dffa 100644
--- a/package/linux-backports/linux-backports.hash
+++ b/package/linux-backports/linux-backports.hash
@@ -1,5 +1,7 @@ 
 # From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.10.110/sha256sums.asc
 sha256  3d958154080c059adaf26512430fd1a8888d65a2228e5e70e48d028201e148b1  backports-5.10.110-1.tar.xz
+# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.15.58/sha256sums.asc
+sha256  a3c2a2b7bbaf8943c65fd72f4e7d7ad5e205aeae28b26c835f9d8afa0f9810bf  backports-5.15.58-1.tar.xz
 # Locally computed
 sha256  fb5a425bd3b3cd6071a3a9aff9909a859e7c1158d54d32e07658398cd67eb6a0  COPYING
 sha256  8e378ab93586eb55135d3bc119cce787f7324f48394777d00c34fa3d0be3303f  LICENSES/exceptions/Linux-syscall-note
diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
index a39891336d..dd3ff8271e 100644
--- a/package/linux-backports/linux-backports.mk
+++ b/package/linux-backports/linux-backports.mk
@@ -4,7 +4,17 @@ 
 #
 ################################################################################
 
+ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_5_10_X),y)
 LINUX_BACKPORTS_VERSION_MAJOR = 5.10.110
+LINUX_BACKPORTS_MINIMAL_KVER_MAJOR = 3
+LINUX_BACKPORTS_MINIMAL_KVER_MINOR = 10
+else
+# use default the latest version as default
+LINUX_BACKPORTS_VERSION_MAJOR = 5.15.58
+LINUX_BACKPORTS_MINIMAL_KVER_MAJOR = 4
+LINUX_BACKPORTS_MINIMAL_KVER_MINOR = 4
+endif
+
 LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
 LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
 LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
@@ -93,8 +103,8 @@  $(eval $(kconfig-package))
 # can't use it as a stamp file. We use the LINUX_KCONFIG_STAMP_DOTCONFIG
 # instead.
 #
-# Furthermore, we want to check the kernel version, since linux-backports
-# only supports kernels >= 3.10. To avoid overriding linux-backports'
+# Furthermore, we want to check the kernel version is compatible with
+# linux-backports. To avoid overriding linux-backports'
 # KCONFIG_STAMP_DOTCONFIG rule defined in the kconfig-package infra, we
 # use an intermediate stamp-file.
 #
@@ -107,11 +117,14 @@  $(LINUX_BACKPORTS_DIR)/$(LINUX_BACKPORTS_KCONFIG_STAMP_DOTCONFIG): $(LINUX_BACKP
 .SECONDEXPANSION:
 $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/$$(LINUX_KCONFIG_STAMP_DOTCONFIG)
 	$(Q)KVER=$(LINUX_VERSION_PROBED); \
+	MIN_KVER_MAJOR=$(LINUX_BACKPORTS_MINIMAL_KVER_MAJOR); \
+	MIN_KVER_MINOR=$(LINUX_BACKPORTS_MINIMAL_KVER_MINOR); \
 	KVER_MAJOR=`echo $${KVER} | sed 's/^\([0-9]*\)\..*/\1/'`; \
 	KVER_MINOR=`echo $${KVER} | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`; \
-	if [ $${KVER_MAJOR} -lt 3 -o \( $${KVER_MAJOR} -eq 3 -a $${KVER_MINOR} -lt 10 \) ]; then \
-		printf "Linux version '%s' is too old for linux-backports (needs 3.10 or later)\n" \
-			"$${KVER}"; \
+	if [ $${KVER_MAJOR} -lt $${MIN_KVER_MAJOR} -o \
+		\( $${KVER_MAJOR} -eq $${MIN_KVER_MAJOR} -a $${KVER_MINOR} -lt $${MIN_KVER_MINOR} \) ]; then \
+		printf "Linux version '%s' is too old for linux-backports (needs %s.%s or later)\n" \
+			"$${KVER}" "$${MIN_KVER_MAJOR}" "$${MIN_KVER_MINOR}"; \
 		exit 1; \
 	fi
 	$(Q)touch $(@)