O'Reilly logo

Hands-On System Programming with Linux by Kaiwan N Billimoria

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required