mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
4b46abf813
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
87 lines
1.7 KiB
Plaintext
87 lines
1.7 KiB
Plaintext
assert_spec linux
|
|
|
|
#
|
|
# Build
|
|
#
|
|
|
|
build { core init drivers/timer
|
|
server/dynamic_rom
|
|
app/rom_to_file
|
|
server/lx_fs
|
|
}
|
|
|
|
create_boot_directory
|
|
|
|
#
|
|
# Generate config
|
|
#
|
|
|
|
install_config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="LOG"/>
|
|
<service name="RM"/>
|
|
<service name="ROM" />
|
|
<service name="CPU" />
|
|
<service name="PD" />
|
|
</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="test">
|
|
<inline description="update"><test />
|
|
</inline>
|
|
<sleep milliseconds="1000" />
|
|
<inline description="finished"/>
|
|
</rom>
|
|
</config>
|
|
</start>
|
|
<start name="lx_fs" ld="no">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<provides> <service name="File_system" /> </provides>
|
|
<config>
|
|
<policy label_prefix="rom_to_file" root="/fs_test" writeable="yes" />
|
|
</config>
|
|
</start>
|
|
<start name="rom_to_file">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<config rom="test" />
|
|
<route>
|
|
<service name="ROM" label="test"> <child name="dynamic_rom"/> </service>
|
|
<service name="File_system"> <child name="lx_fs"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
</config>}
|
|
|
|
#
|
|
# Boot image
|
|
#
|
|
|
|
exec mkdir -p bin/fs_test
|
|
|
|
build_boot_image { core ld.lib.so init timer
|
|
dynamic_rom
|
|
rom_to_file
|
|
lx_fs
|
|
fs_test
|
|
}
|
|
|
|
append qemu_args " -nographic "
|
|
|
|
run_genode_until "finished" 10
|
|
|
|
set output [exec cat bin/fs_test/test]
|
|
|
|
compare_output_to {<test />}
|
|
|
|
exec rm -r bin/fs_test
|