This commit is contained in:
Ciro Santilli
2016-12-15 22:53:13 +00:00
parent d45ceace5d
commit 8eb878c24e
5 changed files with 48 additions and 34 deletions

View File

@@ -2,7 +2,23 @@
The module building system.
Kernel modules are built using a makefile located at:
Explained at: <https://www.kernel.org/doc/Documentation/kbuild/modules.txt>
Full method: get the kernel, build it to a directory `$KDIR`, and then run:
make -C "$KDIR" M="$(PWD)" modules
Quick method: no need for a full build, just:
make modules_prepare
but you lose some functionality. TODO: module insert on host then fails with:
insmod: ERROR: could not insert module hello.ko: Invalid module format
even though kernel tree was checked out to match the host.
Using your distro's kernel version:
/lib/modules/$(uname -r)/build