Example 3 – kernel build

So, one last experiment (for this section): we will build (cross-compile) a Linux kernel ver. 4.17 for the ARM Versatile Express platform (with its default configuration). The details of the kernel build and so on are out of scope of this book, but that's all right: the key point here is that the kernel build is definitely a CPU and RAM intensive operation. Not only that, the modern make(1) utility is multiprocess capable! One can tell make the number of jobs—processes, really—to internally spawn (fork) via its -jn option switch, where n is the number of jobs (threads). We use a heuristic (a rule of thumb) to determine this:

n = number-of-CPU-cores * 2

(multiply by 1.5 on very high-end systems with a lot of cores.) ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.