Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
To add to the answers: Besides the mainline, (sadly) many particular chips/boards/manufacturers have their specific arm ports, too. itworld.com/mobile-wireless/175829/… – XTL Jan 31 '13 at 7:01
up vote 8 down vote accepted

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 :).

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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