Toolchain
From ArmadeusWiki
How-To install Armadeus Software Development Kit for Linux/Window$
Contents |
Forewords
Before writing your first program or changing some of your system's utilities, you will need to build the tools required to compile them on your Host system (cross compilation). The GNU toolchain will be used.
Lexical
- Binutils: several GNU utilities to generate executable files
- Buildroot: set of Makefiles that allow to entirely build embedded Linux systems
- Busybox: "swiss knife" of the embedded Linux (regroup many common programs in one executable)
- GCC: GNU C compiler
- GDB: GNU debugger
- rootfs (root filesystem): filesystem image which will be installed on your target and used by Linux as root ("/") mountpoint.
- U-Boot: Bios / Bootloader
Recommended System Requirements
- HD free space: at least 5GiB
- 2GiB RAM is preferable
- 2GHz processor with a 533MHz FSB
- High speed Internet connection (1Mb/s)
With these settings, you will get a complete toolchain, Linux and the RootFS in about 1h30.
Linux installation
The installation was successfully tested on the following distributions:
- Debian Sarge (3.1), Etch (4.0) & Lenny (5.0)
- X/KUbuntu Edgy Eft (6.10), Gutsy Gibbon (7.10), Hardy Heron (8.04) & Jaunty Jackalope (9.04)
- Ubuntu Dapper Drake (6.04), Hardy Heron (8.04), Intrepid Ibex (8.10) & Lucid Lynx (10.04) (64bits)
- Mandriva 2006
- Fedora Core 3 & 4, Fedora 10, Laughlin (14)
- Red Hat Enterprise 5.2
- Gentoo 10.0 (32 & 64 bits)
- SuSE 10.1, OpenSUSE 11.3
The installation may fail on:
- Ubuntu Karmic Koala (9.10): tslib fails to build
Prerequisites for Linux installation
![]() | Note: From here we assume that your Linux system has a make version greater or equal to 3.81. To check it:
$ make -v GNU Make 3.81 ... |
For armadeus up to 3.4, make should be strictly make-3.81 (make-3.82 is too strict). A Fedora (14 and 15) -specific solution can be found later; other recent distributions such as mageia1 also have make-3.82, and a generic solution, based on configure&& make&& sudo make install can be used to install make-3.81 (which can be retrieved from http://ftp.gnu.org/gnu/make/make-6.81.tar.gz) in /usr/local/bin (and , according to one's PATH, make 3-81 can be invoked directly or as /usr/local/bin/make).
Depending on your distribution, some additional packages are required:
Debian/Ubuntu based systems
Ubuntu/Debian installation prerequisites
Mandriva based systems
Mandriva installation prerequisites
RPM-based systems (RedHat, Fedora, CentOS)
RedHat/Fedora installation prerequisites
OpenSuse based systems
OpenSuse installation prerequisites
Get Armadeus software
- If you are a "careful" user, then download the latest stable installation tarball from SourceForge and detar it wherever you want:
$ tar xjvf armadeus-4.1.tar.bz2
- If you want the latest snapshot, the whole development tree can checked out from the GIT repository. (SVN repository is no more maintained !!!)
$ git clone git://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus armadeus
- depending on your previous choice, a directory named armadeus/ or armadeus-4.1/ will be created on your hard-disk and will contain all the files you need.
Remarks:
- Do not use spaces in the directory name !
- GIT write/push accesses are limited to the integrators (JulienB, Salocin68, Jorasse, FabienM)
Configure SDK options
![]() | Note: If you are new to Armadeus and have troubles compiling armadeus-4.1 using the following instructions, you may find some hints here: Armadeus 4.1 Troubleshots |
- Go to the directory where you put the Armadeus sources:
$ cd armadeus/ (or armadeus-4.1/)
- The first time you compile an Armadeus distribution you have to specify the target (here the APF9328) to work with.
$ make apf9328_defconfig
This command reloads the default configuration to support your target and automatically start a Buildroot's configuration menu.
- Current valid default configurations are:
apf9328_defconfig apf27_defconfig pps_defconfig apf28_defconfig apf51_defconfig
For PPS, please see APF27_PPS for details on its specific build.
- After some downloads, you will get the Buildroot configuration interface:
![]() | Note: If you ever made changes in the following steps, at any time you can reload the default configuration with the same command |
- If you are not familiar with Buildroot here are some tips:
- you can move the highlighted item with the "up"/"down" arrow keys
- with the "left"/"right" arrow keys you can choose between "Select", "Exit" or "Help" buttons
- "space"/"enter":
- selects the currently highlighted item if you are on the "Select" button
- go back in previous menu if you are on "Exit" button
- show you some Help for current item if you are on "Help" button
- for more Help about Buildroot commands, select "Help" in the main configuration screen
- In menu:
System configuration ---> [*] Armadeus Device Support --->
- you can check and change the quantity of RAM available on your Armadeus board. For APF27 it could be either 64MB or 128MB (2 x 64MB) (in that case be sure to select 2 chips of 64MB instead of 1 chip of 128MB).
- You may decrease the compilation time by increasing the number of parallel jobs running simultaneously on your system (the result is not guaranteed). This option is located in
Build Options ---> (1) Number of jobs to run simultaneously
- During the toolchain/distribution automatic build, a lot of software archives are downloaded from Internet. The downloaded files are put by default in the armadeus/downloads/ directory. If you have several views or plan to build the toolchain several times, we advise you to put all the downloaded files in /local/downloads (for example). This is done by configuring Buildroot to use this directory for all your views. Nevertheless, buildroot will be downloaded separately for each build environment you set up.
Of course, /local/downloads should exists on your system and you should have writing rights on it !
- After the build, we advise you too to copy all the files in downloads/ on a removable medium, in case you want to install the development tools on several systems.
- Now, Exit the configuration tool and save your configuration
- You can come back to this configuration menu, by typing (your changes will be kept):
make menuconfig
Launch build
$ make
The toolchain and the full distribution are automatically built. During this procedure, several files are downloaded from Internet.
Please wait for a while.... it takes at least one hour for the first run!
By default, the downloaded files/tarball are put in the armadeus/downloads/ directory. Please see the previous chapter to know how to optimize that if you plan to build several views or want to build faster.
Enjoy the result
The generated binary files can be found in the subdirectory buildroot/output/images:
- apf9328-u-boot.brec (only on APF9328): BRecord image that can be used with the bootstrap, if U-Boot is not installed or not working (see BootLoader page)
- XX-u-boot.bin: U-Boot image file to be used with U-Boot itself, (see updating U-Boot)
- XX-linux.bin: Linux image to use with U-Boot, (see updating Linux)
- XX-rootfs.jffs2: JFFS2 filesystem/rootfs image to use with U-Boot, (see updating rootfs)
- XX-rootfs.ubi (not supported on APF9328): UBI filesystem/rootfs image to use with U-Boot, (see updating rootfs)
- apfXX-rootfs.tar: for an NFS/MMC based rootfs, (see Booting from NFS & Booting from a MMC/SD)
Please note the new naming convention of binary files and directories (since Armadeus 4.0)
- buildroot/output/build: contains all the build results for target filesystem, linux, busybox and u-boot...
- buildroot/output/toolchain/: cross compilation toolchain's build dir. Binaries usable for cross-compilation are in buildroot/output/host/usr/bin.
- buildroot/output/target/: target filessytem before generating rootfs images
More information is available in the Buildroot's documentation
- Note: Previous versions (3.x) of Armadeus SDK stored the generated binary files at a different place: buildroot/binaries/XX/ (where XX was the name of your board).
Window$ installation
There are 3 ways of having Armadeus SDK (Linux based) running on Window$ Hosts:
- Cygwin (not supported anymore)
- VMWare
- VirtualBox / QEmu x86
![]() | Note: After a performance test with VMWare, it is clear that Cygwin won't be supported anymore. We have observed quite a factor 2 in terms of compilation improvements with VMWare |
So, on Window$ Hosts, installing the SDK will summary in:
- install VMWare or VirtualBox,
- install a Linux distribution on it (Ubuntu, Mandriva, Fedora, Gentoo,... as you like)
- and then follow Linux installation steps.
What are VMWare & Virtual Box ?
- They are virtualization tools able to run a standard Linux distribution on a native Window$ system or Window$ on a Linux native system.
- VMWare player is free. VMWare desktop (used to create the first virtual system) is available for evaluation. You need it only one time.
- VirtualBox is a Open Source software.
Be aware that VMWare/VirtualBox will require more disk space than cygwin, because a complete Linux distribution will be installed.
Windows installation with Cygwin (no more used)