Remove noux from vbox_share.inc

This snippet is used by the vbox5_win7_64_share.run script.

Issue #3696
This commit is contained in:
Norman Feske 2020-03-17 16:26:58 +01:00
parent 2f598e5680
commit 4961c84f12

View File

@ -103,11 +103,9 @@ catch { exec dd if=/dev/urandom of=bin/test.bin bs=4096 count=8160 }
# #
set build_components { set build_components {
server/input_merger server/input_merger
server/ram_fs server/report_rom server/ram_fs server/report_rom server/fs_rom server/vfs
server/tcp_terminal drivers/nic server/tcp_terminal drivers/nic
lib/libc_noux lib/vfs/lwip lib/vfs/pipe
lib/vfs/lwip
noux
} }
# #
@ -117,9 +115,9 @@ foreach pkg {bash coreutils} {
lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg } lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg }
set boot_modules { set boot_modules {
ram_fs ram_fs vfs fs_rom
noux libc_noux.lib.so posix.lib.so bash.tar coreutils.tar posix.lib.so bash.tar coreutils.tar
tcp_terminal vfs_lwip.lib.so ipxe_nic_drv report_rom tcp_terminal vfs_lwip.lib.so vfs_pipe.lib.so ipxe_nic_drv report_rom
input_merger input_merger
test.bin template.bat test.bin template.bat
} }
@ -137,7 +135,7 @@ set config_of_app {
<resource name="RAM" quantum="5M"/> <resource name="RAM" quantum="5M"/>
<provides> <service name="Terminal"/> </provides> <provides> <service name="Terminal"/> </provides>
<config> <config>
<policy label_prefix="noux" port="8888"/> <policy label_prefix="vfs" port="8888"/>
<vfs> <vfs>
<dir name="dev"> <log/> </dir> <dir name="dev"> <log/> </dir>
<dir name="socket"> <lwip dhcp="yes"/> </dir> <dir name="socket"> <lwip dhcp="yes"/> </dir>
@ -146,31 +144,6 @@ set config_of_app {
</config> </config>
</start> </start>
<start name="noux" priority="-1" caps="600">
<resource name="RAM" quantum="32M"/>
<config>
<fstab>
<tar name="coreutils.tar"/>
<tar name="bash.tar"/>
<dir name="from"> <fs label="share_from"/> </dir>
<dir name="to"> <fs label="share_to"/> </dir>
</fstab>
<start name="/bin/bash">
<env name="TERM" value="screen"/>
</start>
</config>
<route>
<service name="File_system" label="share_from">
<child name="ram_fs_from"/>
</service>
<service name="File_system" label="share_to">
<child name="ram_fs_to"/>
</service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="ram_fs_from" priority="-1"> <start name="ram_fs_from" priority="-1">
<binary name="ram_fs"/> <binary name="ram_fs"/>
<resource name="RAM" quantum="64M"/> <resource name="RAM" quantum="64M"/>
@ -193,6 +166,69 @@ set config_of_app {
</config> </config>
</start> </start>
<start name="vfs" caps="120" priority="-1">
<resource name="RAM" quantum="30M"/>
<provides><service name="File_system"/></provides>
<config>
<vfs>
<tar name="coreutils.tar"/>
<tar name="bash.tar"/>
<dir name="from"> <fs label="share_from"/> </dir>
<dir name="to"> <fs label="share_to"/> </dir>
<dir name="tmp"> <ram/> </dir>
<dir name="dev">
<zero/> <null/> <terminal/>
<dir name="pipe"> <pipe/> </dir>
<inline name="rtc">2018-01-01 00:01</inline>
</dir>
</vfs>
<policy label_prefix="vfs_rom" root="/"/>
<default-policy root="/" writeable="yes"/>
</config>
<route>
<service name="File_system" label="share_from">
<child name="ram_fs_from"/>
</service>
<service name="File_system" label="share_to">
<child name="ram_fs_to"/>
</service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="vfs_rom" priority="-1">
<resource name="RAM" quantum="30M"/>
<binary name="fs_rom"/>
<provides> <service name="ROM"/> </provides>
<config/>
<route>
<service name="File_system"> <child name="vfs"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="/bin/bash" caps="600" priority="-1">
<resource name="RAM" quantum="30M" />
<config ld_verbose="yes">
<libc stdin="/dev/terminal" stdout="/dev/terminal"
stderr="/dev/terminal" rtc="/dev/rtc" pipe="/dev/pipe"/>
<vfs> <fs/> </vfs>
<arg value="bash"/>
<env key="TERM" value="screen"/>
<env key="PATH" value="/bin" />
</config>
<route>
<service name="File_system"> <child name="vfs"/> </service>
<service name="ROM" label_suffix=".lib.so"> <parent/> </service>
<service name="ROM" label_last="/bin/bash"> <child name="vfs_rom"/> </service>
<service name="ROM" label_prefix="/bin"> <child name="vfs_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="report_rom" priority="-1"> <start name="report_rom" priority="-1">
<resource name="RAM" quantum="1M"/> <resource name="RAM" quantum="1M"/>
<provides> <service name="Report"/> <service name="ROM"/> </provides> <provides> <service name="Report"/> <service name="ROM"/> </provides>
@ -334,37 +370,37 @@ run_genode_until {\[init -\> vbox1\].*Guest Additions capability report:.*seamle
puts "\nTest shared folder\n" puts "\nTest shared folder\n"
spawn netcat $serial_ip_addr 8888 spawn netcat $serial_ip_addr 8888
set noux_id $spawn_id set netcat_id $spawn_id
set spawn_id_list [list $noux_id $serial_id] set spawn_id_list [list $netcat_id $serial_id]
run_genode_until {\[init -> tcp_terminal\] connection established} 20 $spawn_id_list run_genode_until {\[init -> tcp_terminal\] connection established} 20 $spawn_id_list
# #
# Step 5 : interact with netcat -> ... -> tcp_terminal -> Noux -> bash # Step 5 : interact with netcat -> ... -> tcp_terminal -> /bin/bash
# #
# Windows does not like trailing zeros introduced by our ROM service. # Windows does not like trailing zeros introduced by our ROM service.
# -> .bat script does not find labels like 'check' with zero bytes # -> .bat script does not find labels like 'check' with zero bytes
# so - delete zero bytes # so - delete zero bytes
puts $noux_id "cat from/template\.bat | tr -d \"\\0\" >to/test\.bat" puts $netcat_id "cat from/template\.bat | tr -d \"\\0\" >to/test\.bat"
# SHA1 of original file # SHA1 of original file
puts $noux_id "sha1sum from/test.bin" puts $netcat_id "sha1sum from/test.bin"
# Tell Windows VM to start copying # Tell Windows VM to start copying
puts $noux_id "echo \"start\" > to/start\.txt" puts $netcat_id "echo \"start\" > to/start\.txt"
# Wait until Windows finished copying # Wait until Windows finished copying
puts $noux_id "while \[ ! -f to/done\.txt ]" puts $netcat_id "while \[ ! -f to/done\.txt ]"
puts $noux_id "do" puts $netcat_id "do"
puts $noux_id "sleep 5" puts $netcat_id "sleep 5"
puts $noux_id "done" puts $netcat_id "done"
# Wait until VM signaled shutdown state # Wait until VM signaled shutdown state
run_genode_until {\[init\] child "vbox1" exited with exit value 0} 120 $spawn_id_list run_genode_until {\[init\] child "vbox1" exited with exit value 0} 120 $spawn_id_list
# SHA1 of copied file # SHA1 of copied file
puts $noux_id "sha1sum to/test.bin" puts $netcat_id "sha1sum to/test.bin"
# Wait for output of bash shell until last SHA1 sum is calculated # Wait for output of bash shell until last SHA1 sum is calculated
run_genode_until {[[:xdigit:]]+ to/test\.bin} 50 $spawn_id_list run_genode_until {[[:xdigit:]]+ to/test\.bin} 50 $spawn_id_list