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

Add DKMS support #29

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@ allow_unsupported_modules 1
```


### DKMS

You can use DKMS to automatically rebuild module on kernel upgrade.

Dependencies: dkms, compiler toolchain

Install with DKMS:

```shell
git clone https://github.com/infinet/xt_wgobfs
cd xt_wgobfs/src
sudo dkms add .
sudo dkms build -m xt_WGOBFS -v 0.5.0
sudo dkms install -m xt_WGOBFS -v 0.5.0
```


### Usage

This extension takes two parameters.
Expand Down
11 changes: 11 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
modname := xt_WGOBFS
obj-m := $(modname).o

KDIR := /lib/modules/$(shell uname -r)/build
PWD := "$$(pwd)"

all:
$(MAKE) -C $(KDIR) M=$(PWD) modules

clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
7 changes: 7 additions & 0 deletions src/dkms.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PACKAGE_NAME="xt_WGOBFS"
PACKAGE_VERSION="0.5.0"

BUILT_MODULE_NAME[0]="xt_WGOBFS"
DEST_MODULE_LOCATION[0]="/updates"

AUTOINSTALL=yes