Permalink
Browse files

Add a sample test module, to quickly test dkms functionality

  • Loading branch information...
Praveen K Paladugu
Praveen K Paladugu committed Mar 27, 2015
1 parent 7c3e7c5 commit c516f5acd20bd991cde84e999f4c88c255f0b088
Showing with 44 additions and 0 deletions.
  1. +1 −0 test/README
  2. +7 −0 test/dkms_test-1.0/Makefile
  3. +13 −0 test/dkms_test-1.0/dkms.conf
  4. +23 −0 test/dkms_test-1.0/dkms_test.c
View
@@ -0,0 +1 @@
A sample module to test dkms.
@@ -0,0 +1,7 @@
obj-m += dkms_test.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@@ -0,0 +1,13 @@
PACKAGE_NAME="dkms_test"
PACKAGE_VERSION="1.0"
BUILT_MODULE_NAME="dkms_test"
MAKE="make -C /lib/modules/${kernelver}/build SUBDIRS=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build modules"
CLEAN="make -C /lib/modules/${kernelver}/build SUBDIRS=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build M=$PWD clean"
REMAKE_INITRD="yes"
DEST_MODULE_LOCATION="/kernel/extra"
@@ -0,0 +1,23 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#define DKMS_TEST_VER "1.0"
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("A Simple dkms test module");
static int __init dkms_test_init(void)
{
printk(KERN_INFO "DKMS Test Module -%s Loaded\n",DKMS_TEST_VER);
return 0;
}
static void __exit dkms_test_cleanup(void)
{
printk(KERN_INFO "Cleaning up after dkms test module.\n");
}
module_init(dkms_test_init);
module_exit(dkms_test_cleanup);
MODULE_VERSION(DKMS_TEST_VER);

0 comments on commit c516f5a

Please sign in to comment.