Bering-uClibc 5.x - Developer Guide - Adding a Hardware Architecture Variant

From bering-uClibc
Revision as of 21:03, 20 March 2012 by Davidmbrooke (Talk | contribs) (Created initial stub)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

A major enhancement added in Bering-uClibc 5.x is the ability to target non-x86 runtime platforms. In principle it would now be possible to build Bering-uClibc 5.x for SPARC, MIPS or other CPU architectures. These notes provide guidance on what changes are required to add support for a brand new target architecture variant. The addition of support for the ARM11 processor on the Raspberry Pi single board computer is used as an example.

The first step is to understand exactly what hardware the target platform consists of. In particular:

  • What is the model number of the CPU?
  • What is the "architecture" of the CPU?
    • The ARM1176JZF-S CPU implements the ARMv6 architecture standard


Concepts and Terminology

The toolchain is responsible for building code for the target environment and it relies on the GCC (cross-)compiler to do most of the work. In addition it is necesary to configure the Linux kernel (and, to a lesser extent, uClibc) for the target hardware environment.

The GNU toolset (most notably "configure") has a well-established way of identifying different target platforms by a hyphen-separated list of the key characteristics known as the "configuration name". This was initially the triplet cpu-manufacturer-kernel but is now more commonly the quadruplet cpu-manufacturer-kernel-os (though this is still normally referred to as a "triplet"). For example, i486-unknown-linux-uclibc refers to:

  • an i486 CPU, installed in
  • an unknown hardware platform ("unknown" as in "we don't care whether a PC is made by HP, IBM, Dell etc."), running
  • the linux kernel, and
  • a uclibc C library-based operating system