If I want to build a custom kernel for an ARM architecture, do I need to :

a) Download the kernel from kernel.org, make changes to the kernel, build it using some cross compiler (like code sourcery or something)

b) Find an ARM specific kernel from somewhere, find some patches, compile it using some ARM specific tool ?

Can any custom kernel be built for the ARM architecture ?

I have little knowledge about kernels in general.


The Linux kernel source tarball and git repository includes the code for all supported architectures, such as ARM.

The subdirectory Documentation/arm/ contains some ARM related documents which you should probably have a look at before going further.

The ARM specific code is located in the arch/arm/ subdirectory (some ARM specific drivers may be in the drivers/*/ subdirectories).

Thus go ahead and download the normal kernel tarball from kernel.org and start by reading Documentation/arm/README which starts as follows:

Compilation of kernel

In order to compile ARM Linux, you will need a compiler capable of generating ARM ELF code with GNU extensions. GCC 3.3 is known to be ...

It looks like after reading that file you will have many answers (and maybe also more questions but do not hesitate to ask them :).


The kernel source is the same for all architectures. It's mostly written in C with a little bit of arch specific assembly.

The easiest way to build for ARM would be to be running on ARM already. You could then simply follow the regular compilation documentation.

If you want to build from a different architecture, that's called cross-compiling. I've never done that myself, but I do know that you need to set up a cross-compiling tool-chain in order to do so.

This HOWTO should get you started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.