Upgrade mlnx-ofa_kernel drivers to 4.7-3.2.9.0 to support CentOS 8.1
(cherry picked from commit e14efd21d02f9d2fd2290625107958a84c29f713) driver sign method is updated to align with 4.18 kernel. Story: 2007308 Task: 38804 Depends-On: https://review.opendev.org/720372 Depends-On: https://review.opendev.org/720325 Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com> Signed-off-by: Dongqi Chen <chen.dq@neusoft.com> Change-Id: I5d4d83c3b5103033f2b599741fd37c02cbeb0200
This commit is contained in:
parent
9c13db5bf7
commit
c3a925b0b8
@ -1,8 +1,7 @@
|
||||
From 6152dc85e1b94ec93a3378f4f77b3b33907aac35 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <6152dc85e1b94ec93a3378f4f77b3b33907aac35.1579886617.git.Jim.Somerville@windriver.com>
|
||||
From 0d5ddc8227336beccae3f02c4b30386b09a41a0b Mon Sep 17 00:00:00 2001
|
||||
From: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Date: Mon, 20 Jan 2020 11:40:06 -0500
|
||||
Subject: [PATCH 1/1] Support TiS system
|
||||
Subject: [PATCH] Support TiS system
|
||||
|
||||
This patch added the following to support TiS system:
|
||||
- Support package versioning for TiS format
|
||||
@ -18,12 +17,13 @@ Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
|
||||
Signed-off-by: Kam Nasim <kam.nasim@windriver.com>
|
||||
Signed-off-by: eric zhang <eric.zhang@windriver.com>
|
||||
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
---
|
||||
SPECS/mlnx-ofa_kernel.spec | 51 +++++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 35 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/SPECS/mlnx-ofa_kernel.spec b/SPECS/mlnx-ofa_kernel.spec
|
||||
index 85af93f..6e77d09 100644
|
||||
index b123e82..44a31ef 100644
|
||||
--- a/SPECS/mlnx-ofa_kernel.spec
|
||||
+++ b/SPECS/mlnx-ofa_kernel.spec
|
||||
@@ -27,8 +27,14 @@
|
||||
@ -42,9 +42,9 @@ index 85af93f..6e77d09 100644
|
||||
%global WITH_SYSTEMD %(if ( test -d "%{_unitdir}" > /dev/null); then echo -n '1'; else echo -n '0'; fi)
|
||||
|
||||
%{!?configure_options: %global configure_options --with-core-mod --with-user_mad-mod --with-user_access-mod --with-addr_trans-mod --with-mlx4-mod --with-mlx4_en-mod --with-mlx5-mod --with-mlxfw-mod --with-ipoib-mod}
|
||||
@@ -41,12 +47,11 @@
|
||||
%global BLUENIX %(if (grep -qiE "Bluenix" /etc/issue /etc/*release* 2>/dev/null); then echo -n '1'; else echo -n '0'; fi)
|
||||
%global XENSERVER65 %(if (grep -qiE "XenServer.*6\.5" /etc/issue /etc/*release* 2>/dev/null); then echo -n '1'; else echo -n '0'; fi)
|
||||
@@ -43,12 +49,11 @@
|
||||
# Force python3 on RHEL8 and OL8:
|
||||
%global PYTHON3 %(if test `grep -E '^(ID="(rhel|ol|centos)"|VERSION="8)' /etc/os-release 2>/dev/null | wc -l` -eq 2; then echo -n '1'; else echo -n '0'; fi)
|
||||
|
||||
-%{!?KVERSION: %global KVERSION %(uname -r)}
|
||||
+%{!?KVERSION: %global KVERSION %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')}
|
||||
@ -57,7 +57,7 @@ index 85af93f..6e77d09 100644
|
||||
# Select packages to build
|
||||
|
||||
# Kernel module packages to be included into kernel-ib
|
||||
@@ -63,7 +68,9 @@
|
||||
@@ -64,7 +69,9 @@
|
||||
|
||||
%{!?KERNEL_SOURCES: %global KERNEL_SOURCES /lib/modules/%{KVERSION}/source}
|
||||
|
||||
@ -65,10 +65,10 @@ index 85af93f..6e77d09 100644
|
||||
+
|
||||
+%define _basename mlnx-ofa_kernel
|
||||
+%define _name %{_basename}%{?bt_ext}
|
||||
%{!?_version: %global _version 4.5}
|
||||
%{!?_release: %global _release OFED.4.5.1.0.1.1.gb4fdfac}
|
||||
%{!?_version: %global _version 4.7}
|
||||
%{!?_release: %global _release OFED.4.7.3.2.9.1.g457f064}
|
||||
%global _kmp_rel %{_release}%{?_kmp_build_num}%{?_dist}
|
||||
@@ -75,11 +82,17 @@
|
||||
@@ -82,11 +89,17 @@
|
||||
Summary: Infiniband HCA Driver
|
||||
Name: %{_name}
|
||||
Version: %{_version}
|
||||
@ -88,7 +88,7 @@ index 85af93f..6e77d09 100644
|
||||
BuildRoot: %{?build_root:%{build_root}}%{!?build_root:/var/tmp/OFED}
|
||||
Vendor: Mellanox Technologies
|
||||
Obsoletes: kernel-ib
|
||||
@@ -135,7 +148,6 @@ EOF)
|
||||
@@ -142,7 +155,6 @@ EOF)
|
||||
%global kernel_release() %{KVERSION}
|
||||
%global flavors_to_build default
|
||||
%package -n %{non_kmp_pname}
|
||||
@ -96,7 +96,7 @@ index 85af93f..6e77d09 100644
|
||||
Requires: coreutils
|
||||
Requires: pciutils
|
||||
Requires: grep
|
||||
@@ -162,7 +174,7 @@ Obsoletes: mlnx-en-doc
|
||||
@@ -169,7 +181,7 @@ Obsoletes: mlnx-en-doc
|
||||
Obsoletes: mlnx-en-debuginfo
|
||||
Obsoletes: mlnx-en-sources
|
||||
Version: %{_version}
|
||||
@ -105,7 +105,7 @@ index 85af93f..6e77d09 100644
|
||||
Summary: Infiniband Driver and ULPs kernel modules
|
||||
Group: System Environment/Libraries
|
||||
%description -n %{non_kmp_pname}
|
||||
@@ -174,7 +186,7 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
@@ -181,7 +193,7 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
%package -n %{devel_pname}
|
||||
Version: %{_version}
|
||||
# build KMP rpms?
|
||||
@ -114,7 +114,7 @@ index 85af93f..6e77d09 100644
|
||||
Obsoletes: kernel-ib-devel
|
||||
Obsoletes: compat-rdma-devel
|
||||
Obsoletes: kernel-ib
|
||||
@@ -212,13 +224,12 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
@@ -219,13 +231,12 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
else \
|
||||
echo -n '0'; fi)
|
||||
|
||||
@ -129,7 +129,7 @@ index 85af93f..6e77d09 100644
|
||||
%global buildsubdir %{_name}-%{version}
|
||||
# Disgusting hack alert! We need to ensure we sign modules *after* all
|
||||
# invocations of strip occur, which is in __debug_install_post if
|
||||
@@ -231,7 +242,6 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
@@ -238,7 +249,6 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
%{__modsign_install_post} \
|
||||
%{nil}
|
||||
|
||||
@ -137,7 +137,7 @@ index 85af93f..6e77d09 100644
|
||||
#
|
||||
%if "%{_vendor}" == "suse"
|
||||
%debug_package
|
||||
@@ -262,12 +272,17 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
@@ -269,7 +279,7 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
%{!?install_mod_dir: %global install_mod_dir updates}
|
||||
|
||||
%prep
|
||||
@ -146,6 +146,8 @@ index 85af93f..6e77d09 100644
|
||||
set -- *
|
||||
mkdir source
|
||||
mv "$@" source/
|
||||
@@ -278,6 +288,11 @@ sed -s -i -e '1s|python\>|python3|' `grep -rl '^#!.*python' source/ofed_scripts`
|
||||
%endif
|
||||
mkdir obj
|
||||
|
||||
+%patch01 -p1
|
||||
@ -156,7 +158,7 @@ index 85af93f..6e77d09 100644
|
||||
%build
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
|
||||
export INSTALL_MOD_DIR=%{install_mod_dir}
|
||||
@@ -282,7 +297,6 @@ for flavor in %flavors_to_build; do
|
||||
@@ -293,7 +308,6 @@ for flavor in %flavors_to_build; do
|
||||
find compat -type f -exec touch -t 200012201010 '{}' \; || true
|
||||
./configure --build-dummy-mods --prefix=%{_prefix} --kernel-version $KVERSION --kernel-sources $KSRC --modules-dir $LIB_MOD_DIR $CONF_OPTIONS %{?_smp_mflags}
|
||||
make %{?_smp_mflags} kernel
|
||||
@ -164,7 +166,7 @@ index 85af93f..6e77d09 100644
|
||||
cd -
|
||||
done
|
||||
|
||||
@@ -291,9 +305,11 @@ touch ofed-files
|
||||
@@ -302,9 +316,11 @@ touch ofed-files
|
||||
export RECORD_PY_FILES=1
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=%{install_mod_dir}
|
||||
@ -172,12 +174,12 @@ index 85af93f..6e77d09 100644
|
||||
+export NAME=%{_basename}
|
||||
export VERSION=%{version}
|
||||
export PREFIX=%{_prefix}
|
||||
+export MODULE_SIGN_PRIV_KEY=/usr/src/kernels/%{KVERSION}/signing_key.priv
|
||||
+export MODULE_SIGN_PRIV_KEY=/usr/src/kernels/%{KVERSION}/signing_key.pem
|
||||
+export MODULE_SIGN_PUB_KEY=/usr/src/kernels/%{KVERSION}/signing_key.x509
|
||||
%{mlnx_python_env}
|
||||
for flavor in %flavors_to_build; do
|
||||
export KSRC=%{kernel_source $flavor}
|
||||
export KVERSION=%{kernel_release $KSRC}
|
||||
@@ -343,6 +359,8 @@ echo "override ${mod_name} * weak-updates/%{_name}${mod_path}" >> %{buildroot}%{
|
||||
@@ -355,6 +371,8 @@ echo "override ${mod_name} * weak-updates/%{_name}${mod_path}" >> %{buildroot}%{
|
||||
echo "override ${mod_name} * extra/%{_name}${mod_path}" >> %{buildroot}%{_sysconfdir}/depmod.d/zz01-%{_name}-${mod_name}.conf
|
||||
done
|
||||
%endif
|
||||
@ -186,7 +188,7 @@ index 85af93f..6e77d09 100644
|
||||
%endif
|
||||
|
||||
# copy sources
|
||||
@@ -686,6 +704,7 @@ fi
|
||||
@@ -701,6 +719,7 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/depmod.d/zz01-%{_name}-*.conf
|
||||
%endif
|
||||
%endif
|
||||
@ -195,5 +197,5 @@ index 85af93f..6e77d09 100644
|
||||
|
||||
%files -n %{devel_pname}
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -1 +1 @@
|
||||
repo:stx/downloads/mlnx-ofa_kernel-4.5-OFED.4.5.1.0.1.1.gb4fdfac.src.rpm
|
||||
repo:stx/downloads/mlnx-ofa_kernel-4.7-OFED.4.7.3.2.9.1.g457f064.src.rpm
|
||||
|
Loading…
x
Reference in New Issue
Block a user