View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000928 | channel: elrepo/el8 | --elrepo--request-for-enhancement-- | public | 2019-09-03 10:40 | 2022-01-18 07:59 |
Reporter | conathan | Assigned To | toracat | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0000928: Request for kmod-sata_sil (not part of RHEL 8) | ||||
Description | The sata_sil driver has been removed when RHEL 8 was released. This is still part of the upstream kernel We still utilize some older Tyan S2882 Motherboards, which utilize this chipset. (Attach is a untested spec file [does package an rpm, have not tested driver works as expected due to a issue with python parsing 0xc2 character] that does build a rpm package, if that helps for a base) | ||||
Additional Information | Did not find a category that would be used for requesting new kernel modules, but this has nothing to do with linux-firmware (apologies) | ||||
Tags | No tags attached. | ||||
Attached Files | sata_sil-kmod.spec (2,122 bytes)
# Define the kmod package name here. %define kmod_name sata_sil %{!?kmod_kernel_version: %define kmod_kernel_version 4.18.0-32.el8} # If kversion isn't defined on the rpmbuild line, define it here. %{!?kversion: %define kversion 4.18.0-32.el8.%{_target_cpu}} Name: %{kmod_name}-kmod #Version: 4.18.0.107 Version: 4.18.0.32 Release: 1%{?dist} Group: System Environment/Kernel License: GPLv2 Summary: %{kmod_name} kernel module(s) URL: http://www.intel.com/ BuildRequires: redhat-rpm-config ExclusiveArch: x86_64 #BuildRequires: kernel-devel elfutils-libelf-devel BuildRequires: kernel-devel = 4.18.0-32.el8 elfutils-libelf-devel Provides: kernel-modules >= %{kmod_kernel_version}.%{_arch} # Sources. Source0: linux-%{kmod_kernel_version}.tar.xz Source10: kmodtool-el8.sh # Magic hidden here. %{expand:%(sh %{SOURCE10} rpmtemplate %{kmod_name} %{kversion} "")} # Disable the building of the debug package(s). %define debug_package %{nil} %description This package provides the sata_sil kernel module as it was removed from centos 8 %prep %setup -q -n linux-%{kmod_kernel_version} echo "/usr/lib/rpm/redhat/find-requires | %{__sed} -e '/^ksym.*/d'" > filter-requires.sh echo "override sata_sil * weak-updates/sata_sil" > kmod-%{kmod_name}.conf %build %{__make} %{?_smp_mflags} -C %{_usrsrc}/kernels/%{kversion} modules M="$PWD/drivers/ata/" CONFIG_SATA_SIL=m %install %{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/ %{__install} drivers/ata/sata_sil.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/ %{__install} -d %{buildroot}%{_sysconfdir}/depmod.d/ %{__install} kmod-%{kmod_name}.conf %{buildroot}%{_sysconfdir}/depmod.d/ %{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/ %{__install} -d %{buildroot}%{_mandir}/man7/ # Set the module(s) to be executable, so that they will be stripped when packaged. find %{buildroot} -type f -name \*.ko -exec %{__chmod} u+x \{\} \; %clean %{__rm} -rf %{buildroot} %changelog * Sun Aug 25 2019 Nathan Coulson <nathan@bravenet.com> - 4.18.0.107-1 - Restore the sata_sil kernel module for centos 8 sata_sil-kmod-v2.spec (5,900 bytes)
# Define the kmod package name here. %define kmod_name sata_sil # If kmod_kernel_version isn't defined on the rpmbuild line, define it here. %{!?kmod_kernel_version: %define kmod_kernel_version 4.18.0-32.el8} %{!?dist: %define dist .el8} Name: kmod-%{kmod_name} Version: 4.18.0.32 Release: 1%{?dist} Summary: %{kmod_name} kernel module(s) Group: System Environment/Kernel License: GPLv2 URL: http://www.kernel.org/ # Sources. Source0: linux-%{kmod_kernel_version}.tar.xz Source10: kmodtool-el8.sh %define findpat %( echo "%""P" ) %define __find_requires /usr/lib/rpm/redhat/find-requires.ksyms %define __find_provides /usr/lib/rpm/redhat/find-provides.ksyms %{kmod_name} %{?epoch:%{epoch}:}%{version}-%{release} %define dup_state_dir %{_localstatedir}/lib/rpm-state/kmod-dups %define kver_state_dir %{dup_state_dir}/kver %define kver_state_file %{kver_state_dir}/%{kmod_kernel_version}.%{_arch} %define dup_module_list %{dup_state_dir}/rpm-kmod-%{kmod_name}-modules %define debug_package %{nil} %global _use_internal_dependency_generator 0 %global kernel_source() %{_usrsrc}/kernels/%{kmod_kernel_version}.%{_arch} BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) ExclusiveArch: x86_64 BuildRequires: elfutils-libelf-devel BuildRequires: kernel-devel = %{kmod_kernel_version} BuildRequires: kernel-abi-whitelists BuildRequires: kernel-rpm-macros BuildRequires: redhat-rpm-config Provides: kernel-modules >= %{kmod_kernel_version}.%{_arch} Provides: kmod-%{kmod_name} = %{?epoch:%{epoch}:}%{version}-%{release} Requires(post): %{_sbindir}/weak-modules Requires(postun): %{_sbindir}/weak-modules Requires: kernel >= %{kmod_kernel_version} %description This package provides the %{kmod_name} kernel module(s). It is built to depend upon the specific ABI provided by a range of releases of the same variant of the Linux kernel and not on any one specific build. %prep %setup -q -n linux-%{kmod_kernel_version} #echo "/usr/lib/rpm/redhat/find-requires | %{__sed} -e '/^ksym.*/d'" > filter-requires.sh echo "override %{kmod_name} * weak-updates/%{kmod_name}" > kmod-%{kmod_name}.conf %build %{__make} -C %{kernel_source} %{?_smp_mflags} modules M="$PWD/drivers/ata/" CONFIG_SATA_SIL=m" whitelist="/lib/modules/kabi-current/kabi_whitelist_%{_target_cpu}" for modules in $( find drivers/ata/ -name "*.ko" -type f -printf "%{findpat}\n" | sed 's|\.ko$||' | sed 's@drivers/ata/@@' | sort -u ) ; do # update greylist nm -u drivers/ata/$modules.ko | sed 's/.*U //' | sed 's/^\.//' | sort -u | while read -r symbol; do grep -q "^\s*$symbol\$" $whitelist || echo "$symbol" >> ./greylist done done sort -u greylist | uniq > greylist.txt %install %{__install} -d %{buildroot}/lib/modules/%{kmod_kernel_version}.%{_arch}/extra/%{kmod_name}/ %{__install} drivers/ata/%{kmod_name}.ko %{buildroot}/lib/modules/%{kmod_kernel_version}.%{_arch}/extra/%{kmod_name}/ %{__install} -d %{buildroot}%{_sysconfdir}/depmod.d/ %{__install} -m 0644 kmod-%{kmod_name}.conf %{buildroot}%{_sysconfdir}/depmod.d/ %{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/ %{__install} -m 0644 greylist.txt %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/ # strip the modules(s) find %{buildroot} -type f -name \*.ko -exec %{__strip} --strip-debug \{\} \; %clean %{__rm} -rf %{buildroot} %post modules=( $(find /lib/modules/%{kmod_kernel_version}.x86_64/extra/%{kmod_name} | grep '\.ko$') ) printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules --no-initramfs mkdir -p "%{kver_state_dir}" touch "%{kver_state_file}" exit 0 %posttrans # We have to re-implement part of weak-modules here because it doesn't allow # calling initramfs regeneration separately if [ -f "%{kver_state_file}" ]; then kver_base="%{kmod_kernel_version}" kvers=$(ls -d "/lib/modules/${kver_base%%.*}"*) for k_dir in $kvers; do k="${k_dir#/lib/modules/}" tmp_initramfs="/boot/initramfs-$k.tmp" dst_initramfs="/boot/initramfs-$k.img" # The same check as in weak-modules: we assume that the kernel present # if the symvers file exists. if [ -e "/boot/symvers-$k.gz" ]; then /usr/bin/dracut -f "$tmp_initramfs" "$k" || exit 1 cmp -s "$tmp_initramfs" "$dst_initramfs" if [ "$?" = 1 ]; then mv "$tmp_initramfs" "$dst_initramfs" else rm -f "$tmp_initramfs" fi fi done rm -f "%{kver_state_file}" rmdir "%{kver_state_dir}" 2> /dev/null fi rmdir "%{dup_state_dir}" 2> /dev/null exit 0 %preun if rpm -q --filetriggers kmod 2> /dev/null| grep -q "Trigger for weak-modules call on kmod removal"; then mkdir -p "%{kver_state_dir}" touch "%{kver_state_file}" fi mkdir -p "%{dup_state_dir}" rpm -ql kmod-%{kmod_name}-%{version}-%{release}.%{_arch} | grep '\.ko$' > "%{dup_module_list}" %postun if rpm -q --filetriggers kmod 2> /dev/null| grep -q "Trigger for weak-modules call on kmod removal"; then initramfs_opt="--no-initramfs" else initramfs_opt="" fi modules=( $(cat "%{dup_module_list}") ) rm -f "%{dup_module_list}" printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules $initramfs_opt rmdir "%{dup_state_dir}" 2> /dev/null exit 0 %files %defattr(644,root,root,755) /lib/modules/%{kmod_kernel_version}.%{_arch}/ %config /etc/depmod.d/kmod-%{kmod_name}.conf %doc /usr/share/doc/kmod-%{kmod_name}-%{version}/ %changelog * Tue Sep 3 2019 Nathan Coulson <nathan@bravenet.com> - 4.18.0.32-1 - Restore the sata_sil kernel module for centos 8 | ||||
|
New .spec file, adapted from kmod-megaraid_sas. (This one I have had no issues making a dud for, unlike my original .spec file). |
|
Looking at the "Issue History" I see -- 2019-09-03 10:40 conathan File Added: sata_sil-kmod.spec Which ties in with the time you created this RFE but I do not see any sign of an updated version, as per your note 6409 timed at 12:18 PM. |
|
Apologies, added now. Original version was adapted from a rpm we built for Centos 7 (kmod-mega, for megaraid_mbox and megaraid_mm), but I couldn't get it to load as a dud (utf8 conversion issue python had reading the output I suspect, although didn't see any utf8 in the srpm) v2, I moved more in line with the kmod-megaraid_sas srpm, which just worked (so something's missing in my original .spec file that a driver update disk needs apparently) |
|
Thank you for adding the updated specification file. We shall look at creating both a kmod-stata_sil and a DUD (for EL8) for you. |
|
Turns out scsi_transport_api.h was the only one that was required. When this was added, the build finished successfully. From what Alan reported, newer code may not build on the current kernel without heavy backporting? |
|
@conathan I have uploaded our version of the kmod package and DUD to: https://elrepo.org/linux/elrepo/el8/x86_64/RPMS/ https://elrepo.org/linux/dud/el8/x86_64/ Please test and see if they work for you. Be sure to install our patched dracut before updating the kernel (as per our conversation on #elrepo). |
|
Well, before I start, I'll mention that my testing environment is not really standard, and most of the issues I ran into with testing are due to this. (I suspect it would be fine on a real RHEL 8.0 system, Machine I am working with is using the RHEL 8.1 Beta) It is a pxe based installer: Repositories are RHEL 8.1 Beta (Linux 4.18.0-107), PXE Bootloader is the RHEL 8.0 Kernel/Initrd (Linux 4.18.0-32). * The RHEL 8.1 Kernel/Initrd installer is complaining that there is no XFS module loaded This has the patched dracut files. Anyway to start, the DUD disk did not work with 4.18.0-32 (I suspect due to it requiring the 4.18.0-80 kernel) Doing a yum install kmod-sata_sil on a system using the 4.18.0-107 kernel (From RHEL 8.1 beta) gives the following: Problem: conflicting requests - nothing provides kernel(pci_set_master) = 0x17aba2d6 needed by kmod-sata_sil-2.4-1.el8_0.elrepo.x86_64 - nothing provides kernel(pcim_enable_device) = 0xe03aa3d3 needed by kmod-sata_sil-2.4-1.el8_0.elrepo.x86_64 - nothing provides kernel(pcim_pin_device) = 0xeee6ea92 needed by kmod-sata_sil-2.4-1.el8_0.elrepo.x86_64 |
|
@conathan Yes, our kmod packages (and associated DUDs) will not work with the RHEL 8.1 beta due to changes in the kernel, so it will not be possible to test our packages on that platform. |
|
Tested on a fresh RHEL 8.0 installation using the DUD, and yum install kmod-sata_sil. Both worked fine, and drives were recognized. Seems to work great. |
|
Excellent news. Now closing as resolved. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-09-03 10:40 | conathan | New Issue | |
2019-09-03 10:40 | conathan | Status | new => assigned |
2019-09-03 10:40 | conathan | Assigned To | => burakkucat |
2019-09-03 10:40 | conathan | File Added: sata_sil-kmod.spec | |
2019-09-03 10:53 | burakkucat | Assigned To | burakkucat => toracat |
2019-09-03 10:53 | burakkucat | Category | linux-firmware => --elrepo--request-for-enhancement-- |
2019-09-03 12:18 | conathan | Note Added: 0006409 | |
2019-09-03 14:24 | burakkucat | Note Added: 0006410 | |
2019-09-03 15:21 | conathan | File Added: sata_sil-kmod-v2.spec | |
2019-09-03 15:24 | conathan | Note Added: 0006411 | |
2019-09-04 08:01 | burakkucat | Note Added: 0006413 | |
2019-09-04 17:04 | toracat | Note Added: 0006420 | |
2019-09-05 16:33 | toracat | Note Added: 0006427 | |
2019-09-05 18:19 | conathan | Note Added: 0006429 | |
2019-09-06 00:16 | pperry | Note Added: 0006430 | |
2019-09-06 00:16 | pperry | Note Edited: 0006430 | |
2019-09-06 14:44 | conathan | Note Added: 0006435 | |
2019-09-06 18:58 | toracat | Note Added: 0006437 | |
2019-09-06 18:58 | toracat | Status | assigned => resolved |
2019-09-06 18:58 | toracat | Resolution | open => fixed |