| 1 | = Summary = |
| 2 | |
| 3 | Building and running MutekH requires some development tools. |
| 4 | Most should be available from your operating system packages. |
| 5 | A script to easily get other specific tools installed is provided. |
| 6 | |
| 7 | = Required tools = |
| 8 | |
| 9 | == Repository access == |
| 10 | |
| 11 | The MutekH source code is available from its mercurial repository. |
| 12 | You will need [http://mercurial.selenic.com/ mercurial] (>=1.5) to fetch the source: |
| 13 | |
| 14 | {{{ |
| 15 | hg clone http://www.mutekh.org/hg/mutekh |
| 16 | }}} |
| 17 | |
| 18 | MutekH rely on the [http://mercurial.selenic.com/wiki/Subrepository Subrepository] |
| 19 | feature of mercurial. Some external projects subrepositories require [http://subversion.tigris.org/ subversion] |
| 20 | to be installed so they are fetched automatically. |
| 21 | The [source:hg/.hgsub] file contains the external repositories list. |
| 22 | If some source files are missing, ensure your mercurial version is not outdated |
| 23 | or perform additional checkouts by hand. |
| 24 | |
| 25 | == Toolchain == |
| 26 | |
| 27 | Building MutekH requires the following standard software packages: |
| 28 | |
| 29 | - The [http://gcc.gnu.org/ GNU Compiler Collection] (gcc) (>=4.4.2). |
| 30 | - [http://www.gnu.org/software/make/ GNU make] (>=3.81). |
| 31 | - A [http://www.perl.org/ perl] script interpreter (>=5.8). |
| 32 | - A python 2 interpreter. |
| 33 | |
| 34 | Some builds may require the following additional tools, depending on the target architecture and build configuration: |
| 35 | |
| 36 | - The [FlattenedDeviceTree flattened device tree] compiler (dtc): This tool comes with toolchains. |
| 37 | - The heterogeneous linker found in [source:hg/tools/hlink], for heterogeneous platforms only. |
| 38 | |
| 39 | == Target simulation tools == |
| 40 | |
| 41 | You may need real hardware or a simulator to run MutekH (Arch/Emu target doesn't need one though): |
| 42 | |
| 43 | - [http://www.qemu.org/ Qemu] to run MutekH, available in most GNU/Linux distributions. |
| 44 | - [http://bochs.sourceforge.net/ Bochs] an other x86 emulator, available in most GNU/Linux distributions. |
| 45 | - [https://www.soclib.fr/ SoCLib] to experiment with various multiprocessor platforms (Mips, !PowerPc, Arm, ...). A precompiled SoCLib platform is available [https://www.mutekh.org/www/tools/ here] for test purpose. We suggest building your own platforms by installing SoCLib (see soclib:InstallationNotes). |
| 46 | |
| 47 | All this simulators can be with the [http://www.gnu.org/software/gdb/ GNU debugger]. |
| 48 | |
| 49 | You may need extra tools to prepare bootable kernel images for some targets: |
| 50 | |
| 51 | - GNU mtools or mkisofs to create a x86 bootable disk images, available in most GNU/Linux distributions. |
| 52 | - GNU grub or etherboot to boot compiled kernel images, included in boot image in [source:hg/tools/] directory. |
| 53 | |
| 54 | The [source:hg/tools/x86_cdrom.sh] and [source:hg/tools/x86_floppy.sh] scripts are available to easily create boot disk images. |
| 55 | |
| 56 | = Getting the tools = |
| 57 | |
| 58 | Some tools are readily available in most GNU/Linux distributions. |
| 59 | |
| 60 | Other tools require being build with a specific set of options and customized for a particular target. |
| 61 | MutekH comes with a script to build and install these tools for you. |
| 62 | |
| 63 | == Building tools from source == |
| 64 | |
| 65 | The [source:hg/tools/crossgen.mk tools/crossgen.mk] script |
| 66 | is able to download, patch, build and install required specific tools for you. |
| 67 | |
| 68 | The following commands display help and default configuration: |
| 69 | {{{ |
| 70 | $ cd .../mutekh |
| 71 | $ tools/crossgen.mk |
| 72 | [display some help] |
| 73 | $ tools/crossgen.mk config |
| 74 | [display default configuration] |
| 75 | }}} |
| 76 | |
| 77 | The following example shows how to get a little endian Mips cross-compiler installed under `~/mutekh`: |
| 78 | {{{ |
| 79 | $ tools/crossgen.mk TARGET=mipsel PREFIX=$HOME/mutekh toolchain |
| 80 | }}} |
| 81 | |
| 82 | This script can install the following tools for you: |
| 83 | - GNU Compiler Collection ({{{gcc}}}), |
| 84 | - GNU Binutils, |
| 85 | - GNU Debugger ({{{gdb}}}), |
| 86 | - Device Tree Compiler ({{{dtc}}}), |
| 87 | - Bochs x86 emulator, |
| 88 | - Qemu processor emulator, |
| 89 | - Modified GNU coreutils timeout command, used for testsuite ({{{testwrap}}}) |
| 90 | |
| 91 | == Precompiled tools binaries == |
| 92 | |
| 93 | Some precompiled toolchains are avaialble [https://www.mutekh.org/www/tools/ here] as static i386 Linux binaries for convenience and quick start purpose. |
| 94 | It should work on any GNU/Linux i386 and x86_64 distributions. It was configured for installation in {{{/opt/mutekh}}}. |
| 95 | |
| 96 | We still recommend building your own up to date tools from source if you plan to work with MutekH. |