|
|
8d225d |
%global pkg sky2
|
|
|
8d225d |
|
|
|
8d225d |
%global kernel_version_min 4.18.0-240.el8
|
|
|
8d225d |
|
|
|
8d225d |
# To pick a specific kernel use `--define "kernel_version 4.18.0-315.el8"`
|
|
|
8d225d |
# Otherwise the latest installed kernel-devel version later than
|
|
|
8d225d |
# %%{kernel_version_min} will be used.
|
|
|
8d225d |
|
|
|
8d225d |
%global kernel_version_latest %({ echo %{kernel_version_min}; rpm --query kernel-devel --queryformat '%%{VERSION}-%%{RELEASE}\\\n' | grep -v "package kernel-devel is not installed"; } | sort -V | sed -e '0,/^%{kernel_version_min}$/d' | tail -n 1)
|
|
|
8d225d |
|
|
|
8d225d |
%if "%{kernel_version_latest}" != ""
|
|
|
8d225d |
%{!?kernel_version:%{expand:%%global kernel_version %{kernel_version_latest}}}
|
|
|
8d225d |
%endif
|
|
|
8d225d |
|
|
|
8d225d |
%global _use_internal_dependency_generator 0
|
|
|
8d225d |
%global __find_requires %{nil}
|
|
|
8d225d |
%global __find_provides /usr/lib/rpm/find-provides
|
|
|
8d225d |
|
|
|
8d225d |
%global debug_package %{nil}
|
|
|
8d225d |
|
|
|
8d225d |
%global __spec_install_post \
|
|
|
8d225d |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
8d225d |
%{__arch_install_post} \
|
|
|
8d225d |
%{__os_install_post} \
|
|
|
8d225d |
%{__mod_compress_install_post}
|
|
|
8d225d |
|
|
|
8d225d |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
Name: kmod-%{pkg}
|
|
|
8d225d |
Version: 5.8
|
|
|
44aef5 |
Release: 3%{?dist}
|
|
|
8d225d |
Summary: Marvell Yukon 2 Gigabit Ethernet (%{pkg}) driver
|
|
|
8d225d |
|
|
|
8d225d |
License: GPLv2
|
|
|
8d225d |
URL: https://www.kernel.org/
|
|
|
8d225d |
|
|
|
8d225d |
Source0: %{pkg}-%{version}.tar.xz
|
|
|
8d225d |
|
|
|
8d225d |
ExclusiveArch: x86_64 aarch64
|
|
|
8d225d |
|
|
|
8d225d |
BuildRequires: elfutils-libelf-devel
|
|
|
8d225d |
BuildRequires: gcc
|
|
|
8d225d |
BuildRequires: kmod
|
|
|
8d225d |
BuildRequires: make
|
|
|
8d225d |
BuildRequires: redhat-rpm-config
|
|
|
8d225d |
BuildRequires: xz
|
|
|
8d225d |
|
|
|
8d225d |
%{!?kernel_version:
|
|
|
8d225d |
BuildRequires: kernel-devel >= %{kernel_version_min}
|
|
|
8d225d |
}
|
|
|
8d225d |
|
|
|
8d225d |
%{?kernel_version:
|
|
|
8d225d |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
8d225d |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
8d225d |
|
|
|
8d225d |
Requires: kernel-core = %{kernel_version}
|
|
|
8d225d |
Requires: kernel-core-uname-r = %{kernel_version}.%{_arch}
|
|
|
8d225d |
Requires: kernel-modules = %{kernel_version}
|
|
|
8d225d |
Requires: kernel-modules-uname-r = %{kernel_version}.%{_arch}
|
|
|
8d225d |
|
|
|
8d225d |
Provides: installonlypkg(kernel-module)
|
|
|
8d225d |
Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
8d225d |
}
|
|
|
8d225d |
|
|
|
8d225d |
Requires(post): /usr/sbin/depmod
|
|
|
8d225d |
Requires(postun): /usr/sbin/depmod
|
|
|
8d225d |
|
|
|
8d225d |
Requires(post): /usr/bin/dracut
|
|
|
8d225d |
Requires(postun): /usr/bin/dracut
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%description
|
|
|
8d225d |
This driver supports Gigabit Ethernet adapters based on the Marvell Yukon 2
|
|
|
8d225d |
chipset:
|
|
|
8d225d |
|
|
|
8d225d |
- 0x1148:0x9000: SysKonnect SK-9Sxx
|
|
|
8d225d |
- 0x1148:0x9E00: SysKonnect SK-9Exx
|
|
|
8d225d |
- 0x1148:0x9E01: SysKonnect SK-9E21M
|
|
|
8d225d |
- 0x1186:0x4001: D-Link DGE-550SX
|
|
|
8d225d |
- 0x1186:0x4B00: D-Link DGE-560T
|
|
|
8d225d |
- 0x1186:0x4B02: D-Link DGE-560SX
|
|
|
8d225d |
- 0x1186:0x4B03: D-Link DGE-550T
|
|
|
8d225d |
- 0x11AB:0x4340: Marvell 88E8021
|
|
|
8d225d |
- 0x11AB:0x4341: Marvell 88E8022
|
|
|
8d225d |
- 0x11AB:0x4342: Marvell 88E8061
|
|
|
8d225d |
- 0x11AB:0x4343: Marvell 88E8062
|
|
|
8d225d |
- 0x11AB:0x4344: Marvell 88E8021
|
|
|
8d225d |
- 0x11AB:0x4345: Marvell 88E8022
|
|
|
8d225d |
- 0x11AB:0x4346: Marvell 88E8061
|
|
|
8d225d |
- 0x11AB:0x4347: Marvell 88E8062
|
|
|
8d225d |
- 0x11AB:0x4350: Marvell 88E8035
|
|
|
8d225d |
- 0x11AB:0x4351: Marvell 88E8036
|
|
|
8d225d |
- 0x11AB:0x4352: Marvell 88E8038
|
|
|
8d225d |
- 0x11AB:0x4353: Marvell 88E8039
|
|
|
8d225d |
- 0x11AB:0x4354: Marvell 88E8040
|
|
|
8d225d |
- 0x11AB:0x4355: Marvell 88E8040T
|
|
|
8d225d |
- 0x11AB:0x4356: Marvell 88EC033
|
|
|
8d225d |
- 0x11AB:0x4357: Marvell 88E8042
|
|
|
8d225d |
- 0x11AB:0x435A: Marvell 88E8048
|
|
|
8d225d |
- 0x11AB:0x4360: Marvell 88E8052
|
|
|
8d225d |
- 0x11AB:0x4361: Marvell 88E8050
|
|
|
8d225d |
- 0x11AB:0x4362: Marvell 88E8053
|
|
|
8d225d |
- 0x11AB:0x4363: Marvell 88E8055
|
|
|
8d225d |
- 0x11AB:0x4364: Marvell 88E8056
|
|
|
8d225d |
- 0x11AB:0x4365: Marvell 88E8070
|
|
|
8d225d |
- 0x11AB:0x4366: Marvell 88EC036
|
|
|
8d225d |
- 0x11AB:0x4367: Marvell 88EC032
|
|
|
8d225d |
- 0x11AB:0x4368: Marvell 88EC034
|
|
|
8d225d |
- 0x11AB:0x4369: Marvell 88EC042
|
|
|
8d225d |
- 0x11AB:0x436A: Marvell 88E8058
|
|
|
8d225d |
- 0x11AB:0x436B: Marvell 88E8071
|
|
|
8d225d |
- 0x11AB:0x436C: Marvell 88E8072
|
|
|
8d225d |
- 0x11AB:0x436D: Marvell 88E8055
|
|
|
8d225d |
- 0x11AB:0x4370: Marvell 88E8075
|
|
|
8d225d |
- 0x11AB:0x4380: Marvell 88E8057
|
|
|
8d225d |
- 0x11AB:0x4381: Marvell 88E8059
|
|
|
8d225d |
- 0x11AB:0x4382: Marvell 88E8079
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%prep
|
|
|
8d225d |
%autosetup -p1 -n %{pkg}-%{version}
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%build
|
|
|
8d225d |
pushd src
|
|
|
8d225d |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
8d225d |
popd
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%install
|
|
|
8d225d |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/ethernet/marvell src/%{pkg}.ko
|
|
|
8d225d |
|
|
|
8d225d |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
8d225d |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%clean
|
|
|
8d225d |
%{__rm} -rf %{buildroot}
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%post
|
|
|
8d225d |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
8d225d |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%preun
|
|
|
8d225d |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
8d225d |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%postun
|
|
|
8d225d |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
8d225d |
then
|
|
|
8d225d |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
8d225d |
then
|
|
|
8d225d |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
8d225d |
fi
|
|
|
8d225d |
|
|
|
8d225d |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
8d225d |
then
|
|
|
8d225d |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
8d225d |
then
|
|
|
8d225d |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
8d225d |
then
|
|
|
8d225d |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
8d225d |
else
|
|
|
8d225d |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
8d225d |
fi
|
|
|
8d225d |
fi
|
|
|
8d225d |
fi
|
|
|
8d225d |
|
|
|
8d225d |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
8d225d |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
8d225d |
fi
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%posttrans
|
|
|
8d225d |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
8d225d |
then
|
|
|
8d225d |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
8d225d |
then
|
|
|
8d225d |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
8d225d |
fi
|
|
|
8d225d |
|
|
|
8d225d |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
8d225d |
then
|
|
|
8d225d |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
8d225d |
then
|
|
|
8d225d |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
8d225d |
then
|
|
|
8d225d |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
8d225d |
else
|
|
|
8d225d |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
8d225d |
fi
|
|
|
8d225d |
fi
|
|
|
8d225d |
fi
|
|
|
8d225d |
|
|
|
8d225d |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
8d225d |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
8d225d |
fi
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%files
|
|
|
8d225d |
%defattr(644,root,root,755)
|
|
|
8d225d |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
8d225d |
%license COPYING
|
|
|
8d225d |
|
|
|
8d225d |
|
|
|
8d225d |
%changelog
|
|
|
44aef5 |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.8-3
|
|
|
44aef5 |
- Rebuild for 4.18.0-305.12.1.el8_4
|
|
|
44aef5 |
|
|
|
8d225d |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.8-2
|
|
|
8d225d |
- Initial version
|