| 1 | = Building examples applications = |
| 2 | |
| 3 | MutekH comes with some examples applications available in [source:trunk/mutekh/examples]. |
| 4 | This page briefly explains how to build these examples. |
| 5 | |
| 6 | == Required tools == |
| 7 | |
| 8 | Building MutekH requires the following software packages: |
| 9 | |
| 10 | - A GNU compiler or cross-compiler. You can use the [source:trunk/mutekh/tools/crossgen.mk] script to compile and install a tool chain easily. |
| 11 | - GNU make and a perl interpreter available in most GNU/Linux and BSD operating system. |
| 12 | |
| 13 | Some builds may require the following additional tools |
| 14 | |
| 15 | - The [FlattenedDeviceTree flattened device tree] compiler (dtc): http://git.jdl.com/gitweb/ |
| 16 | - The heterogeneous linker found in [source:trunk/mutekh/tools/hlink] |
| 17 | |
| 18 | You may need real hardware or a simulator to run MutekH: |
| 19 | |
| 20 | - [http://www.qemu.org/ Qemu] to run native x86 binaries |
| 21 | - [https://www.soclib.fr/ SoCLib] to experiment with various multiprocessor platforms |
| 22 | |
| 23 | You may need extra tools to deals with kernel images for some targets: |
| 24 | |
| 25 | - GNU mtools or mkisofs to create a x86 bootable disk images. |
| 26 | - GNU grub or etherboot to boot a compiled kernel images. |
| 27 | |
| 28 | The [source:trunk/mutekh/tools/x86_cdrom.sh] and [source:trunk/mutekh/tools/x86_floppy.sh] scripts are available to easily create boot disk images. |
| 29 | |
| 30 | == Building examples == |
| 31 | |
| 32 | Each example comes with its own config file which is used to configure |
| 33 | the MutekH kernel build. This file contains application specific |
| 34 | configuration to enable kernel features. |
| 35 | |
| 36 | Some other configuration options are related to target |
| 37 | architecture. Some ready to use configuration sets for specific |
| 38 | targets are factored in the [source:trunk/mutekh/common] directory. These configuration |
| 39 | files are organized in sections that can be enabled from the build |
| 40 | command line. Look at the chosen example config file to determine if |
| 41 | it contains custom standalone configuration or if it relies on common |
| 42 | configuration sets by including files from [source:trunk/mutekh/common]. |
| 43 | |
| 44 | Please read the BuildSystem page for in depth description of the build system. |
| 45 | |
| 46 | === Using standalone and specific configuration file === |
| 47 | |
| 48 | Here is a make invocation for the hello example using a custom and |
| 49 | standalone config file which targets x86 Linux process (see QuickStartUnix): |
| 50 | |
| 51 | {{{ |
| 52 | $ make CONF=examples/hello/config_emu |
| 53 | }}} |
| 54 | |
| 55 | === Relying on common configuration files === |
| 56 | |
| 57 | Here are make invocations for various target architectures to build |
| 58 | examples which are using common configuration files: |
| 59 | |
| 60 | |
| 61 | - As unix process (see QuickStartUnix), on x86_64 machine running Linux: |
| 62 | {{{ |
| 63 | $ make CONF=examples/hello/config BUILD=emu-linux-x86_64 |
| 64 | }}} |
| 65 | |
| 66 | - Pc, x86 machine boot image |
| 67 | {{{ |
| 68 | $ make CONF=examples/hello/config BUILD=ibmpc-x86 |
| 69 | }}} |
| 70 | |
| 71 | - For SoCLib simulator (see [wiki:Arch/Soclib/Tutorial MutekH/SoCLib tutorial]), Mips32 Little endian, for caba-vgmn-mutekh_soclib_tutorial or caba-vgmn-mutekh_kernel_tutorial platforms: |
| 72 | {{{ |
| 73 | $ make CONF=examples/hello/config BUILD=soclib-mips32el:pf-tutorial |
| 74 | }}} |
| 75 | |
| 76 | - Heterogeneous builds for SoCLib simulator, Mips32 and Arm processors for caba-vgmn-mutekh_kernel_tutorial platform: |
| 77 | {{{ |
| 78 | $ make kernel-het CONF=examples/hello_het/config BUILD=pf-het EACH=soclib-mips32el:soclib-arm |
| 79 | }}} |