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 mkisofs [installed_command mkisofs]
|
2013-12-05 14:45:14 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
set build_components {
|
2019-01-03 17:01:49 +00:00
|
|
|
core init timer
|
2013-12-05 14:45:14 +00:00
|
|
|
server/fs_rom
|
2019-01-06 20:17:07 +00:00
|
|
|
server/rom_block
|
2013-12-05 14:45:14 +00:00
|
|
|
server/rump_fs
|
|
|
|
test/iso
|
|
|
|
}
|
|
|
|
|
|
|
|
build $build_components
|
|
|
|
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-07-26 06:41:46 +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="rom_block">
|
2013-12-05 14:45:14 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<provides><service name="Block"/></provides>
|
|
|
|
<config file="fs.iso" block_size="2048"/>
|
|
|
|
</start>
|
2017-07-26 06:41:46 +00:00
|
|
|
<start name="rump_fs" caps="200">
|
2018-06-19 17:55:04 +00:00
|
|
|
<resource name="RAM" quantum="10M" />
|
2013-12-05 14:45:14 +00:00
|
|
|
<provides><service name="File_system"/></provides>
|
2016-11-24 14:28:32 +00:00
|
|
|
<config fs="cd9660"><policy label_prefix="fs_rom" root="/" writeable="no"/></config>
|
2013-12-05 14:45:14 +00:00
|
|
|
</start>
|
|
|
|
<start name="fs_rom">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<provides><service name="ROM"/></provides>
|
|
|
|
</start>
|
|
|
|
<start name="test-iso">
|
|
|
|
<resource name="RAM" quantum="1M" />
|
2017-07-26 06:41:46 +00:00
|
|
|
<config/>
|
2013-12-05 14:45:14 +00:00
|
|
|
<route>
|
2017-07-26 06:41:46 +00:00
|
|
|
<service name="ROM" label_prefix=""><child name="fs_rom"/></service>
|
2013-12-05 14:45:14 +00:00
|
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create iso
|
|
|
|
#
|
2014-05-07 09:48:19 +00:00
|
|
|
exec cp -f [genode_dir]/repos/os/src/test/iso/test.txt [run_dir]
|
2013-12-05 14:45:14 +00:00
|
|
|
|
|
|
|
for { set i 1 } { $i <= 30 } { incr i } {
|
|
|
|
exec touch [run_dir]/$i.txt
|
|
|
|
}
|
|
|
|
|
|
|
|
exec rm -f bin/fs.iso
|
|
|
|
catch { exec $mkisofs -l -R -hide-rr-moved -jcharset utf-8 -o bin/fs.iso [run_dir]}
|
|
|
|
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
set boot_modules {
|
2019-01-06 20:17:07 +00:00
|
|
|
core ld.lib.so init timer test-iso rom_block
|
2013-12-05 14:45:14 +00:00
|
|
|
rump.lib.so rump_fs.lib.so rump_fs
|
2016-12-01 18:00:11 +00:00
|
|
|
fs.iso fs_rom
|
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
|
|
|
|
base: avoid use of deprecated base/printf.h
Besides adapting the components to the use of base/log.h, the patch
cleans up a few base headers, i.e., it removes unused includes from
root/component.h, specifically base/heap.h and
ram_session/ram_session.h. Hence, components that relied on the implicit
inclusion of those headers have to manually include those headers now.
While adjusting the log messages, I repeatedly stumbled over the problem
that printing char * arguments is ambiguous. It is unclear whether to
print the argument as pointer or null-terminated string. To overcome
this problem, the patch introduces a new type 'Cstring' that allows the
caller to express that the argument should be handled as null-terminated
string. As a nice side effect, with this type in place, the optional len
argument of the 'String' class could be removed. Instead of supplying a
pair of (char const *, size_t), the constructor accepts a 'Cstring'.
This, in turn, clears the way let the 'String' constructor use the new
output mechanism to assemble a string from multiple arguments (and
thereby getting rid of snprintf within Genode in the near future).
To enforce the explicit resolution of the char * ambiguity, the 'char *'
overload of the 'print' function is marked as deleted.
Issue #1987
2016-07-13 17:07:09 +00:00
|
|
|
run_genode_until {child .* exited with exit value 0.*\n} 60
|
2013-12-05 14:45:14 +00:00
|
|
|
|
|
|
|
# pay only attention to the output of init and its children
|
|
|
|
grep_output {^\[init -> test-iso}
|
|
|
|
|
|
|
|
unify_output {at [a-f0-9]+} "at <unified>"
|
|
|
|
|
2014-04-04 13:22:52 +00:00
|
|
|
if {[have_spec 32bit]} {
|
2013-12-05 14:45:14 +00:00
|
|
|
compare_output_to {
|
|
|
|
[init -> test-iso] File size is 31000 at <unified>
|
|
|
|
[init -> test-iso] 00001000: 61616161 61616161 61616161 61616161 61616161
|
|
|
|
[init -> test-iso] 00001014: 61616161 61616161 61616161 61616161 61616161
|
|
|
|
[init -> test-iso] 00001028: 61616161 61616161 61616161 61616161 61616161
|
|
|
|
[init -> test-iso] 0000103c: 61616161 61616161 61616161 61616161 61616161
|
|
|
|
[init -> test-iso]
|
|
|
|
[init -> test-iso] 00010000: 62626262 62626262 62626262 62626262 62626262
|
|
|
|
[init -> test-iso] 00010014: 62626262 62626262 62626262 62626262 62626262
|
|
|
|
[init -> test-iso] 00010028: 62626262 62626262 62626262 62626262 62626262
|
|
|
|
[init -> test-iso] 0001003c: 62626262 62626262 62626262 62626262 62626262
|
|
|
|
[init -> test-iso]
|
|
|
|
[init -> test-iso] 00020000: 63636363 63636363 63636363 63636363 63636363
|
|
|
|
[init -> test-iso] 00020014: 63636363 63636363 63636363 63636363 63636363
|
|
|
|
[init -> test-iso] 00020028: 63636363 63636363 63636363 63636363 63636363
|
|
|
|
[init -> test-iso] 0002003c: 63636363 63636363 63636363 63636363 63636363
|
|
|
|
[init -> test-iso]
|
|
|
|
}
|
2014-04-04 13:22:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if {[have_spec 64bit]} {
|
|
|
|
compare_output_to {
|
|
|
|
[init -> test-iso] File size is 31000 at <unified>
|
|
|
|
[init -> test-iso] 00001000: 6161616161616161 6161616161616161 6161616161616161 6161616161616161 6161616161616161
|
|
|
|
[init -> test-iso] 00001028: 6161616161616161 6161616161616161 6161616161616161 6161616161616161 6161616161616161
|
|
|
|
[init -> test-iso] 00001050: 6161616161616161 6161616161616161 6161616161616161 6161616161616161 6161616161616161
|
|
|
|
[init -> test-iso] 00001078: 6161616161616161 6161616161616161 6161616161616161 6161616161616161 6161616161616161
|
|
|
|
[init -> test-iso]
|
|
|
|
[init -> test-iso] 00010000: 6262626262626262 6262626262626262 6262626262626262 6262626262626262 6262626262626262
|
|
|
|
[init -> test-iso] 00010028: 6262626262626262 6262626262626262 6262626262626262 6262626262626262 6262626262626262
|
|
|
|
[init -> test-iso] 00010050: 6262626262626262 6262626262626262 6262626262626262 6262626262626262 6262626262626262
|
|
|
|
[init -> test-iso] 00010078: 6262626262626262 6262626262626262 6262626262626262 6262626262626262 6262626262626262
|
|
|
|
[init -> test-iso]
|
|
|
|
[init -> test-iso] 00020000: 6363636363636363 6363636363636363 6363636363636363 6363636363636363 6363636363636363
|
|
|
|
[init -> test-iso] 00020028: 6363636363636363 6363636363636363 6363636363636363 6363636363636363 6363636363636363
|
|
|
|
[init -> test-iso] 00020050: 6363636363636363 6363636363636363 6363636363636363 6363636363636363 6363636363636363
|
|
|
|
[init -> test-iso] 00020078: 6363636363636363 6363636363636363 6363636363636363 6363636363636363 6363636363636363
|
|
|
|
[init -> test-iso]
|
|
|
|
}
|
|
|
|
}
|
2013-12-05 14:45:14 +00:00
|
|
|
|
2014-04-04 13:22:52 +00:00
|
|
|
exec rm -rf bin/fs.iso
|