
                                    Runtime


                               Johannes Schlatow


A _runtime_ file defines the runtime scenario. The file resides at a
_pkg/_ subdirectory and specifies the required/provided services,
the required ROM modules and the configuration of a Genode component.


DESCRIPTION
###########

The _runtime_ file contains HID data with a _runtime_ node at top level. The
top-level node has the following mandatory attributes:

:ram: The amount of RAM granted to the component. The attribute's value must be
  a number with a suffix that denotes the unit ('K' for Kilobytes, 'M' for
  Megabytes, 'G' for Gigabytes).

:caps: The number of capabilities granted to the component.

:binary: The name of the binary.

Additionally, the top-level node may have the following optional attributes:

:config: The name of a ROM module containing the component's configuration.

The _runtime_ node may further contain the following sub nodes:

:requires: A list of the required services. Each required service is a
  dedicated sub node. The type of the sub node is the lowercased name of the
  session interface, e.g. _gui_ for a Gui session. The only exception is
  the File_system session, for which the abbreviated node type _fs_ is used.
  Note that CPU, PD, LOG and RM are always granted and thus
  do not need to be mentioned here.

:provides: A list of services provided by the component.

:config: Contains the component's configuration. This is evaluated unless the
  top-level node has a _config_ attribute.

:content: A list of required ROM modules. Each ROM module is specified by a
  '+ rom ...' sub node whose name attribute determines the ROM label.


EXAMPLES
########

You can find a minimalistic example at
_examples/hello_make/pkg/runtime_. The scenario merely consists
of a single component with an empty configuration and no required services:

! runtime | ram: 1M | caps: 1000 | binary: hello
! + config
! + content
!   + rom hello
! -

A more advanced scenario resides at
_examples/multiple_hello_make/pkg/runtime_. It uses the init
binary to create a subsystem comprising multiple components:

! runtime | ram: 10M | caps: 1000 | binary: init
! + content
!   + rom init
!   + rom hello
! + config
!   + parent-provides
!   | + service ROM
!   | + service LOG
!   | + service CPU
!   | + service PD
!   + default-route
!   | + any-service
!   |   + parent
!   + start one | caps: 100 | ram: 1M
!   | + binary hello
!   | + config
!   + start two | caps: 100 | ram: 1M
!     + binary hello
!     + config
! -


SEE ALSO
########

add-depot-user, api, artifacts, build-systems, config, import, index, overview, targets

