|
|
f467ff |
%global pkg mlx4
|
|
|
f467ff |
|
|
Kmods SIG |
e03bda |
%global driver_version 5.14.0-50.el9
|
|
|
f467ff |
|
|
Kmods SIG |
589b0d |
%global kernel_version 5.14.0-75.el9
|
|
|
f467ff |
|
|
|
f467ff |
%global debug_package %{nil}
|
|
|
f467ff |
|
|
|
f467ff |
%global __spec_install_post \
|
|
|
f467ff |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
f467ff |
%{__arch_install_post} \
|
|
|
f467ff |
%{__os_install_post} \
|
|
|
f467ff |
%{__mod_compress_install_post}
|
|
|
f467ff |
|
|
|
f467ff |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
f467ff |
Name: kmod-%{pkg}
|
|
Kmods SIG |
e03bda |
Version: 5.14.0.50
|
|
Kmods SIG |
589b0d |
Release: 10%{?dist}
|
|
|
f467ff |
Summary: Mellanox ConnectX HCA (%{pkg}) driver
|
|
|
f467ff |
|
|
|
f467ff |
License: GPLv2 and (BSD or GPLv2)
|
|
|
f467ff |
URL: https://www.kernel.org/
|
|
|
f467ff |
|
|
|
f467ff |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
f467ff |
Patch1: 0001-disable-mlx4_en.patch
|
|
|
f467ff |
Patch2: 0002-enable-mlx4_core-gen2.patch
|
|
|
f467ff |
|
|
|
981950 |
ExclusiveArch: x86_64 aarch64 ppc64le
|
|
|
f467ff |
|
|
|
f467ff |
BuildRequires: elfutils-libelf-devel
|
|
|
f467ff |
BuildRequires: gcc
|
|
|
d4fd75 |
BuildRequires: kernel-rpm-macros
|
|
|
f467ff |
BuildRequires: kmod
|
|
|
f467ff |
BuildRequires: make
|
|
|
f467ff |
BuildRequires: redhat-rpm-config
|
|
|
f467ff |
BuildRequires: xz
|
|
|
f467ff |
|
|
|
d4fd75 |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
f467ff |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
f467ff |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
f467ff |
|
|
|
d4fd75 |
Requires: kernel >= %{kernel_version}
|
|
|
d4fd75 |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
d4fd75 |
Requires: kernel-modules >= %{kernel_version}
|
|
|
d4fd75 |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
f467ff |
|
|
|
f467ff |
Provides: installonlypkg(kernel-module)
|
|
|
d4fd75 |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
f467ff |
|
|
|
d4fd75 |
Requires(post): %{_sbindir}/depmod
|
|
|
d4fd75 |
Requires(postun): %{_sbindir}/depmod
|
|
|
f467ff |
|
|
|
d4fd75 |
Requires(post): %{_sbindir}/weak-modules
|
|
|
d4fd75 |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
96462c |
%if "%{version}" == "5.14.0.1" && "%{release}" == "10%{?dist}"
|
|
|
96462c |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-9%{?dist}
|
|
|
96462c |
%endif
|
|
|
96462c |
|
|
|
96462c |
|
|
|
f467ff |
%description
|
|
|
f467ff |
This package provides the Mellanos ConnectX HCA (%{pkg}) driver. Compared to
|
|
|
f467ff |
the in-kernel driver this driver re-enables support for deprecated Mellanox
|
|
|
f467ff |
Gen2 and ConnectX-2 adapters:
|
|
|
f467ff |
|
|
|
f467ff |
- 0x15B3:0x1002: Mellanox ConnectX-2 MT25400
|
|
|
f467ff |
- 0x15B3:0x6340: Mellanox Hermon SDR
|
|
|
f467ff |
- 0x15B3:0x634A: Mellanox Hermon DDR
|
|
|
f467ff |
- 0x15B3:0x6354: Mellanox Hermon QDR
|
|
|
f467ff |
- 0x15B3:0x6368: Mellanox Hermon EN 10GigE
|
|
|
f467ff |
- 0x15B3:0x6372: Mellanox ConnectX EN 10GBASE-T
|
|
|
f467ff |
- 0x15B3:0x6732: Mellanox Hermon DDR Gen2
|
|
|
f467ff |
- 0x15B3:0x673C: Mellanox Hermon QDR Gen2
|
|
|
f467ff |
- 0x15B3:0x6746: Mellanox ConnectX EN 40GigE PCIe Gen2 5GT/s
|
|
|
f467ff |
- 0x15B3:0x6750: Mellanox Hermon EN 10GigE Gen2
|
|
|
f467ff |
- 0x15B3:0x675A: Mellanox ConnectX EN 10GBASE-T Gen2
|
|
|
f467ff |
- 0x15B3:0x6764: Mellanox ConnectX EN 10 GigE PCIe Gen2
|
|
|
f467ff |
- 0x15B3:0x676E: Mellanox ConnectX-2 40GigE PCIe Gen2
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
f467ff |
%prep
|
|
|
f467ff |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
f467ff |
%build
|
|
|
f467ff |
pushd src
|
|
|
f467ff |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
f467ff |
popd
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
f467ff |
%install
|
|
|
f467ff |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/ethernet/mellanox/%{pkg} src/%{pkg}_core.ko
|
|
|
f467ff |
|
|
|
f467ff |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
f467ff |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
f467ff |
|
|
|
d4fd75 |
# Generate depmod.conf
|
|
|
d4fd75 |
%{__install} -d %{buildroot}/%{_sysconfdir}/depmod.d/
|
|
|
d4fd75 |
for kmod in $(find %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra -type f -name \*.ko -printf "%%P\n" | sort)
|
|
|
d4fd75 |
do
|
|
|
d4fd75 |
echo "override $(basename $kmod .ko) * weak-updates/$(dirname $kmod)" >> %{buildroot}/%{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
d4fd75 |
done
|
|
|
d4fd75 |
|
|
|
f467ff |
|
|
|
f467ff |
%clean
|
|
|
f467ff |
%{__rm} -rf %{buildroot}
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
f467ff |
%post
|
|
|
f467ff |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
d4fd75 |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/ethernet/mellanox/%{pkg}/%{pkg}_core.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
f467ff |
%preun
|
|
|
f467ff |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
d4fd75 |
rpm -ql kmod-%{pkg}-%{?epoch:%{epoch}:}%{version}-%{release}.%{_arch} | grep '/lib/modules/%{kernel_version}.%{_arch}/.*\.ko\.xz$' >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
f467ff |
%postun
|
|
|
d4fd75 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
f467ff |
then
|
|
|
d4fd75 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
d4fd75 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
f467ff |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
d4fd75 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
f467ff |
fi
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
d4fd75 |
%pretrans -p <lua>
|
|
|
d4fd75 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
d4fd75 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
d4fd75 |
|
|
|
d4fd75 |
|
|
|
f467ff |
%posttrans
|
|
|
d4fd75 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
f467ff |
then
|
|
|
d4fd75 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
d4fd75 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
f467ff |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
d4fd75 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
f467ff |
fi
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
f467ff |
%files
|
|
|
f467ff |
%defattr(644,root,root,755)
|
|
|
f467ff |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
c66b84 |
%license LICENSES
|
|
|
d4fd75 |
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
f467ff |
|
|
|
f467ff |
|
|
|
f467ff |
%changelog
|
|
Kmods SIG |
589b0d |
* Mon Mar 28 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-10
|
|
Kmods SIG |
589b0d |
- Rebuild for 5.14.0-75.el9
|
|
Kmods SIG |
589b0d |
|
|
Kmods SIG |
5d4582 |
* Tue Mar 22 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-9
|
|
Kmods SIG |
5d4582 |
- Rebuild for 5.14.0-73.el9
|
|
Kmods SIG |
5d4582 |
|
|
Kmods SIG |
1f1009 |
* Sun Feb 20 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-8
|
|
Kmods SIG |
1f1009 |
- Rebuild for 5.14.0-62.el9
|
|
Kmods SIG |
1f1009 |
|
|
Kmods SIG |
f98835 |
* Fri Feb 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-7
|
|
Kmods SIG |
f98835 |
- Rebuild for 5.14.0-60.el9
|
|
Kmods SIG |
f98835 |
|
|
Kmods SIG |
4aa72d |
* Tue Feb 15 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-6
|
|
Kmods SIG |
4aa72d |
- Rebuild for 5.14.0-58.el9
|
|
Kmods SIG |
4aa72d |
|
|
Kmods SIG |
4884b2 |
* Sat Feb 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-5
|
|
Kmods SIG |
4884b2 |
- Rebuild for 5.14.0-57.el9
|
|
Kmods SIG |
4884b2 |
|
|
Kmods SIG |
4442e9 |
* Thu Feb 10 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-4
|
|
Kmods SIG |
4442e9 |
- Rebuild for 5.14.0-56.el9
|
|
Kmods SIG |
4442e9 |
|
|
Kmods SIG |
05f2fa |
* Mon Feb 07 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-3
|
|
Kmods SIG |
05f2fa |
- Rebuild for 5.14.0-55.el9
|
|
Kmods SIG |
05f2fa |
|
|
Kmods SIG |
fb43ee |
* Wed Feb 02 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-2
|
|
Kmods SIG |
fb43ee |
- Rebuild for 5.14.0-51.el9
|
|
Kmods SIG |
fb43ee |
|
|
Kmods SIG |
e03bda |
* Tue Feb 01 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.50-1
|
|
Kmods SIG |
e03bda |
- Update to 5.14.0-50.el9
|
|
Kmods SIG |
e03bda |
|
|
Kmods SIG |
f7f814 |
* Sat Jan 29 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-13
|
|
Kmods SIG |
f7f814 |
- Rebuild for 5.14.0-49.el9
|
|
Kmods SIG |
f7f814 |
|
|
Kmods SIG |
be0568 |
* Thu Jan 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-12
|
|
Kmods SIG |
be0568 |
- Rebuild for 5.14.0-48.el9
|
|
Kmods SIG |
be0568 |
|
|
Kmods SIG |
2cca1e |
* Tue Jan 25 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-11
|
|
Kmods SIG |
2cca1e |
- Rebuild for 5.14.0-47.el9
|
|
Kmods SIG |
2cca1e |
|
|
|
981950 |
* Wed Jan 19 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.1-10
|
|
|
981950 |
- Enable ppc64le
|
|
|
981950 |
|
|
Kmods SIG |
b9f839 |
* Wed Jan 19 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-9
|
|
Kmods SIG |
b9f839 |
- Rebuild for 5.14.0-44.el9
|
|
Kmods SIG |
b9f839 |
|
|
Kmods SIG |
aa65cd |
* Tue Jan 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-8
|
|
Kmods SIG |
aa65cd |
- Rebuild for 5.14.0-43.el9
|
|
Kmods SIG |
aa65cd |
|
|
Kmods SIG |
5f283c |
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-7
|
|
Kmods SIG |
5f283c |
- Rebuild for 5.14.0-42.el9
|
|
Kmods SIG |
5f283c |
|
|
Kmods SIG |
accdf7 |
* Fri Jan 14 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-6
|
|
Kmods SIG |
accdf7 |
- Rebuild for 5.14.0-41.el9
|
|
Kmods SIG |
accdf7 |
|
|
|
e8975b |
* Sat Dec 25 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-5
|
|
|
e8975b |
- Rebuild for 5.14.0-39.el9
|
|
|
e8975b |
- Skip unreleased kernel -38
|
|
Kmods SIG |
8f277f |
|
|
Kmods SIG |
6fbf12 |
* Thu Dec 23 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-4
|
|
Kmods SIG |
6fbf12 |
- Rebuild for 5.14.0-37.el9
|
|
Kmods SIG |
6fbf12 |
|
|
Kmods SIG |
46716c |
* Wed Dec 22 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-3
|
|
Kmods SIG |
46716c |
- Rebuild for 5.14.0-36.el9
|
|
Kmods SIG |
46716c |
|
|
|
5ff2f8 |
* Wed Dec 22 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-2
|
|
|
5ff2f8 |
- Rebuild for 5.14.0-34.el9
|
|
|
5ff2f8 |
- Skip unreleased kernel -32 and -33
|
|
Kmods SIG |
d35a59 |
|
|
|
d4fd75 |
* Thu Dec 16 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.1-1
|
|
|
d4fd75 |
- Convert to kABI tracking kmod package (kernel >= 5.14.0-31.el9)
|