git clone https://github.com/MROS/hello-kernel-module
cd hello-kernel-module
make
此時會在當前目錄生成 hello.ko
sudo insmod hello.ko # 載入
dmesg | tail # 觀察 log
sudo rmmod hello.ko # 移除
dmesg | tail # 觀察 log
Q: 請解釋 Makefile
git clone https://github.com/MROS/hello-kernel-module
cd hello-kernel-module
make
此時會在當前目錄生成 hello.ko
sudo insmod hello.ko # 載入
dmesg | tail # 觀察 log
sudo rmmod hello.ko # 移除
dmesg | tail # 觀察 log
Q: 請解釋 Makefile