News

Toolchain installation

Requirements

  • A version of GCC that can create ELF binaries
  • GNU binutils that manipulates ELF binaries
  • Perl with the modules XML::LibXML and XML::XPath::XMLParser
  • Mtools to manipulate MS-DOS style disks (optional)
  • QEMU
  • Make

Linux

Assuming you use Debian/Ubuntu, you need the following packages:

  • GCC
  • binutils
  • perl
  • libxml-xpath-perl (the XML::XPath::XMLParser)
  • libxml-libxml-perl (the XML::LibXML Perl module)
  • mtools (optional)
  • qemu
  • make

This packages are available with traditional packages managers.

Before using POK, you must set the POK_PATH variable to the directory that contains POK. For example, you can add the following line in your ~/.bashrc (or ~/.zshrc) file: export POK_PATH=/path/to/pok/installation.

Note for ubuntu users

On some ubuntu distributions, POK would not compile on GCC with ubuntu due to a bug in the package GCC provided by Ubuntu. To solve this issue, three solutions:

  1. Invoke the following command at the top of POK directory : find . -name '.depend.mk' after running POK for the first time.
  2. Use a vanilla version of GCC
  3. Install Debian

Mac OS X

Mac OS X uses the mach-o binary format. Consequently, you need a dedicated compiler that can output binaries in the ELF format. Fortunately, such a compiler is available in the MacPorts system. In addition, Macports provides many other packages required by POK. Install macports and install the following packages with macports:

  • p5-xml-xpath (for XML::XPath::XMLParser Perl module)
  • p5-xml-libxml (for XML::LibXML Perl module)
  • i386-elf-gcc (GCC that produces ELF binaries)
  • i386-elf-binutils (binutils that uses ELF binaries)

QEMU for OS X is available in the Q project. You can find it on http://www.kju-app.org/.

Make is not required, because Mac OS X already provides the make utility.

Once you install all these software, check that binaries are available in your PATH variable. Binaries installed with Macports must be in your PATH, as well as Q binaries. The following command should do everything if you installed the required software in standard directories: export PATH=/opt/local/bin:/Applications/Q.app/Contents/MacOS/i386-softmmu.app/Contents/MacOS/:$PATH

Before using POK, you must set the POK_PATH variable to the directory that contains POK. For example, you can add the following line in your ~/.bashrc file: export POK_PATH=/path/to/pok/installation.

Windows

A toolchain is available to use POK under Windows. You can get it on http://download.tuxfamily.org/pok/snapshots .

Download the toolchain and store it in the root directory of POK, under the name toolchain. Then, go to this directory and run configure.bat. Reboot your computer. Everything should be OK.

Be careful, this toolchain is considered as a beta version. It may break existing installations of the cygwin environment.

With Windows, you dont need to set the POK_PATH variable.

Test

To test POK and check that all required software is installed, go you the POK directory and issue make tests. If everything compiles and no error is shown, everything is OK.

The following video show you quickly how to download POK and run an example on Linux in a terminal.

You need to install a Flash Player to watch this video!

 
installation.txt · Last modified: 2012/05/10 16:11 by julien