File kernel-rt-ice-kmp.spec of Package kernel-rt-ice-kmp
##############################################################################
## 1) Package headers – match your RT kernel’s version & release
Name: kernel-rt-ice-kmp
Version: %{kernel_version} # e.g. “6.4.0”
Release: %{kernel_release}.1 # e.g. “1.rt1”
Summary: Real-time kernel ICE ethernet driver only
Group: System/Kernel
License: GPL-2.0-only
URL: https://your.project.url/
Packager: Your Name <you@example.com>
## pull in the same headers & symbols as the full RT kernel
BuildRequires: kernel-rt-devel = %{kernel_version}-%{kernel_release}
Requires: kernel-rt = %{kernel_version}-%{kernel_release}
BuildArch: %{_arch}
##############################################################################
## 2) Description
%description
This package builds and ships *only* the Intel “ice” ethernet driver
from the real-time kernel source, as an out-of-tree module.
##############################################################################
## 3) No sources to unpack – we’re using the in-tree files
# (so no Source0 / %setup)
##############################################################################
## 4) Build just the ice module
%build
# point M= at the in-tree driver directory under the RT kernel headers
make -C /usr/src/kernels/%{kernel_version}-rt-pae \
M=/usr/src/kernels/%{kernel_version}-rt-pae/drivers/net/ethernet/intel/ice \
modules
##############################################################################
## 5) Install only that .ko into our buildroot
%install
make -C /usr/src/kernels/%{kernel_version}-rt-pae \
M=/usr/src/kernels/%{kernel_version}-rt-pae/drivers/net/ethernet/intel/ice \
INSTALL_MOD_PATH=%{buildroot} \
modules_install
##############################################################################
## 6) Ship exactly the one ice.ko
%files
%defattr(-,root,root,-)
# path under /lib/modules for an extra OOT module
/lib/modules/%{kernel_version}-rt-pae/extra/ice.ko
%changelog
* Tue Jul 8 2025 Your Name <you@example.com> – %{kernel_version}-%{kernel_release}-1
- initial ICE-only KMP