Linuxstamp:Buildroot

From OpenCircuits
Revision as of 23:03, 14 August 2008 by Vvaidy (talk | contribs) (New page: == Building a Toolchain and Kernel for the Linux Stamp using Buildroot == When the Linux Stamp boots, a tiny little loader called the ''Darren Loader'' fires up, which in terms passes con...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Building a Toolchain and Kernel for the Linux Stamp using Buildroot

When the Linux Stamp boots, a tiny little loader called the Darren Loader fires up, which in terms passes control to U-Boot. U-Boot's job is to locate and pass control to the Linux Kernel, which is the piece of software that sticks around, interfacing to the hardware, but at the very beginning it it responsible for locating a root file system, mounting it, and then creating the initial userland processes.

In other words, there are two distinct pieces of code that you need to supply so that the Stamp can be up and running with Linux: these two are (i) the Linux Kernel and (ii) the Linux Root File System (i.e. all the files under "/").

To be able to build any of this stuff though, you can't use the compiler you have on your x86 machine. The gcc on your x86 machine will normally generate x86 code targeted at an x86 machine. Unfortunately, the Linux Stamp doesn't have an x86 processor - it has an ARM processor. To be able to get gcc to create code that will run on the ARM processor on the Linux Stamp, you will need a cross compiler (aka toolchain) i.e. something that runs on a HOST machine and compiles to a different architecture, called the TARGET architecture. In your case, the HOST architecture is presumably x86 and your TARGET architecture is arm (which is what the Linux Stamp has on it).

For purposes of this discussion, I'm going to assume that your desktop or server (called the "HOST") where you are going to run the compiler is an x86 machine running Ubuntu (or some other Debian based) Linux.