scripts: Remove pre-3.10 kernel support

Reject unsupported kernel versions before download or patch generation.
Remove 2.x paths, RHEL 5/6 and Scientific Linux repositories, and
compatibility branches that cannot run with the Linux 3.10 minimum.

Keep the maintained ABT_KERNELS matrix unchanged.
This commit is contained in:
Gleb Chesnokov
2026-08-21 19:58:59 +03:00
parent f6ae51b613
commit 2b1dc822e8
5 changed files with 36 additions and 227 deletions
+5 -13
View File
@@ -75,7 +75,7 @@ function evaluate(stmnt, pattern, arg, op, result) {
gsub("defined\\(REGISTER_MAD_AGENT_HAS_FLAGS_ARG\\)",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) || " \
"RHEL_RELEASE_CODE -0 >= 6 * 256 + 9)", stmnt)
"RHEL_RELEASE_CODE -0 >= 7 * 256)", stmnt)
gsub("SOCK_RECVMSG_HAS_FOUR_ARGS",
"(LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) \\&\\& " \
@@ -89,8 +89,7 @@ function evaluate(stmnt, pattern, arg, op, result) {
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) || " \
"RHEL_RELEASE_CODE -0 >= 7 * 256 + 5)", stmnt)
gsub("defined\\(CREATE_SEND_MAD_HAS_AH_ARG\\)",
"(LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16))", stmnt)
gsub("defined\\(CREATE_SEND_MAD_HAS_AH_ARG\\)", "0", stmnt)
gsub("defined\\(CREATE_SEND_MAD_HAS_BASE_ARG\\)",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) || " \
@@ -148,10 +147,6 @@ function evaluate(stmnt, pattern, arg, op, result) {
gsub("HAVE_STRUCT_SRP_LOGIN_REQ_RDMA",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0))", stmnt)
gsub("defined\\(HAVE_IB_EVENT_GID_CHANGE\\)",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) || " \
"RHEL_RELEASE_CODE -0 >= 6 * 256 + 9)", stmnt)
gsub("defined\\(HAVE_IB_QUERY_DEVICE\\)",
"(LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) \\&\\& " \
"RHEL_RELEASE_CODE -0 < 7 * 256 + 5)", stmnt)
@@ -168,8 +163,7 @@ function evaluate(stmnt, pattern, arg, op, result) {
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) || " \
"RHEL_RELEASE_CODE -0 >= 7 * 256 + 5)", stmnt)
gsub("defined\\(HAVE_IB_DMA_MAP_OPS\\)",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(0, 0, 0))", stmnt)
gsub("defined\\(HAVE_IB_DMA_MAP_OPS\\)", "1", stmnt)
gsub("HAVE_IB_SG_DMA_LEN",
"(LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) \\&\\& " \
@@ -193,8 +187,6 @@ function evaluate(stmnt, pattern, arg, op, result) {
gsub("defined\\(INSIDE_KERNEL_TREE\\)", "1", stmnt)
gsub("defined\\(BACKPORT_LINUX_WORKQUEUE_TO_2_6_19\\)", "0", stmnt)
gsub("defined\\(CONFIG_SUSE_KERNEL\\)", "0", stmnt)
gsub("defined\\(CONFIG_SCST_STRICT_SERIALIZING\\)", "0", stmnt)
@@ -656,9 +648,9 @@ BEGIN {
exit 1
}
LINUX_VERSION_CODE = version_code(kernel_version)
if (LINUX_VERSION_CODE < 2*65536)
if (LINUX_VERSION_CODE < version_number(3, 10, 0))
{
printf "Error: kernel version (%s) is out of range.\n", kernel_version
printf "Error: kernel version (%s) is not supported.\n", kernel_version
exit 1
}
if (blank_deleted_code != 0 && blank_deleted_code != 1)