Skip to content
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

Open
bpranoto opened this issue Nov 18, 2020 · 3 comments
Open

How to install with DKMS #2

bpranoto opened this issue Nov 18, 2020 · 3 comments

Comments

@bpranoto
Copy link

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.

  1. Install dkms and build-essential
    sudo apt install dkms build-essential

  2. Create directory /usr/src/ipx-1.0
    sudo mkdir /usr/src/ipx-1.0

  3. Download this repository source https://github.com/pasis/ipx/archive/master.zip

  4. Extract the zip file, place the files to /usr/src/ipx-1.0 , here is mine:

bambang@bambang-Vostro-1014:/usr/src/ipx-1.0$ ls -l
total 108
-rw-r--r-- 1 root root 50935 Nov 17 22:06 af_ipx.c
-rw-r--r-- 1 root root     8 Nov 17 23:43 built-in.a
-rw-r--r-- 1 root root   277 Nov 18 00:07 dkms.conf
-rw-r--r-- 1 root root  8733 Nov 17 22:06 ipx_proc.c
-rw-r--r-- 1 root root  6785 Nov 17 22:06 ipx_route.c
-rw-r--r-- 1 root root  2794 Nov 17 22:06 Kconfig
-rw-r--r-- 1 root root   436 Nov 17 22:06 Makefile
drwxr-xr-x 2 root root  4096 Nov 17 22:06 net
-rw-r--r-- 1 root root  1687 Nov 17 22:06 p8023.c
-rw-r--r-- 1 root root   767 Nov 17 22:06 pe2.c
-rw-r--r-- 1 root root   321 Nov 17 22:06 README
-rw-r--r-- 1 root root   955 Nov 17 22:06 sysctl_net_ipx.c

  1. Create dkms.conf file in /usr/src/ipx-1.0 with the content:
MAKE="'make'"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="ipx"
BUILT_MODULE_LOCATION[0]="./"
DEST_MODULE_LOCATION[0]="/kernel"
BUILT_MODULE_NAME[1]="p8023"
BUILT_MODULE_LOCATION[1]="./"
DEST_MODULE_LOCATION[1]="/kernel"
PACKAGE_NAME="ipx"
PACKAGE_VERSION="1.0"
AUTOINSTALL=yes

  1. Add this package to dkms database:
    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:

p8022
psnap
p8023
ipx
  1. Reboot the computer

  2. Check wether the ipx.ko is load or not:
    bambang@bambang-Vostro-1014:/usr/src/ipx-1.0$ lsmod | grep ipx

ipx                    28672  0
p8023                  16384  1 ipx
psnap                  16384  1 ipx
p8022                  16384  1 ipx

  1. Check dkms status
bambang@bambang-Vostro-1014:/usr/src/ipx-1.0$ dkms status
ipx, 1.0, 5.4.0-54-generic, x86_64: installed

  1. Done. Thank you.
@pasis
Copy link
Owner

pasis commented Nov 18, 2020

Thank you for the guide!

@bpranoto
Copy link
Author

Thank you. Actually, I think this will be better going into the README or wiki.

@bpranoto
Copy link
Author

Correction, the make command in dkms.conf should be:
MAKE[0]="'make' KERNELDIR=/lib/modules/${kernelver}/build"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants