make
This isn't pretty, your computer and filesystems will hate you. Smoke may erupt. All your work WILL be lost.
echo 1 | sudo tee /proc/sys/kernel/panic
sudo insmod byebye.ko
| #include <linux/module.h> | |
| #include <linux/kernel.h> | |
| static int __init seeya(void) { | |
| char msg[0] = {}; | |
| panic(msg); | |
| return 0; | |
| } | |
| module_init(seeya); |
| obj-m += byebye.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 |