Table of contents
A little history
Thinking about embedded linux probably leads to first try of porting linux to different architecture. I did google research (I know I should probably read mailing list archive) and found that there were few attempt to port linux to different platform. There is no clear information about which port of linux was first. This is probably because many hackers didn’t report their effort. Arguably earliest out-of-tree version was probably for Acron A5000 (arm), Motorola 68000 (m68k) around Spring/Summer of 1994. I found also notes about SPARC port in 1993. Some sources also tells story about 1993 Amiga and Atari port. But first port that get in to official linux tree was DEC Alpha.
So linux is already 22 years old and first port start when it was 2-3 years old, so we can assume it is mature enough to support most of non-x86 architectures.
Get linux and build it
To deal with our embedded board we need operating system or some kind of
software that will allow us to use board features. Right now to boot system we
need at least kernel. So we have to prepare kernel for board of choice
Let’s start with cloning Linux repository:
and configure kernel for
It looks some feature is disabled in
versatile_defconfig. I mean
CONFIG_AEABI. It specifies file format, data types, register usage and other
things. The main difference between EABI and ABI is that privileged instructions
are allowed in application code. More about EABI
To enable this option run:
and go to:
We will also need DHCP and NFS support (CONFIG_IP_PNP_DHCP and CONFIG_ROOT_NFS).
IP: DHCP support and can be found under:
1 2 3 4
Second is :
let’s build image with U-Boot support.
We have kernel. How we can provide this kernel to our development environment ? As I discuss in previous post we can use bare-metal qemu, but not with uImage kernel. This is special U-Boot kernel, so easiest way will be using it with bootloader. We will figure out how to do this in next section about tftp and qemu network configuration.
TODO: add picture of configuration in intro – vdb, link it here Target configuration will consist on providing kernel through tftp server using U-Boot. Also want to use NFS root filesystem to boot our small distro. As it is in real development environment.
NOTE: During compilation process you can encounter error like this:
1 2 3 4 5
Of course it means that we need mkimage to create U-Boot image, so:
Update: in Debian jessie/sid this package was replaced by
We have to use uImage special build because load and execute address differes from board to board. If we will use vmlinux image then addresses should be manually modified. So using uImage is easiest