2.2 Setup Arm Cross Compiler
- Update package
lists.
$ sudo apt update
- Install the GCC and G++
cross-compilers.
$ sudo apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- Set the target architecture as Arm.
$ export ARCH=arm
- Set the prefix for the
cross-compilation tools.
$ export CROSS_COMPILE=arm-linux-gnueabihf-
Important: After configuring the environment variables
as described above, please ensure that you use the same terminal window for all
subsequent steps, until compiling and building the kernel image has been
finished.