All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Knight <git@jdknight.me>
To: buildroot@buildroot.org
Cc: James Knight <git@jdknight.me>
Subject: [Buildroot] [PATCH v2 1/2] linux: support each linux latest lts version
Date: Fri,  8 Nov 2024 18:12:35 -0500	[thread overview]
Message-ID: <20241108231236.2838-1-git@jdknight.me> (raw)

Provides support for a board configuration to use the latest version of
the Linux kernel for a specific LTS. While the existing
`BR2_LINUX_KERNEL_LATEST_VERSION` allows desired configurations to roll
with a latest stable release, in some scenarios, a user may want the
same ability but for a specific Linux LTS. For example, if a user is
using an external toolchain that is also tied to a specific Linux LTS.

Having these new options avoids the need for rolling configuration to
rely on `BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE` with the
`BR2_DOWNLOAD_FORCE_CHECK_HASHES` option disabled.

Signed-off-by: James Knight <git@jdknight.me>
---
Changes v1 -> v2:
  - Updated versions to use latest versions tracked in `linux.hash`.

See also: https://lore.kernel.org/buildroot/CALAjcgXZKYjpsFV1E7Ry-0N5NEGV01hebSb8tEgoAtHvkfvCOA@mail.gmail.com/
---
 linux/Config.ext.in                  |  4 +--
 linux/Config.in                      | 45 ++++++++++++++++++++++++++++
 linux/linux.mk                       |  2 +-
 package/linux-headers/Config.in.host |  4 +--
 4 files changed, 48 insertions(+), 7 deletions(-)

diff --git a/linux/Config.ext.in b/linux/Config.ext.in
index 3cbf42d3447615105a67ca369fd728784c58ca8b..fe4abd779cfbb969dd1a865821b78fd62c7ca425 100644
--- a/linux/Config.ext.in
+++ b/linux/Config.ext.in
@@ -48,9 +48,7 @@ comment "xenomai needs a uClibc or glibc toolchain w/ threads"
 # RTAI
 config BR2_LINUX_KERNEL_EXT_RTAI
 	bool "RTAI Real-time patch"
-	depends on !BR2_LINUX_KERNEL_LATEST_VERSION
-	depends on !BR2_LINUX_KERNEL_LATEST_CIP_VERSION
-	depends on !BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
+	depends on !BR2_LINUX_KERNEL_LATEST_SERIES
 	select BR2_PACKAGE_RTAI
 	help
 	  RTAI Kernel part.
diff --git a/linux/Config.in b/linux/Config.in
index 16c015b41261e0a12940c1cc1cca4745211b56b9..667601d6f010b6bd7fa1c1481ec54eb19043766a 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -16,6 +16,12 @@ if BR2_LINUX_KERNEL
 config BR2_LINUX_NEEDS_MODULES
 	bool
 
+# Track if the selected kernel version is a "latest" series. This can be
+# used handle certain configurations such as preventing the use of the
+# RTAI Real-time patch.
+config BR2_LINUX_KERNEL_LATEST_SERIES
+	bool
+
 #
 # Version selection. We provide the choice between:
 #
@@ -29,10 +35,42 @@ choice
 
 config BR2_LINUX_KERNEL_LATEST_VERSION
 	bool "Latest version (6.11)"
+	select BR2_LINUX_KERNEL_LATEST_SERIES
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_11 if BR2_KERNEL_HEADERS_AS_KERNEL
 
+config BR2_LINUX_KERNEL_LATEST_LTS_6_6_VERSION
+	bool "Latest LTS 6.6 version"
+	select BR2_LINUX_KERNEL_LATEST_SERIES
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_6 if BR2_KERNEL_HEADERS_AS_KERNEL
+
+config BR2_LINUX_KERNEL_LATEST_LTS_6_1_VERSION
+	bool "Latest LTS 6.1 version"
+	select BR2_LINUX_KERNEL_LATEST_SERIES
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_1 if BR2_KERNEL_HEADERS_AS_KERNEL
+
+config BR2_LINUX_KERNEL_LATEST_LTS_5_15_VERSION
+	bool "Latest LTS 5.15 version"
+	select BR2_LINUX_KERNEL_LATEST_SERIES
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15 if BR2_KERNEL_HEADERS_AS_KERNEL
+
+config BR2_LINUX_KERNEL_LATEST_LTS_5_10_VERSION
+	bool "Latest LTS 5.10 version"
+	select BR2_LINUX_KERNEL_LATEST_SERIES
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 if BR2_KERNEL_HEADERS_AS_KERNEL
+
+config BR2_LINUX_KERNEL_LATEST_LTS_5_4_VERSION
+	bool "Latest LTS 5.4 version"
+	select BR2_LINUX_KERNEL_LATEST_SERIES
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 if BR2_KERNEL_HEADERS_AS_KERNEL
+
+config BR2_LINUX_KERNEL_LATEST_LTS_4_19_VERSION
+	bool "Latest LTS 4.19 version"
+	select BR2_LINUX_KERNEL_LATEST_SERIES
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 if BR2_KERNEL_HEADERS_AS_KERNEL
+
 config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
 	bool "Latest CIP SLTS version (5.10.162-cip24)"
