wiki:Install

Summary

Building and running MutekH requires some development tools. Most should be available from your operating system packages. A script to easily get other specific tools installed is provided.

Required tools

Repository access

The MutekH source code is available from its mercurial repository. You will need mercurial (>=1.5) to fetch the source:

hg clone http://www.mutekh.org/hg/mutekh

MutekH rely on the Subrepository feature of mercurial. Some external projects subrepositories require subversion installed so they are fetched automatically. The hg/.hgsub file contains the external repositories list. If some source files are missing, ensure your mercurial version is not outdated or just perform additional checkouts by hand.

Toolchain

Building MutekH requires the following standard software packages:

Some builds may require the following additional tools, depending on the target architecture and build configuration:

Target simulation tools

You may need real hardware or a simulator to run MutekH (Arch/Emu target doesn't need one though):

  • Qemu to run MutekH, available in most GNU/Linux distributions.
  • Bochs an other x86 emulator, available in most GNU/Linux distributions.
  • SoCLib to experiment with various multiprocessor platforms (Mips, PowerPc, Arm, ...). A precompiled SoCLib platform is available here for test purpose. We suggest building your own platforms by installing SoCLib (see soclib:InstallationNotes).

All this simulators can be used with the GNU debugger.

You may need extra tools to prepare bootable kernel images for some targets:

  • GNU mtools or mkisofs to create a x86 bootable disk images, available in most GNU/Linux distributions.
  • GNU grub or etherboot to boot compiled kernel images, included in boot image in hg/tools/ directory.

The hg/tools/x86_cdrom.sh and hg/tools/x86_floppy.sh scripts are available to easily create boot disk images.

Getting the tools

Some tools are readily available in most GNU/Linux distributions.

Other tools require being build with a specific set of options and customized for a particular target. MutekH comes with a script to build and install these tools on your particular platform.

Precompiled tools

Some precompiled toolchains are avaialble here for convenience and quick start purpose. These binaries are available for GNU/Linux i386 and x86_64 distributions. It was configured for installation in /opt/mutekh.

Building tools from source

The tools/crossgen.mk script is able to download, patch, build and install required specific tools for you.

The following commands display help and default configuration:

 $ cd .../mutekh
 $ tools/crossgen.mk
[display some help]
 $ tools/crossgen.mk config
[display default configuration]

The following example shows how to get a little endian Mips cross-compiler installed under ~/mutekh:

 $ tools/crossgen.mk TARGET=mipsel PREFIX=$HOME/mutekh toolchain

This script can install the following tools for you:

  • GNU Compiler Collection (gcc),
  • GNU Binutils,
  • GNU Debugger (gdb),
  • Device Tree Compiler (dtc),
  • Bochs x86 emulator,
  • Qemu processor emulator,
  • Modified GNU coreutils timeout command (testwrap), used by Testsuite.

Running the tools

When working with MutekH, be sure to add the bin and lib paths to your environment in order to use the tools:

export PATH=/opt/mutekh/bin:$PATH
export LD_LIBRARY_PATH=/opt/mutekh/lib:$LD_LIBRARY_PATH

if installed in /opt/mutekh, or:

export PATH=$HOME/mutekh/bin:$PATH
export LD_LIBRARY_PATH=$HOME/mutekh/lib:$LD_LIBRARY_PATH

if installed in ~/mutekh.

Last modified 8 years ago Last modified on Sep 23, 2011, 4:45:44 PM