2020-10-31 07:00:00 +00:00
|
|
|
USER := $(shell whoami)
|
|
|
|
KVER ?= $(shell uname -r)
|
|
|
|
KDIR ?= /lib/modules/$(KVER)/build
|
|
|
|
|
|
|
|
all:
|
|
|
|
make -C $(KDIR) M=$(PWD) modules
|
|
|
|
|
|
|
|
clean:
|
|
|
|
make -C $(KDIR) M=$(PWD) clean
|
|
|
|
|
|
|
|
userspace:
|
|
|
|
gcc userspace/vendor-reset.c -Wall -Werror -g -Og -o userspace/vendor-reset
|
|
|
|
|
|
|
|
load: all
|
2020-11-01 22:14:11 +00:00
|
|
|
grep -q '^vendor_reset' /proc/modules && sudo rmmod vendor_reset || true
|
2020-10-31 07:00:00 +00:00
|
|
|
sudo insmod ./vendor-reset.ko
|
|
|
|
|
2020-11-01 22:14:11 +00:00
|
|
|
.PHONY: userspace load
|