Chapter 1. Introduction to Porting

Table of Contents

Before You Begin
Requirements
Host Requirements
Target Requirements
Process Overview

Welcome to the Adélie Linux Porting Handbook. This handbook will provide everything you need to know to bootstrap a new platform to run Adélie Linux. It is organised into three main parts: this Introduction, the Bootstrapping phase, and the Native Hardware phase.

There are a few things you need to be aware of before you begin. First of all, bootstrapping a new platform can be difficult at times. Don't get discouraged if your build doesn't work perfectly the first time. Build issues and instability are common at the beginning of every port. If you need help, you can ask the maintainers of the software you are building, or you can contact the Adélie Linux Platform Group. They are the group assigned to maintaining cross-platform compatibility and accepting new ports to the main Adélie Linux distribution.

You will need two computers. The first one, which we will term the "host", must be a computer that is already running a Linux distribution; it is recommended that the host is already running Adélie Linux. It will also need a performant CPU and adequate disk space, because it will need to compile two full toolchains (compiler and other build tools).

[Warning] Warning

While it is theoretically possible to bootstrap from any POSIX system that supports GCC or Clang, it is unsupported to use a non-Linux environment to bootstrap Adélie.

You may need Internet access on the host to download packages. If you do not have Internet access on the host, you will need to obtain the Adélie Linux Platform Group Resource Disc, which contains the packages and source code you will need to bootstrap your new platform.

On the computer you will run Adélie Linux on, which we will term the "target", you will need a computer platform supported by the Linux kernel and one of its compilers (at the time of this writing, GCC or Clang). The Linux kernel, as of version 4.3, supports over 30 CPU architectures, so odds are good that your computer will be supported. Nonetheless, you should still ensure that the Linux kernel and a recent toolchain have been ported and tested on your hardware before proceeding.

You will also need a way to boot Linux on your target. The specifics of this are beyond the scope of this guide. Usually most embedded systems support booting off flash media which is easily obtained and writable by most host computers; they may alternatively support booting from a network.

  • Linux (preferrably Adélie)

  • Multiple CPUs or cores (highly recommended).

  • At least 1.5 GB memory on any platform; 2 GB recommended on x86.

  • At least 10 GB disk space; 30 GB is highly recommended.

  • Internet connection (highly recommended).

  • A computer that supports Linux and a toolchain.

  • Boot media of some kind (flash, disk, ROM, network, etc).

Porting the Adélie Linux system to a new platform involves a few high-level goals:

  • Port the musl libc to your target (if required);

  • Build a "cross-compilation" toolchain for your target on the host, which allows you to build software for your target;

  • Build essential libraries and system software for your target using the cross-compiler on the host;

  • Re-build these essential libraries on your target.

Once these goals have been completed, you will have a functional Adélie Linux system on your target. After you have tested it and are satisfied with the stability and functionality of the port, you may also wish to contact the Adélie Linux Platform Group to consider including the new port in the official distribution.