Let's configure the kernel (for the Raspberry Pi 2, Pi 3, and Pi 3[B]+). Before we begin, it's very important to keep the following in mind:
- The ARCH environment variable is to be set to the CPU (architecture) for which the software is to be cross-compiled (that is, the compiled code will run on that CPU). The value to set ARCH to is the name of the directory under the arch/ directory in the kernel source tree. For example, set ARCH to arm for ARM32, to arm64 for the ARM64, to powerpc for the PowerPC, and to openrisc for the OpenRISC processor.
- The CROSS_COMPILE environment variable is to be set to the cross compiler (toolchain) prefix. Essentially, it's the first few common letters that precede every utility in the toolchain. In our following example, all the toolchain utilities (the C compiler gcc, linker, C++, objdump, and so on) begin with...