Created
September 12, 2015 09:01
-
-
Save ivoarch/7cb4076ddcfc23560c72 to your computer and use it in GitHub Desktop.
compile a kmod against self compiled or other kernels
This file contains hidden or 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
# How to compile a kmod against self compiled or other kernels | |
# Source: http://rpmfusion.org/Packaging/KernelModules/Kmods2 | |
# Step 1 | |
# If you don't have a rpm build environment set one up like this | |
su -c "yum -y install rpmdevtools kmodtool kernel-devel" | |
rpmdev-setuptree | |
# Step 2 | |
# Now download the kmod src.rpm to the local directory and rebuild it for the running kernel: | |
yumdownloader --source kmod-foo | |
rpmbuild --rebuild foo-kmod*.src.rpm --define "kernels $(uname -r)" --target $(uname -m) | |
# Step 3 | |
# Use yum to install it with a command like this | |
su -c "yum --nogpgcheck install ~/rpmbuild/RPMS/i686/kmod-foo-1.0-4.i686.rpm" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment