If you have already carefully followed Chapter 1, Kernel Workspace Setup, the technical prerequisites that follow will already be taken care of. (The 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 a kernel module on a Linux distribution (or custom system), you need, at 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; on an Ubuntu- or Debian-based Linux system, use this:
sudo apt install gcc
- Kernel headers: These headers will be used during compilation...