2015-01-14 11:18:16 +00:00
|
|
|
if {[have_spec arm]} {
|
|
|
|
assert_spec arm_v7
|
|
|
|
}
|
|
|
|
|
2013-12-05 14:45:14 +00:00
|
|
|
#
|
|
|
|
# Check used commands
|
|
|
|
#
|
2018-06-19 17:55:04 +00:00
|
|
|
set mke2fs [installed_command mke2fs]
|
|
|
|
set dd [installed_command dd]
|
2013-12-05 14:45:14 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
set build_components {
|
2019-01-03 17:01:49 +00:00
|
|
|
core init timer
|
2019-01-06 20:17:07 +00:00
|
|
|
server/ram_block
|
2019-10-07 14:12:41 +00:00
|
|
|
server/vfs
|
|
|
|
lib/vfs/rump
|
2014-04-14 09:57:22 +00:00
|
|
|
test/libc_vfs
|
2013-12-05 14:45:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build $build_components
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build EXT2-file-system image
|
|
|
|
#
|
|
|
|
catch { exec $dd if=/dev/zero of=bin/ext2.raw bs=1M count=16 }
|
|
|
|
catch { exec $mke2fs -F bin/ext2.raw }
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate config
|
|
|
|
#
|
|
|
|
append 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"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</default-route>
|
2017-05-07 20:36:11 +00:00
|
|
|
<default caps="100"/>
|
2013-12-05 14:45:14 +00:00
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
</start>
|
2019-01-06 20:17:07 +00:00
|
|
|
<start name="ram_block">
|
2013-12-05 14:45:14 +00:00
|
|
|
<resource name="RAM" quantum="20M"/>
|
|
|
|
<provides><service name="Block"/></provides>
|
|
|
|
<config file="ext2.raw" block_size="512"/>
|
|
|
|
</start>
|
2019-10-07 14:12:41 +00:00
|
|
|
<start name="vfs" caps="200">
|
2018-04-20 08:54:45 +00:00
|
|
|
<resource name="RAM" quantum="16M" />
|
2013-12-05 14:45:14 +00:00
|
|
|
<provides><service name="File_system"/></provides>
|
2019-10-07 14:12:41 +00:00
|
|
|
<config>
|
|
|
|
<vfs> <rump fs="ext2fs" ram="10M"/> </vfs>
|
|
|
|
<policy label_prefix="test-libc_vfs" root="/" writeable="yes"/>
|
|
|
|
</config>
|
2013-12-05 14:45:14 +00:00
|
|
|
</start>
|
2014-04-14 09:57:22 +00:00
|
|
|
<start name="test-libc_vfs">
|
2013-12-05 14:45:14 +00:00
|
|
|
<resource name="RAM" quantum="4M"/>
|
2014-04-14 09:57:22 +00:00
|
|
|
<config>
|
2017-03-23 16:59:25 +00:00
|
|
|
<vfs>
|
|
|
|
<dir name="dev"> <log/> </dir>
|
|
|
|
<fs/>
|
|
|
|
</vfs>
|
|
|
|
<libc stdout="/dev/log"/>
|
2014-04-14 09:57:22 +00:00
|
|
|
</config>
|
2013-12-05 14:45:14 +00:00
|
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
|
|
|
# generic modules
|
|
|
|
set boot_modules {
|
2019-01-06 20:17:07 +00:00
|
|
|
core ld.lib.so init timer test-libc_vfs ram_block
|
2019-10-07 14:12:41 +00:00
|
|
|
rump.lib.so rump_fs.lib.so vfs vfs_rump.lib.so
|
2018-04-23 08:49:21 +00:00
|
|
|
ext2.raw libc.lib.so vfs.lib.so
|
2013-12-05 14:45:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
|
2017-05-23 13:05:55 +00:00
|
|
|
append qemu_args " -nographic"
|
2013-12-05 14:45:14 +00:00
|
|
|
|
2014-08-22 12:43:54 +00:00
|
|
|
run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60
|
2013-12-05 14:45:14 +00:00
|
|
|
|
|
|
|
exec rm -f bin/ext2.raw
|