19 lines
498 B
Makefile
19 lines
498 B
Makefile
|
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
|
||
|
|
||
|
test: all
|
||
|
rmmod -f main || true
|
||
|
insmod main.ko
|
||
|
cat /sys/kernel/debug/fortytwo/foo
|
||
|
echo "bozo" > /sys/kernel/debug/fortytwo/foo
|
||
|
cat /sys/kernel/debug/fortytwo/foo
|
||
|
cat /sys/kernel/debug/fortytwo/id
|
||
|
echo -n cchauvet > /sys/kernel/debug/fortytwo/id
|
||
|
echo bozo > /sys/kernel/debug/fortytwo/id || true
|
||
|
cat /sys/kernel/debug/fortytwo/jiffies
|