Now it's time to play hard! We are going to see how a C compiler works, starting from compiling a simple C program to compiling the whole BeagleBone Black's kernel.
Knowing how to compile a program is useful in order to get the best performance from an embedded computer, and knowing how to compile the kernel is useful in order to be able to use the latest kernel release with the new and updated drivers and features. In this chapter, you will learn all about the compiling steps in both kernel and user-space to easily add a new driver not included in the standard BeagleBone Black's kernel, and/or how to recompile a user-space tool not included in the Debian distribution.
In this chapter, we will also see the difference between a compiler and a cross-compiler, and try to understand when it is better to use either one of them.