Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Olivain <ju.o@free.fr>
To: buildroot@buildroot.org
Cc: Julien Olivain <ju.o@free.fr>
Subject: [Buildroot] [PATCH next 2/2] package/linux-backports: add version 5.15.58
Date: Wed, 17 Aug 2022 23:37:24 +0200	[thread overview]
Message-ID: <20220817213724.10547-2-ju.o@free.fr> (raw)
In-Reply-To: <20220817213724.10547-1-ju.o@free.fr>

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(-)

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

  reply	other threads:[~2022-08-17 21:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 21:37 [Buildroot] [PATCH next 1/2] package/linux-backports: bump version to 5.10.110 Julien Olivain
2022-08-17 21:37 ` Julien Olivain [this message]
2022-08-20  9:24   ` [Buildroot] [PATCH next 2/2] package/linux-backports: add version 5.15.58 Yann E. MORIN
2022-08-20  9:23 ` [Buildroot] [PATCH next 1/2] package/linux-backports: bump version to 5.10.110 Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220817213724.10547-2-ju.o@free.fr \
    --to=ju.o@free.fr \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox