Tuesday, August 23, 2011

Compiling Linux kernel for any CPU architecture

You can compile Linux kernel for any architecture including x86/arm/sparc/mpis etc. Inside the "arch" directory of the root kernel source tree you will find the list of the architectures supported by Linux.

For example to configure the Linux kernel for the "arm" architecture, from the root directory of the linux kernel sources tree do

$make menuconfig ARCH=arm

Note the ARCH=arm parameter in the above command. This will bring up the kernel configuration for the "arm" architecture. Similarly be replacing the ARCH parameter with name of architecture from the "arch" folder you can configure the kernel for that particular architecture.

Another example, for the "mips" architecture you can do

$make menuconfig ARCH=mips

No comments:

Post a Comment