mirror of
https://github.com/gnif/vendor-reset.git
synced 2026-02-10 03:22:42 +01:00
Initial module framework
This commit is contained in:
20
Makefile
Normal file
20
Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
obj-m += vendor-reset.o
|
||||
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
|
||||
grep -q '^uio' /proc/modules || sudo modprobe uio
|
||||
grep -q '^vendor-reset' /proc/modules && sudo rmmod vendor-reset || true
|
||||
sudo insmod ./vendor-reset.ko
|
||||
|
||||
.PHONY: userspace
|
||||
Reference in New Issue
Block a user