mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-04 10:10:59 +00:00
9bceec4394
This patch adjusts the run script in two ways: It removes the reliance on init's formerly built-in resource-request handling by increasing the RAM quota for the backdrop instances. Since commit "init: explicit response to resource requests", init no longer hands out slack memory automatically. Second, it makes sure that the backdrop appears under the precise label "backdrop" at nitpicker by facilitating init's label-rewriting feature. Without explicitly setting the label to "backdrop", nitpicker observes the label "backdrop -> backdrop" (the first part comes from init, the second part comes from the nitpicker-session argument specified by backdrop itself). However, the client is only considered as default background if labeled as "backdrop" (see nitpicker's '_create_session') implementation. Issue #2352
147 lines
3.3 KiB
Plaintext
147 lines
3.3 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="20M"/>
|
|
<config>
|
|
<libc/>
|
|
<vfs>
|
|
<rom name="genode_logo.png"/>
|
|
<rom name="grid.png"/>
|
|
</vfs>
|
|
<fill color="#122334" />
|
|
<image png="grid.png" tiled="yes" alpha="200" />
|
|
<image png="genode_logo.png" anchor="bottom_right" alpha="150"/>
|
|
</config>
|
|
<route>
|
|
<service name="Nitpicker"> <child name="nitpicker" label="backdrop" /> </service>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</route>
|
|
</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
|