forked from mkubecek/vmware-host-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: add Fedora/RHEL akmod support.
Similar to mkubecek#214, add akmod configuration/support to vmware-host-modules. This will ensure Fedora users are able to get a fresh build of vmware-host-modules each time the kernel updates. Spec configuration and installation based on https://github.com/Fred78290/nct6687d. Installation for RPM: ``` make akmod ``` Test/Dev flow: ``` make clean make akmod/clean && make akmod && sudo akmods sudo systemctl start vmware.service ``` Applied fix for newer kernel: mkubecek#239
- Loading branch information
Showing
5 changed files
with
139 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
.*.cmd | ||
*.mod.c | ||
*.tar | ||
.tmp | ||
.tmp_versions | ||
.cache.mk | ||
Module.symvers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
%if 0%{?fedora} | ||
%global buildforkernels akmod | ||
%global debug_package %{nil} | ||
%endif | ||
|
||
%global prjname vmware-host-modules | ||
%global pkgver MAKEFILE_PKGVER | ||
%global commithash MAKEFILE_COMMITHASH | ||
%define buildforkernels akmod | ||
|
||
Name: %{prjname}-kmod | ||
Version: 1.0.%{pkgver} | ||
Release: git%{commithash} | ||
Summary: Kernel module (kmod) for %{prjname} | ||
License: GPL-2.0 | ||
URL: https://github.com/mkubecek/vmware-host-modules | ||
Source0: vmware-host-modules-%{version}.tar.gz | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) | ||
|
||
|
||
BuildRequires: gcc | ||
BuildRequires: make | ||
BuildRequires: elfutils-libelf-devel | ||
BuildRequires: kmodtool | ||
Conflicts: vmware-host-modules-kmod-common | ||
|
||
%{expand:%(kmodtool --target %{_target_cpu} --kmodname %{prjname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } | ||
|
||
%description | ||
%{prjname} kernel module | ||
|
||
%prep | ||
kmodtool --target %{_target_cpu} --kmodname %{prjname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null | ||
|
||
%autosetup -n vmware-host-modules-%{version} | ||
|
||
for kernel_version in %{?kernel_versions} ; do | ||
cp -a vmware-host-modules _kmod_build_${kernel_version%%___*} | ||
done | ||
|
||
%build | ||
for kernel_version in %{?kernel_versions}; do | ||
make %{?_smp_mflags} -C "${PWD}/_kmod_build_${kernel_version%%___*}" M=${PWD}/_kmod_build_${kernel_version%%___*} \ | ||
VM_UNAME=${kernel_version%%___*} | ||
done | ||
|
||
%install | ||
for kernel_version in %{?kernel_versions}; do | ||
make %{?_smp_mflags} -C "${PWD}/_kmod_build_${kernel_version%%___*}" M=${PWD}/_kmod_build_${kernel_version%%___*} \ | ||
KMOD_INSTALL_DIR=%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix} \ | ||
VM_UNAME=${kernel_version%%___*} akmod/akmod-install | ||
done | ||
%{?akmod_install} | ||
|
||
%changelog | ||
* Sat Apr 20 2024 j-pai <[email protected]> - %{version} | ||
- AKMOD Support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
%global prjname vmware-host-modules | ||
%global pkgver MAKEFILE_PKGVER | ||
%global commithash MAKEFILE_COMMITHASH | ||
|
||
Name: vmware-host-modules | ||
Version: 1.0.%{pkgver} | ||
Release: git%{commithash} | ||
Summary: Kernel module (kmod) for %{prjname} | ||
License: GPL-2.0 | ||
URL: https://github.com/mkubecek/vmware-host-modules | ||
Source0: vmware-host-modules.conf | ||
|
||
# For kmod package | ||
Provides: %{name}-kmod-common = %{version}-%{release} | ||
Requires: %{name}-kmod >= %{version} | ||
|
||
BuildArch: noarch | ||
|
||
%description | ||
%{prjname} kernel module | ||
|
||
%prep | ||
|
||
%build | ||
# Nothing to build | ||
|
||
%install | ||
|
||
install -D -m 0644 %{SOURCE0} %{buildroot}%{_modulesloaddir}/vmware-host-modules.conf | ||
|
||
%files | ||
%{_modulesloaddir}/vmware-host-modules.conf | ||
|
||
%changelog | ||
* Sat Apr 20 2024 j-pai <[email protected]> - %{version} | ||
- AKMOD Support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters