genode/tool
Josef Söntgen aaf0454956 tool: wrapper script for rumpkernel tools
The rumpkernel based tools are intended to be used by executing
'tool/rump'. Since it covers the most common use cases for these
tools, this script is comparatively extensive, hence giving a short
tutorial seems reasonable:

* Format a disk image with Ext2:

To format a disk image with the Ext2 file system, first prepare the
actual image by executing dd:

! dd if=/dev/zero of=/path/to/disk_image bs=1M count=128

Second, use 'tool/rump' to format the disk image:

! rump -f -F ext2fs /path/to/disk_image

Afterwards the just created file system may be populated with the
content of another directory by executing

! rump -F ext2fs -p /path/to/another_dir /path/to/disk_image

The content of the file system image can be listed by executing

! rump -F ext2fs -l /path/to/disk_image

* Create a encrypted disk image:

Creating a cryptographic disk image based on cgd(4) is done by
executing the following command:
! rump -c /path/to/disk_image

This will generate a key that may be used to decrypt the image
later on. Since this command will _only_ generate a key and NOT
initialize the disk image, it is highly advised to prepare the disk
image by using '/dev/urandom' instead of '/dev/zero' (only new blocks
that will be written to the disk image are encrypted). In addition
while generating the key a temporary configuration file will be
created. Although this file has proper permissions, it may leak the
generated key if it is created on persistent storage. To specify a more
secure directory the '-t' option should be used:

! rump -c -t /path/to/secure/directory /path/to/disk_image

Decrypting the disk image requires the key generated in the previous
step:

! rump -c -k <key> /path/to/disk_image

For now this key has to specified as command line argument. This is
an issue if the shell, which is used, is maintaing a history of
executed commands.

For completness sake let us put all examples together by creating a
encrypted Ext2 image that will contain all files of Genode's _demo_
scenario:

! dd if=/dev/urandom of=/tmp/demo.img bs=1M count=16
! $(GENODE_DIR)/tool/rump -c -t /ramfs -F ext2fs /tmp/demo.img > \
!         /ramfs/key # key is printed out to stdout
! $(GENODE_DIR)/tool/rump -c -t /ramfs -F ext2fs -k <key> \
!         -p $(BUILD_DIR)/var/run/demo /tmp/demo.img

To check if the image was populated succesfully, execute the
following:

! $(GENODE_DIR)/tool/rump -c -t /ramfs -F ext2fs -k <key> -l \
!         /tmp/demo.img
2014-05-27 11:14:45 +02:00
..
boot Add pointers to sources of used boot loaders 2012-11-27 10:40:53 +01:00
builddir Build-system support for ported 3rd-party code 2014-05-27 11:14:42 +02:00
patches tool_chain: fix GCC build with makeinfo 5 2014-05-14 16:08:01 +02:00
ports Tool for preparing a single 3rd-party port 2014-05-27 11:14:42 +02:00
autopilot autopilot: create only missing builddirs on --keep 2013-11-28 08:22:24 +01:00
autopilot.list libc: don't take alien thread for main pthread 2014-05-07 10:37:37 +02:00
beautify Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
create_builddir Build-system support for ported 3rd-party code 2014-05-27 11:14:42 +02:00
create_iso run: instruct 'exec' to ignore stderr output 2014-01-27 18:53:52 +01:00
cxx_to_html Tool cxx_to_html to convert C++ source to HTML 2012-01-08 14:09:47 +01:00
download_hashver Hash verification tool 2013-06-10 10:44:09 +02:00
download_sigver GPG signature verification tool 2013-06-10 10:44:09 +02:00
fix_include_ifndef tool/fix_include_ifndef: consider license header 2014-01-27 18:54:05 +01:00
libgcc_libc_stub.h Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
parse_cxx Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
prepare.mk Temporarily disable hash checks 2014-05-27 11:14:44 +02:00
README Unify 'make prepare' between libports and ports 2014-05-14 16:08:00 +02:00
rump tool: wrapper script for rumpkernel tools 2014-05-27 11:14:45 +02:00
rump_cgdconf tool: wrapper script for rumpkernel tools 2014-05-27 11:14:45 +02:00
run tool: increase amt reset timeout 2014-04-14 12:32:31 +02:00
tool_chain tool_chain: fix GDB build with makeinfo 5 2014-05-14 16:08:01 +02:00
tool_chain_gcc_patches.inc tool_chain: use real patches 2014-05-14 16:08:00 +02:00
tool_chain_gdb_patches.inc tool_chain: use real patches 2014-05-14 16:08:00 +02:00
tool_chain_rump tool: makefile for building rumpkernel tools 2014-05-27 11:14:45 +02:00

This directory contains tools for managing and using the source code
of Genode.

:'create_builddir'

  The 'create_builddir' tool provides a convenient way to create build
  directories for different platforms. Its usage information is printed when
  starting the tool without arguments.

:'builddir/':

  This directory contains a Makefile template and configuration snippets used
  by the 'create_builddir' tool.

:'tool_chain':

  This tool downloads, builds, and installs the tool chain needed to build the
  Genode OS Framework. For getting usage information, start the tool without
  arguments.

:'create_iso':

  This simple tool helps to build bootable ISO images from your build of
  Genode. For getting usage information, start the tool without arguments.

:'beautify':

  Beautify is a coding-style checking tool that analyzes source code for its
  adherence to Genode's coding style as described in 'doc/coding_style.txt'.
  Whenever possible, the tool tries to fix the issues and outputs a corrected
  file.  Some corrections, however, require human interaction.  In this case,
  the tool stops the analysis with an error.

:'parse_cxx':

  This tool is a C++ parser used as front-end for Beautify.

:'cxx_to_html':

  This tool converts a C++ source file to a HTML view to be used for the API
  documentation at the genode.org website. It relies on 'parse_cxx' to do the
  actual C++ parsing.

:'fix_include_ifndef':

  This tool helps with assigning consistent include guards to header files.

:'boot':

  This directory contains boot-loader files needed to create boot images.

:'autopilot':

  Autopilot is a tool for the automatic execution of run scripts among multiple
  base platforms.

:'prepare.mk':

  Tool for downloading and integrating 3rd-party source codes with Genode.
  This file is included by the makefiles in the root of source-code
  repositories that interface with 3rd-party code, e.g., libports and ports.