02d5efcf3f
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
139 lines
3.2 KiB
Plaintext
139 lines
3.2 KiB
Plaintext
#
|
|
# Build
|
|
#
|
|
|
|
set build_components {
|
|
core init drivers/timer
|
|
server/dynamic_rom server/rom_filter app/rom_logger
|
|
}
|
|
|
|
build $build_components
|
|
|
|
create_boot_directory
|
|
|
|
#
|
|
# Generate config
|
|
#
|
|
|
|
append config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="ROM"/>
|
|
<service name="RAM"/>
|
|
<service name="PD"/>
|
|
<service name="LOG"/>
|
|
<service name="CPU"/>
|
|
<service name="IRQ"/>
|
|
<service name="IO_MEM"/>
|
|
<service name="IO_PORT"/>
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</default-route>
|
|
|
|
<start name="timer">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides><service name="Timer"/></provides>
|
|
</start>
|
|
|
|
<start name="dynamic_rom">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<provides><service name="ROM"/></provides>
|
|
<config verbose="yes">
|
|
<rom name="xray">
|
|
<sleep milliseconds="1000" />
|
|
<inline description="disable X-ray mode">
|
|
<xray enabled="no"/>
|
|
</inline>
|
|
<sleep milliseconds="1000" />
|
|
<inline description="enable X-ray mode">
|
|
<xray enabled="yes"/>
|
|
</inline>
|
|
<sleep milliseconds="1000" />
|
|
<inline description="leave X-ray mode undefined">
|
|
<xray/> <!-- undefined -->
|
|
</inline>
|
|
<sleep milliseconds="1000" />
|
|
<inline description="finished"/>
|
|
</rom>
|
|
</config>
|
|
</start>
|
|
|
|
<start name="rom_filter">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<provides><service name="ROM"/></provides>
|
|
<config verbose="no">
|
|
|
|
<input name="xray_enabled" rom="xray" node="xray">
|
|
<attribute name="enabled" />
|
|
</input>
|
|
|
|
<output node="config">
|
|
<if>
|
|
<has_value input="xray_enabled" value="no" />
|
|
<then>
|
|
<inline><!-- .. flat window decorations ... --></inline>
|
|
</then>
|
|
<else>
|
|
<if>
|
|
<has_value input="xray_enabled" value="yes" />
|
|
<then>
|
|
<inline><!-- ... colored window decorations ... --></inline>
|
|
</then>
|
|
<else>
|
|
<inline><!-- ... fallback ... --></inline>
|
|
</else>
|
|
</if>
|
|
</else>
|
|
</if>
|
|
</output>
|
|
|
|
</config>
|
|
<route>
|
|
<service name="ROM" label="xray"> <child name="dynamic_rom"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="rom_logger">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<config rom="generated" />
|
|
<route>
|
|
<service name="ROM" label="generated"> <child name="rom_filter"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
</config>}
|
|
|
|
install_config $config
|
|
|
|
#
|
|
# Boot modules
|
|
#
|
|
|
|
set boot_modules { core ld.lib.so init timer dynamic_rom rom_filter rom_logger }
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
append qemu_args " -nographic "
|
|
|
|
run_genode_until {.*finished.*\n} 20
|
|
|
|
# pay only attention to the output of the rom_logger
|
|
grep_output {^\[init -> rom_logger\] .+}
|
|
unify_output {\[init \-\> rom_logger\] upgrading quota donation for .* \([0-9]+ bytes\)} ""
|
|
trim_lines
|
|
|
|
compare_output_to {
|
|
[init -> rom_logger] ROM 'generated':
|
|
[init -> rom_logger] <config><!-- ... fallback ... --></config>
|
|
[init -> rom_logger] ROM 'generated':
|
|
[init -> rom_logger] <config><!-- .. flat window decorations ... --></config>
|
|
[init -> rom_logger] ROM 'generated':
|
|
[init -> rom_logger] <config><!-- ... colored window decorations ... --></config>
|
|
[init -> rom_logger] ROM 'generated':
|
|
[init -> rom_logger] <config><!-- ... fallback ... --></config>
|
|
}
|
|
|