This commit is contained in:
2024-08-07 12:33:08 +02:00
commit c3391de3ee
20 changed files with 31174 additions and 0 deletions

7
ass01/Makefile Normal file
View File

@ -0,0 +1,7 @@
obj-m += main.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

19
ass01/main.c Normal file
View File

@ -0,0 +1,19 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
static int __init module_start(void)
{
printk(KERN_INFO "Hello world !\n");
return 0;
}
static void __exit module_end(void)
{
printk(KERN_INFO "Cleaning up module.\n");
}
module_init(module_start);
module_exit(module_end);