举个栗子:
cd kernel
make SUBDIRS=./samples/kprobes modules
SUBDIRS=./ 后面加你要编译的kernel模块的路径
SUBDIRS 这个关键字一定要大写
本人实际调试的时候,SUBDIRS写出小写的时候,结果是编译所有模块
随便记录下模块相关的几个命令:
insmod
rmmod
lsmod
modprobe (能够处理 module 载入的依赖问题)
举个栗子:
cd kernel
make SUBDIRS=./samples/kprobes modules
SUBDIRS=./ 后面加你要编译的kernel模块的路径
SUBDIRS 这个关键字一定要大写
本人实际调试的时候,SUBDIRS写出小写的时候,结果是编译所有模块
随便记录下模块相关的几个命令:
insmod
rmmod
lsmod
modprobe (能够处理 module 载入的依赖问题)