The following guide will demonstrate how to set up an ARM cross-compilation environment in Kali Linux. This guide is the starting point for many of our contributed “Custom ARM Images” articles.
Setting Up Your Development Box
Compiling kernels and generating images usually comes at the cost of disk space. Make sure you have at least 50 GB of disk space available on your Kali development machine as well as ample RAM and CPU juice.
Start off by installing the required dependencies for ARM cross-compilation.
zip curl libncurses5-dev zlib1g-dev gcc-multilib g++-multilib
If you are running a 64 bit Kali Linux system, add i386 architecture support to your development environment as follows.
apt install ia32-libs
Download Linaro Toolchain
Download the Linaro cross-compiler from our Git repository.
mkdir -p arm-stuff/kernel/toolchains
git clone git://github.com/offensive-security/gcc-arm-eabi-linaro-4.6.2.git
Set Environment Variables
To use the Linaro cross-compiler, you will need to set the following environment variables in your session.
Now your ARM cross-compilation environment is complete and you can proceed with building your own ARM kernels as described in the article on preparing a Kali Linux ARM chroot.