Created
December 10, 2017 02:46
-
-
Save zmallen/9d1c4959882a64820c3a703c3fb65408 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obj-m += hello-1.o | |
hello-1.objs := hello-1.o | |
all: | |
make -C /usr/src/kernels/3.10.0-693.11.1.el7.x86_64.debug M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r).debug/build M=$(PWD) clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/init.h> | |
#include <linux/kernel.h> | |
MODULE_LICENSE("GPL"); | |
int tkt_init(void); | |
void tkt_exit(void); | |
module_init(tkt_init); | |
module_exit(tkt_exit); | |
int tkt_init(void) { | |
printk("tkt: module loaded\n"); | |
return 0; | |
} | |
void tkt_exit(void) { | |
printk("tkt: module removed\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment