Step 4 – building the kernel image and modules
Performing the build from the end user’s point of view is straightforward. In its simplest form, just ensure you’re at the root of the configured kernel source tree and type make
. That’s it – the kernel image and any kernel modules (and, on an embedded system, possibly a Device Tree Blob (DTB) binary) will get built. Grab a coffee! The first time around, it could take a while.
Of course, there are various Makefile
targets we can pass to make
. A quick make help
command issued on the command line reveals quite a bit. Remember, we used this earlier, in fact, to see all possible configuration targets (revisit Chapter 2, Building the 6.x Kernel from Source – Part 1, and particularly the Seeing all available config options section if you’d like). Here, we use it to see what gets built by default with the all
target:
$ cd ${LKP_KSRC} # recall that the env var LKP_KSRC holds the pathname...