Skip to content

Quick Run and Build Tools

Pierre Olivier edited this page Feb 23, 2019 · 3 revisions

Quick run script

In tools/ we provide the /hermitux-run script that can be used to quickly run a binary under HermiTux. First you need to edit the first variable of this script, HERMITUX_BASE, to point to the bas install path of HermiTux. Once this is done, simply use the script as follows:

hermitux-run <path/to/your/binary>

Template Makefile

This Makefile is used for development and testing of C applications with HermiTux. It is in tools/Makefile.template (link). Edit the first variable of the file to point to HermiTux's base install path then copy or symlink this file as a regular Makefile. It should work for most simple C applications.

Interesting variables you can edit:

  • VERBOSE: enable kernel logging
  • PROF: enable the profiler
  • ARGS: command line arguments to pass to the applications
  • MEM: memory for the VM, standard formatting such as 1G or 128M
  • MINIFS: enable minifs
  • HOSTLOAD: a file containing a list of files to load from the host to the minifs filesystem if it is active, example.
  • DEBUG: enable the debugger
  • NETIF, IP and GATEWAY: these parameters correspond respectively to the HERMIT_NETIF, HERMIT_IP and HERMIT_GATEWAY environment variables, please see networking.

Interesting targets:

  • all: build the static binary
  • prog-dyn: build the dynamically compiled binary
  • test: executes the static binary under HermiTux
  • test-dyn: executes the dynamically compiled binary under HermiTux
  • objdump: disassemble the static binary for debugging
  • objdump-dyn: disassemble the dynamically-compiled binary for debugging
  • objdump-kernel: disassemble the kernel binary for debugging