genode/repos/os/run/lx_block.run
Norman Feske 4b46abf813 base: rm first-class support for static binaries
This patch removes the detection of statically linked executables from
the base framework. It thereby fixes the corner cases encountered with
Sculpt when obtaining the binaries of the runtime from the depot_rom
service that is hosted within the runtime.

Statically linked binaries and hybrid Linux/Genode (lx_hybrid) binaries
can still be started by relabeling the ROM-session route of "ld.lib.so"
to the binary name, pretending that the binary is the dynamic linker.
This can be achieved via init's label rewriting mechanism:

  <route>
    <service name="ROM" unscoped_label="ld.lib.so">
      <parent label="test-platform"/> </service>
  </route>

However, as this is quite cryptic and would need to be applied for all
lx_hybrid components, the patch adds a shortcut to init's configuration.
One can simply add the 'ld="no"' attribute to the <start> node of the
corresponding component:

  <start name="test-platform" ld="no"/>

Fixes #2866
2018-08-02 14:36:38 +02:00

60 lines
1.2 KiB
Plaintext

#
# Test runs only on Linux
#
assert_spec linux
#
# Build
#
build { core init drivers/timer server/lx_block test/blk/bench }
create_boot_directory
#
# Generate config
#
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="TRACE"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="lx_block" ld="no">
<resource name="RAM" quantum="2M"/>
<provides> <service name="Block"/> </provides>
<config file="lx_block.img" block_size="4K" writeable="yes"/>
</start>
<start name="test-blk-bench">
<resource name="RAM" quantum="24M"/>
</start>
</config>}
#
# Create test file
#
catch { exec dd if=/dev/zero of=bin/lx_block.img bs=1M count=64 }
#
# Boot modules
#
build_boot_image { core ld.lib.so init timer lx_block lx_block.img test-blk-bench }
run_genode_until "Done.*\n" 100
exec rm -f bin/lx_block.img