Removed Rust code, added misc device and irq handle. Began work on correctly formatting print msg and logging files.

Signed-off-by: Jolan Rathelot <jrathelo@student.42nice.fr>
This commit is contained in:
Jolan Rathelot
2024-03-12 13:27:17 +01:00
parent b20836700d
commit 1b685c68cb
12 changed files with 517 additions and 13480 deletions

View File

@ -1,20 +1,23 @@
KDIR ?= /lib/modules/`uname -r`/build
SRC = src/main.c src/misc_device_fops.c src/keyboard_logger.c
all: driver_and_interrupts.ko
driver_and_interrupts.ko: src/lib.rs
driver_and_interrupts.ko: $(SRC)
$(MAKE) -C $(KDIR) M=$$PWD LLVM=1
modules_install:
install: modprobe
modules_install: driver_and_interrupts.ko
$(MAKE) -C $(KDIR) M=$$PWD LLVM=1 modules_install
clean:
$(MAKE) -C $(KDIR) M=$$PWD LLVM=1 clean
insmod:
insmod driver_and_interrupts.ko
modprobe: modules_install
modprobe driver_and_interrupts
rmmod:
rmmod driver_and_interrupts
.PHONY: all clean modules_install rmmod insmod
.PHONY: all clean modules_install rmmod modprobe install