Installation instructions
The installation of the APES framework is rather straightforward, at least when things go smoothly which usually is unfortunately not so often the case. It only comes as source, as it is opensource GPL’ed software.
The instructions below assume you run a debian-based GNU/Linux distribution, it is left to the reader to adapt to his/her own distro. You also need to have git installed, and a not too old version (git 1.7.2.5 and above are reputed to work with our repos).
Get the sources
First, clone the Apes repository. Recently, Apes has been reorganized as git
submodules, making the fetch automatic and always up to date. To get the whole stuff, here is how to proceed:
1 |
git clone —recursive git://git-sls.imag.fr/apes/Apes.git |
And you are all set. Older git
have no branch option to clone, so the process is a bit more complex:
1 2 3 |
git clone git://git-sls.imag.fr/apes/Apes.git git submodule init git submodule update |
Prerequisites
In order to correctly compile the GNU toolchains and get the APES tools working, you need to make sure that you have the following softwares installed on your system.
- GMP, MPFR and MPC libraries, with the header files for the cross-tools
1apt-get install libgmp-dev libmpfr-dev libmpc-dev
- libxslt development version
1apt-get install libxslt-dev
- Ruby (<= 1.8) and Rubygems (>= 1.3.1), including the development version. All recent (and decent) distro have now at least ruby 1.9.
1apt-get install ruby-dev
popen4
,term-ansicolor
,OptionParser
, andnokogiri
gems. Thegem
program may not be available within ruby directly, so1apt-get install rubygemsmay be necessary.
Some hack may be necessary fornokogiri
, as the newer version demand ruby 1.9 and above. The web is your friend to find out how to deal with that if you do not want to upgrade ruby.1gem install popen4 term-ansicolor OptionParser nokogiri- Bash or Zsh
Install the environment
Before using APES, you need to set several environment variables according to your system configuration.
1 2 |
export APES_ROOT=<apes_root> export APES_COMPONENT_PATH=$APES_ROOT/Components |
The install.sh
at the root of the sources can be used for this purpose, please update it according to your own environment.
The APES_ROOT
variable must contain the PWD
of your APES installation. The APES_COMPONENT_PATH
behaves likes the PATH
variable and contains a list of directories, separated with :
, that gathers components. You can thereby have a global APES installation and multiple users can exports their own component repositories.
1 2 3 |
export RUBYLIB=$RUBYLIB:$APES_ROOT/Tools/Ruby/lib export PATH=$PATH:$APES_ROOT/Tools/Ruby/bin export PATH=$PATH:$APES_ROOT/Tools/Shell/bin |
APES build system uses ruby and defines several libraries of which ruby must be aware. Hence, you need to extend RUBYLIB
with the line above. Same things concerning the tools, your shell must be aware of their existence, so you need to extend your PATH
with the lines above.
Prior to be able to build a kernel, it is necessary to build the cross-development tools for the target processor. As DNA/OS has been ported on MIPS, ARM, Microblaze, NIOSII and x86, refrain yourself you build the tools for sparc or powerpc. A patched version of the cross-dev tools is available through the SLSxtools
git repositoy. As it is organized in submodules and contains several branches for different targets, the command line to fetch the right thing is:
1 |
git clone -b dna-xtools --recursive git://git-sls.imag.fr/gnu_tools/SLSxtools.git |
If you arrived here even though you have an old git
version, we rely on you to infer the set of git
commands to issue to fetch the content of the dna-xtools
branch of the repository.
The cross-dev environment needs the texinfo
, bison
and flex
packages (and fail with strange errors when compiling, not at configuration time unfortunately), so make sure you have them installed or install them before going further:
1 |
apt-get install texinfo bison flex |
Once done, enter the SLSxtools
directory and launch the script which stands there:
1 |
./build_xtools arm Toolchains |
The first argument is the target processor, the second one the directory in which the compilation results should be place.
Now you are all set. Enjoy!