+	select BR2_LINUX_KERNEL_LATEST_SERIES
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 if BR2_KERNEL_HEADERS_AS_KERNEL
 	help
 	  CIP launched in the spring of 2016 to address the needs of
@@ -53,6 +91,7 @@ config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
 
 config BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
 	bool "Latest CIP RT SLTS version (5.10.162-cip24-rt10)"
+	select BR2_LINUX_KERNEL_LATEST_SERIES
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 if BR2_KERNEL_HEADERS_AS_KERNEL
 	help
 	  Same as the CIP version, but this is the PREEMPT_RT realtime
@@ -135,6 +174,12 @@ config BR2_LINUX_KERNEL_CUSTOM_REPO_GIT_SUBMODULES
 config BR2_LINUX_KERNEL_VERSION
 	string
 	default "6.11.6" if BR2_LINUX_KERNEL_LATEST_VERSION
+	default "6.6.59" if BR2_LINUX_KERNEL_LATEST_LTS_6_6_VERSION
+	default "6.1.115" if BR2_LINUX_KERNEL_LATEST_LTS_6_1_VERSION
+	default "5.15.170" if BR2_LINUX_KERNEL_LATEST_LTS_5_15_VERSION
+	default "5.10.228" if BR2_LINUX_KERNEL_LATEST_LTS_5_10_VERSION
+	default "5.4.284" if BR2_LINUX_KERNEL_LATEST_LTS_5_4_VERSION
+	default "4.19.322" if BR2_LINUX_KERNEL_LATEST_LTS_4_19_VERSION
 	default "5.10.162-cip24" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
 	default "5.10.162-cip24-rt10" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
 	default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
diff --git a/linux/linux.mk b/linux/linux.mk
index 1d3d8fffa6085c58d024a8519377365d19766521..477d1e16143bea2f106e7f3f9212d0efefc98db1 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -49,7 +49,7 @@ LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword $(subst ., ,$(LINUX_
 endif
 endif
 
-ifeq ($(BR2_LINUX_KERNEL)$(BR2_LINUX_KERNEL_LATEST_VERSION),y)
+ifeq ($(BR2_LINUX_KERNEL)$(BR2_LINUX_KERNEL_LATEST_SERIES),y)
 BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE)
 endif
 
diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
index 2f7a731d369ad7ac8f2a353fefa1a94c3740e8b1..d47f9fde29e327a05287aa874a46337963f620aa 100644
--- a/package/linux-headers/Config.in.host
+++ b/package/linux-headers/Config.in.host
@@ -114,9 +114,7 @@ endif
 choice
 	bool "Custom kernel headers series"
 	default BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD
-	depends on !BR2_LINUX_KERNEL_LATEST_VERSION || !BR2_KERNEL_HEADERS_AS_KERNEL
-	depends on !BR2_LINUX_KERNEL_LATEST_CIP_VERSION || !BR2_KERNEL_HEADERS_AS_KERNEL
-	depends on !BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION || !BR2_KERNEL_HEADERS_AS_KERNEL
+	depends on !BR2_LINUX_KERNEL_LATEST_SERIES || !BR2_KERNEL_HEADERS_AS_KERNEL
 	depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_AS_KERNEL || \
 		   BR2_KERNEL_HEADERS_CUSTOM_TARBALL || BR2_KERNEL_HEADERS_CUSTOM_GIT
 	help
-- 
2.46.2.windows.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2024-11-08 23:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 23:12 James Knight [this message]
2024-11-08 23:12 ` [Buildroot] [PATCH v2 2/2] support: add a kernel version configuration helper script James Knight
2025-08-29 16:54   ` Arnout Vandecappelle via buildroot

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=20241108231236.2838-1-git@jdknight.me \
    --to=git@jdknight.me \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.