genode/repos/gems/run/nano3d.run
Norman Feske 02d5efcf3f init: apply routing to environment sessions
The init component used to create the CPU/RAM/PD/ROM sessions (the child
environment) for its children by issuing session requests to its parent,
which is typically core. This policy was hard-wired. This patch enables
the routing of the environment sessions of the children of init
according to the configured routing policy.

Because there is no hard-wired policy regarding the environment sessions
anymore, routes to respective services must be explicitly declared in
the init configuration. For this reason, the patch adjusts several run
scripts in this respect.

This patch removes the outdated '<if-args>' special handling of session
labels. The '<if-args>' feature will eventually be removed completely
(ref #2250)

Issue #2197
Issue #2215
Issue #2233
Issue #2250
2017-01-31 12:01:11 +01:00

144 lines
3.1 KiB
Plaintext

#
# Build
#
if {![have_spec linux]} {
puts "Runs on Linux only"
exit 0
}
set build_components {
core init
drivers/timer
server/nitpicker server/dynamic_rom app/nano3d
drivers/framebuffer
app/backdrop
}
build $build_components
create_boot_directory
#
# Generate config
#
append config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<start name="fb_sdl">
<resource name="RAM" quantum="4M"/>
<provides>
<service name="Input"/>
<service name="Framebuffer"/>
</provides>
</start>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="nitpicker">
<resource name="RAM" quantum="1M"/>
<provides><service name="Nitpicker"/></provides>
<config>
<domain name="default" layer="2" content="client" label="no"/>
<domain name="nano3d" layer="1" content="client" label="no" origin="pointer"/>
<policy label_prefix="nano3d" domain="nano3d"/>
<default-policy domain="default"/>
</config>
</start>
<start name="backdrop">
<resource name="RAM" quantum="4M"/>
<config>
<libc>
<vfs>
<rom name="genode_logo.png"/>
<rom name="grid.png"/>
</vfs>
</libc>
<fill color="#122334" />
<image png="grid.png" tiled="yes" alpha="200" />
<image png="genode_logo.png" anchor="bottom_right" alpha="150"/>
</config>
</start>
<start name="dynamic_rom">
<resource name="RAM" quantum="4M"/>
<provides><service name="ROM"/></provides>
<config verbose="yes">
<rom name="nano3d.config">
<inline description="initial state">
<config painter="textures"/>
</inline>
<sleep milliseconds="1000" />
<inline description="RGBA shading">
<config painter="shaded"/>
</inline>
<sleep milliseconds="1000" />
<inline description="switch to cube">
<config painter="shaded" shape="cube" />
</inline>
<sleep milliseconds="1000" />
<inline description="texturing">
<config painter="textured" shape="cube" />
</inline>
<sleep milliseconds="1000" />
</rom>
</config>
</start>
<start name="nano3d">
<resource name="RAM" quantum="8M"/>
<configfile name="nano3d.config"/>
<route>
<service name="ROM" label="nano3d.config">
<child name="dynamic_rom" /> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
</config>}
install_config $config
# copy backdrop PNG images to bin directory
foreach file { genode_logo.png grid.png } {
file copy -force [genode_dir]/repos/gems/src/app/backdrop/$file bin/ }
#
# Boot modules
#
# generic modules
set boot_modules {
core ld.lib.so init
timer
nitpicker dynamic_rom nano3d
backdrop
libpng.lib.so libc.lib.so libm.lib.so zlib.lib.so
genode_logo.png grid.png
}
# platform-specific modules
lappend_if [have_spec linux] boot_modules fb_sdl
build_boot_image $boot_modules
run_genode_until forever