Download and install the toolchain

From Eminent Opensource

Jump to: navigation, search

Introduction

The EM7075 hardware is based on the MIPS architecture. A standard PC at home is based on Intel's x86 architecture. The hardware in your EM7075 has a different design (following the MIPS architecture). As a consequence, applications compiled for an x86 architecture cannot be executed on the EM7075.

The toolchain makes it possible to compile source-code for MIPS architecture based hardware. Compiling source for MIPS architecture on a PC running x86 architecture is called cross compiling.

Note that the free version of the used toolchain is available for Linux and Windows. This howto assumes you are using Linux. If you are using Microsoft Windows, Ubuntu might be a good Linux distribution to use for cross-compiling software for your EM7075. Also note that we assume that you are at least a little bit familiar with the process of compiling an application using Linux GNU tools (using ./configure and make) and your Linux installation is ready for application development and source code compilation.

Download and install the toolchain

For the EM7075 the toolchain that has been used to create the official firmware is Sourcery G++ made by the company called CodeSourcery. The lite version is available for those who wish to compile their own applications.

Some links:

As the time of writing this wiki page, the latest available version is 4.4-303. Version 4.3-51 is used by Eminent for building the official firmware. Because version 4.4 contains a more recent version of the C-library, a 4.3 version must be used. It is advised to use the latest 4.3 release, which at the moment is 4.3-154.

We assume that you have root access. We assume that you execute the commands on this page with root privileges.

Download the toolchain:

cd /tmp
wget http://www.codesourcery.com/sgpp/lite/mips/portal/package4434/public/mips-linux-gnu/mips-4.3-154-mips-linux-gnu.bin

The toolchain package is a self-installing binary file. Make it executable and run it:

chmod +x mips-4.3-154-mips-linux-gnu.bin
./mips-4.3-154-mips-linux-gnu.bin

If your Linux machine does not have X Windowing System installed, use:

chmod +x mips-4.3-154-mips-linux-gnu.bin
./mips-4.3-154-mips-linux-gnu.bin -i console

Follow the steps on-screen and select a suitable folder to install. We will be using /opt/Sourcery_G++_Lite in several examples, so it's best to install it there. Follow the steps and confirmation prompts until the toolchain is installed.

Remove the downloaded installer:

rm -f /tmp/mips-4.3.154-mips-linux-gnu.bin
Personal tools