mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-28 09:38:53 +00:00
dd9e12601e
Thanks to the change "build: support library builds via lib/<libname>", shared libraries can now be built directly by the build system. Issue #4599
90 lines
1.8 KiB
Tcl
90 lines
1.8 KiB
Tcl
if {[expr ![have_include "power_on/qemu"] && ![have_spec linux]]} {
|
|
puts "Test only supports Qemu or Linux.\n";
|
|
exit 0
|
|
}
|
|
|
|
create_boot_directory
|
|
|
|
build {
|
|
core init timer
|
|
server/vfs_block
|
|
lib/vfs_import
|
|
test/libc_block
|
|
}
|
|
|
|
install_config {
|
|
<config verbose="yes">
|
|
<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"/>
|
|
</parent-provides>
|
|
<default-route>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</default-route>
|
|
<default caps="200"/>
|
|
<start name="timer">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides> <service name="Timer"/> </provides>
|
|
</start>
|
|
<start name="test-libc_block">
|
|
<resource name="RAM" quantum="2M"/>
|
|
<config>
|
|
<libc stdout="/dev/log"/>
|
|
<vfs>
|
|
<dir name="dev">
|
|
<log/>
|
|
<block name="blkdev"/>
|
|
</dir>
|
|
</vfs>
|
|
</config>
|
|
</start>
|
|
<start name="vfs_block">
|
|
<resource name="RAM" quantum="68M"/>
|
|
<provides><service name="Block"/></provides>
|
|
<config>
|
|
<vfs>
|
|
<ram/>
|
|
<import>
|
|
<zero name="test.hda" size="64M"/>
|
|
</import>
|
|
</vfs>
|
|
<default-policy file="/test.hda" block_size="512"
|
|
writeable="yes"/>
|
|
</config>
|
|
</start>
|
|
</config>
|
|
}
|
|
|
|
#
|
|
# Boot modules
|
|
#
|
|
|
|
set disk_image "bin/test.hda"
|
|
set cmd "dd if=/dev/zero of=$disk_image bs=1024 count=65536"
|
|
puts "creating disk image: $cmd"
|
|
catch { exec sh -c $cmd }
|
|
|
|
# generic modules
|
|
build_boot_image {
|
|
core init timer
|
|
ld.lib.so libc.lib.so vfs.lib.so libm.lib.so posix.lib.so
|
|
vfs_block vfs_import.lib.so
|
|
test-libc_block test.hda
|
|
}
|
|
|
|
append qemu_args " -nographic "
|
|
|
|
run_genode_until {.*child "test-libc_block" exited with exit value 0.*} 60
|
|
|
|
exec rm -f $disk_image
|
|
|
|
puts "\nTest succeeded\n"
|
|
|
|
# vi: set ft=tcl :
|