how to build just only a kernel module from linux source tree:
-
how to build just only a kernel module from linux source tree:
1. steal Module.symvers from currently running kernel. It's usually in linux-headers packages. Copy it to the source tree root.
2. make oldconfig prepare modules_prepare
3. make M=path/to/subdir
If it errors out with missing symbols, compile modules that have them. Then do:
4. grep <missing symbol> path/to/dependency/Module.symvers >> Module.symvers
and rebuild the module you want
After that drop all built *.ko's to /lib/modules and run depmod, so it figures out dependencies for modprobe. -
how to build just only a kernel module from linux source tree:
1. steal Module.symvers from currently running kernel. It's usually in linux-headers packages. Copy it to the source tree root.
2. make oldconfig prepare modules_prepare
3. make M=path/to/subdir
If it errors out with missing symbols, compile modules that have them. Then do:
4. grep <missing symbol> path/to/dependency/Module.symvers >> Module.symvers
and rebuild the module you want
After that drop all built *.ko's to /lib/modules and run depmod, so it figures out dependencies for modprobe.@a1ba@suya.place I always just
make menuconfig
and thenmake modules_install
Most of the time it works
Other times it needs a regular
make install
as well and a reboot. -
@a1ba@suya.place I always just
make menuconfig
and thenmake modules_install
Most of the time it works
Other times it needs a regular
make install
as well and a reboot.@lanodan yeah, same, I mostly did it out of interest.