Technical requirements
If you have already carefully followed Online Chapter, Kernel Workspace Setup, then a portion of the technical prerequisites that follow will already be taken care of. (The first chapter also mentions various useful open-source tools and projects; I definitely recommend that you browse through it at least once.) For your convenience, we summarize some key points here.
To build and use an external (or out-of-tree) kernel module on a Linux distribution (or custom system), you need:
- The kernel to be built with module support enabled (
CONFIG_MODULES=y
) - At a minimum, the following two components to be installed:
- A toolchain: This includes the compiler, assembler, linker/loader, C library, and various other bits and pieces. If building for the local system, as we assume for now, then any modern Linux distribution will have a native toolchain pre-installed. If not, simply installing the GCC package for your distribution should be sufficient...