CrossCompiler.txt 1.76 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
= Introduction =
The InstallCrossCompiler.sh script downloads, builds and installs all cross compilers needed for our MPSoC Systems.
This process is split into several steps.
The scripts creates a temporary directory at ~/.bstemp which is used for the build process of the compilers.
After each step, a files gets stored at this directory with the file extension ".flag".
The existing of such a file signals the script, that the corresponding step was successfully completed.
When a later process fails, the script can be restarted and it will skip all previous steps and tries to restart the failed step directly.
If you want to rerun a successful step, just remove that file.

The temporary directory can be removed after all compilers were successfully installed.

The compilers for the following architectures will be installed:

  * MicroBlaze (litte endian)
  * ARM (Cortex A9)

= Using the script =

The script does most of the work automatically.
Never the less there are some manual steps that are explained in the following subsections.

== Create Installation directory ==
# As root, replace $USER with your user name
mkdir /opt/mbxc  && chown $USER:$USER /opt/mbxc
mkdir /opt/armxc && chown $USER:$USER /opt/armxc

== Install dependencies ==
Install at least the following packages.
When the build process fails, install the missing packages as well.

== Execute the script ==

# As user!
./InstallCorssCompiler.sh
# Most of the steps take a long time, up to multiple hours!

== Update the PATH variable ==

To be able to execute the compilers, there installation path must be added to the PATH variable.
To make this automatically, copy the xcpaths.sh script to /etc/profile.d and make it executable:

# As root
cp resources/xcpaths.sh /etc/profile.d/.
chmod +x /etc/profile.d/xcpaths.sh