diff --git a/0.0_Basic/Makefile b/0.0_Basic/Makefile index 68f5950..4046bb8 100644 --- a/0.0_Basic/Makefile +++ b/0.0_Basic/Makefile @@ -5,3 +5,9 @@ clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean + +test: + sudo dmesg -C + sudo insmod example.ko + sudo rmmod example.ko + dmesg diff --git a/0.0_Basic/README.md b/0.0_Basic/README.md index 3e07c10..57b0d33 100644 --- a/0.0_Basic/README.md +++ b/0.0_Basic/README.md @@ -12,4 +12,7 @@ * Unload with `rmmod example.ko` * Check the second output in the kernel buffer with `dmesg` +Alternatively: +* Run `make test` and observe the two outputs as the module is loaded/unloaded. + > NOTE: You'll need `build-essential` and `linux-headers-$(uname -r)` installed.