-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to install with DKMS #2
Comments
Thank you for the guide! |
Thank you. Actually, I think this will be better going into the README or wiki. |
Correction, the make command in dkms.conf should be: |
Since
|
And for the sake of completeness, I whipped up full install script for this kernel module and the userspace utils. #!/usr/bin/env bash
# Compile IPX kernel module using DKMS, and install IPX-Utils for management
# need to be root
if [ "$(id -u)" != "0" ]; then
echo "Must be run as root"
exit 1
fi
# sanity check
if [ "$(uname -s)" != "Linux" ]; then
echo "Only works on Linux!"
exit 1
fi
set -e # bail on any errors
# install needed packages
apt-get update
apt-get install -y build-essential automake linux-source dkms git make gcc curl unzip pahole
# fetch the latest ipx source and place it in a reasonable location
cd /tmp
if [ -f master.zip ]; then
rm master.zip
fi
if [ -d ipx-master ]; then
rm -rf ipx-master
fi
curl -LO https://github.com/pasis/ipx/archive/master.zip
unzip master.zip
rm master.zip
if [ -d "/usr/src/ipx-1.0" ]; then
rm -r "/usr/src/ipx-1.0"
fi
mv ipx-master /usr/src/ipx-1.0
cd /usr/src/ipx-1.0
# Create the DKMS configuration file
cat <<'EOF_DKMSCONF' >dkms.conf
MAKE[0]="'make' KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="ipx"
BUILT_MODULE_LOCATION[0]="./"
DEST_MODULE_LOCATION[0]="/kernel"
PACKAGE_NAME="ipx"
PACKAGE_VERSION="1.0"
AUTOINSTALL=yes
EOF_DKMSCONF
# add this package to DKMS database
dkms add -m ipx -v 1.0 || {
echo "looks like ipx module might already be registered, removing and re-adding"
dkms remove -m ipx -v 1.0 --all
dkms add -m ipx -v 1.0
}
# first build
dkms build -m ipx -v 1.0
# install it
dkms install -m ipx -v 1.0
# load the kernal at boot
mkdir -p /etc/modules-load.d
cat <<EOF_IPXCONF >/etc/modules-load.d/ipx.conf
p8022
psnap
p8023
ipx
EOF_IPXCONF
# compile and install IPX userspace utilities
cd /tmp
if [ -f master.zip ]; then
rm master.zip
fi
if [ -d ipx-master ]; then
rm -rf ipx-utils-master
fi
curl -LO https://github.com/pasis/ipx-utils/archive/master.zip
unzip master.zip
rm master.zip
mv ipx-utils-master /usr/src/ipx-utils-1.2
echo "compiling ipx-utils"
cd /usr/src/ipx-utils-1.2
aclocal
autoconf
automake --add-missing
./configure
make
make install
echo "Done setting up IPX kernel module and userspace utils."
echo "please reboot"
|
This is not a bug report but my experience how I install this modul with DKMS so whenever a kernel upgrade, this module will be automatically recompiled and reinstalled. Hope this will help other people who still needs ipx with the modern linux.
My system is ubuntu 18.04 with kernel version 5.4.0-54-generic.
Install dkms and build-essential
sudo apt install dkms build-essential
Create directory /usr/src/ipx-1.0
sudo mkdir /usr/src/ipx-1.0
Download this repository source https://github.com/pasis/ipx/archive/master.zip
Extract the zip file, place the files to /usr/src/ipx-1.0 , here is mine:
sudo dkms add -m ipx -v 1.0
Make sure there is no error
7.Build the package through dkms, dkms will try to make the package:
sudo dkms build -m ipx -v 1.0
Make sure there is no error.
8.Install the package
sudo dkms install -m ipx -v 1.0
This will copy to ipx.ko and p8023.ko to the appropriate directory.
9.Now we have to tell the computer to load the ipx kernel module everytime it boots. Create file
/etc/modules-load.d/ipx.conf
with content as follow:Reboot the computer
Check wether the ipx.ko is load or not:
bambang@bambang-Vostro-1014:/usr/src/ipx-1.0$ lsmod | grep ipx
The text was updated successfully, but these errors were encountered: