Easily cross-compiling a kernel

To avoid having to export the CROSS_COMPILE variable every time you recompile your cross-compile kernel, a suggestion I found is to define the variable in the Makefile itself. Like so:
ARCH = arm
CROSS_COMPILE = armv5tel-softfloat-linux-gnueabi-

This is nice, but then I get conflicts when I pull in the new kernel updates with git. Or even worse, my kernel version gets tagged as "-dirty" to reflect the modified source tree, as opposed to a pristine git checkout. So, a workaround is to put these in a GNUmakefile (checked first by GNU make, and not managed in the kernel repo).
$ cat <<EOF >GNUmakefile
ARCH = arm
CROSS_COMPILE = armv5tel-softfloat-linux-gnueabi-
include Makefile


Popular posts from this blog

Installing Gentoo with full disk encryption

ADSL Router Model CT-5367 user and pass (VIVACOM)

FreeIPA cluster with containers