Installing the Open2x toolchain

From wiki.gp2x.org

The Open2x toolchain is the most up to date GP2X toolchain there is and is the last one which is actively maintained. It was made and is maintained by DJWillis of the Open2x project. The toolchain can use the Open2x library binary packages which are released from time to time, and all the latest libraries from the Open2x are guaranteed to work with it. By using the Open2x toolchain, you also guarantee that you will be able to dynamically link your applications at a later date and have them function correctly on the Open2x firmware.

Contents

Installing toolchain

Using toolchain binaries

There are three binary packages which will be of interest to application developers: one for Cygwin (on Windows platforms) and the other two for Linux-based systems.

Windows

cd / && tar jxvf /path/to/bz2/arm-open2x-linux-apps-gcc-4.1.1-glibc-2.3.6_i686_cygwin.tar.bz2
  • This will install the toolchain to /opt/open2x relative to the Cygwin root directory. Un the future, a CoLinux image which can be run from Windows will be available and will have this pre-set up, but for now, Cygwin is the only way of using the Open2x toolchain on Windows systems.

Linux

cd / && tar jxvf /path/to/bz2/arm-open2x-linux-apps-gcc-4.1.1-glibc-2.3.6_i686_linux.tar.bz2.zip
  • This will install the toolchain to /opt/open2x. These binaries have both been tested on Ubuntu installations.

Compiling from source

If you do not wish to or cannot use the above binaries, you will have to check out the toolchain scripts from SVN and build it yourself.

  • First, make sure you have bison and flex installed, as the build script will return an error otherwise.
  • svn co https://open2x.svn.sourceforge.net/svnroot/open2x/trunk/toolchain-new open2x-toolchain
  • Give yourself write access to /opt.
  • cd open2x-toolchain
  • /bin/sh open2x-gp2x-apps.sh
  • Wait for a while until the build is complete. By default, it is installed to /opt/open2x

Installing libraries

These instructions apply to both Windows and Linux.

cd /opt/open2x && tar jxvf /path/to/bz2/open2x-libpack-20071903-gcc-4.1.1-glibc-2.3.6.tar.bz2

External links

Personal tools