From f14cc2edabfea9776d501488f9f3ed94f1c2334a Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 20 Apr 2020 14:00:57 +0200 Subject: [PATCH] Replace use of ram_fs by VFS server Issue #3734 --- repos/dde_linux/run/intel_fb.run | 18 +++++--- repos/gems/recipes/pkg/sculpt/archives | 1 - repos/gems/run/depot_deploy.run | 3 +- repos/gems/run/leitzentrale.run | 32 ++++++++------ repos/gems/run/sculpt.run | 29 +++++++------ repos/gems/run/ssh_exec_channel.run | 3 +- repos/gems/src/app/depot_autopilot/README | 4 +- .../src/app/sculpt_manager/runtime/ram_fs.cc | 6 ++- .../recipes/pkg/test-libc_vfs/archives | 1 - .../recipes/pkg/test-libc_vfs/runtime | 10 +++-- repos/libports/run/qt5_textedit.run | 4 +- repos/os/recipes/pkg/test-fs_report/README | 2 +- repos/os/recipes/pkg/test-fs_report/archives | 2 +- repos/os/recipes/pkg/test-fs_report/runtime | 21 +++++---- .../recipes/pkg/test-fs_rom_update/archives | 2 +- .../os/recipes/pkg/test-fs_rom_update/runtime | 25 ++++++----- .../recipes/pkg/test-vfs_stress_fs/archives | 1 - .../os/recipes/pkg/test-vfs_stress_fs/runtime | 4 +- repos/os/src/server/block_cache/chunk.h | 2 +- repos/os/src/test/fs_report/main.cc | 2 +- repos/os/src/test/ram_fs_chunk/target.mk | 7 ++- .../recipes/pkg/nic_router-nat-dns/archives | 1 + .../recipes/pkg/nic_router-nat-dns/runtime | 1 + repos/ports/run/netperf.inc | 17 +++++--- repos/ports/run/stubby_deploy.run | 8 +++- repos/ports/run/vbox5_genode_usb_hid.run | 23 +++++----- repos/ports/run/vbox_share.inc | 26 ++++++----- repos/ports/run/virtualbox_auto.inc | 43 +++++++++++-------- 28 files changed, 178 insertions(+), 120 deletions(-) diff --git a/repos/dde_linux/run/intel_fb.run b/repos/dde_linux/run/intel_fb.run index a0dc187b46..b3de114383 100644 --- a/repos/dde_linux/run/intel_fb.run +++ b/repos/dde_linux/run/intel_fb.run @@ -7,9 +7,10 @@ set build_components { drivers/framebuffer/intel test/framebuffer server/report_rom - server/ram_fs + server/vfs server/fs_rom app/top + lib/vfs/import } source ${genode_dir}/repos/base/run/platform_drv.inc @@ -96,17 +97,20 @@ append config { - + - - + + + + - - + + + @@ -159,7 +163,7 @@ install_config $config # generic modules set boot_modules { core ld.lib.so init timer intel_fb_drv intel_fb_controller - test-framebuffer report_rom ram_fs fs_rom + test-framebuffer report_rom fs_rom vfs vfs.lib.so vfs_import.lib.so top } diff --git a/repos/gems/recipes/pkg/sculpt/archives b/repos/gems/recipes/pkg/sculpt/archives index 2394ae4948..12ca7734e2 100644 --- a/repos/gems/recipes/pkg/sculpt/archives +++ b/repos/gems/recipes/pkg/sculpt/archives @@ -6,7 +6,6 @@ _/pkg/backdrop _/src/report_rom _/src/clipboard _/src/init -_/src/ram_fs _/src/fs_rom _/src/cached_fs_rom _/src/fs_report diff --git a/repos/gems/run/depot_deploy.run b/repos/gems/run/depot_deploy.run index 96659e44db..138368c174 100644 --- a/repos/gems/run/depot_deploy.run +++ b/repos/gems/run/depot_deploy.run @@ -4,7 +4,6 @@ import_from_depot [depot_user]/src/[base_src] \ [depot_user]/pkg/[drivers_interactive_pkg] \ [depot_user]/src/report_rom \ [depot_user]/src/fs_rom \ - [depot_user]/src/ram_fs \ [depot_user]/src/vfs \ [depot_user]/src/nitpicker \ [depot_user]/src/init \ @@ -125,8 +124,10 @@ install_config { + + diff --git a/repos/gems/run/leitzentrale.run b/repos/gems/run/leitzentrale.run index cded4fe7c3..5a8373c8fb 100644 --- a/repos/gems/run/leitzentrale.run +++ b/repos/gems/run/leitzentrale.run @@ -8,7 +8,6 @@ import_from_depot [depot_user]/src/[base_src] \ [depot_user]/src/report_rom \ [depot_user]/src/fs_rom \ [depot_user]/src/fs_report \ - [depot_user]/src/ram_fs \ [depot_user]/src/nitpicker \ [depot_user]/src/init \ [depot_user]/src/libc \ @@ -34,6 +33,7 @@ import_from_depot [depot_user]/src/[base_src] \ [depot_user]/src/coreutils-minimal \ [depot_user]/src/fs_utils \ [depot_user]/src/vfs_pipe \ + [depot_user]/src/vfs_import \ [depot_user]/src/stdin2out \ [depot_user]/src/gpt_write \ [depot_user]/src/text_area \ @@ -118,18 +118,21 @@ install_config { - + - - - - - - - - + + + + + + + + + + + @@ -146,11 +149,16 @@ install_config { - + - See the core log for messages. + + + + See the core log for messages. + + diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index cc97a1de23..9064494b75 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -149,23 +149,26 @@ install_config { - + - - ### start ### - - - - - + + + + ### start ### + + + + + + + + + - - - - - + + diff --git a/repos/gems/run/ssh_exec_channel.run b/repos/gems/run/ssh_exec_channel.run index a3caa34717..65bffbdb81 100644 --- a/repos/gems/run/ssh_exec_channel.run +++ b/repos/gems/run/ssh_exec_channel.run @@ -33,7 +33,6 @@ import_from_depot [depot_user]/src/[base_src] \ [depot_user]/src/libssh \ [depot_user]/src/platform_drv \ [depot_user]/src/posix \ - [depot_user]/src/ram_fs \ [depot_user]/src/fs_rom \ [depot_user]/src/rtc_drv \ [depot_user]/src/ssh_terminal \ @@ -90,8 +89,10 @@ set config { + + diff --git a/repos/gems/src/app/depot_autopilot/README b/repos/gems/src/app/depot_autopilot/README index 882c16483a..fbfb71755a 100644 --- a/repos/gems/src/app/depot_autopilot/README +++ b/repos/gems/src/app/depot_autopilot/README @@ -350,8 +350,8 @@ example containing all of these variables: ! make run/depot_autopilot \ ! > TEST_PKGS="test-libc_vfs test-log" \ ! > TEST_SRCS="test-xml_generator test-xml_node" \ -! > TEST_BUILDS="server/ram_fs test/libc_vfs" \ -! > TEST_MODULES="ram_fs test-libc_vfs vfs.lib.so" \ +! > TEST_BUILDS="server/vfs test/libc_vfs" \ +! > TEST_MODULES="vfs test-libc_vfs vfs.lib.so" \ ! > TEST_REPEAT="until_failed" \ ! > KERNEL="nova" diff --git a/repos/gems/src/app/sculpt_manager/runtime/ram_fs.cc b/repos/gems/src/app/sculpt_manager/runtime/ram_fs.cc index 389f1ede2e..3d4228f616 100644 --- a/repos/gems/src/app/sculpt_manager/runtime/ram_fs.cc +++ b/repos/gems/src/app/sculpt_manager/runtime/ram_fs.cc @@ -18,9 +18,12 @@ void Sculpt::gen_ram_fs_start_content(Xml_generator &xml, { state.gen_start_node_content(xml); + xml.node("binary", [&] () { xml.attribute("name", "vfs"); }); + gen_provides<::File_system::Session>(xml); xml.node("config", [&] () { + xml.node("vfs", [&] () { xml.node("ram", [&] () { }); }); xml.node("default-policy", [&] () { xml.attribute("root", "/"); xml.attribute("writeable", "yes"); @@ -28,8 +31,9 @@ void Sculpt::gen_ram_fs_start_content(Xml_generator &xml, }); xml.node("route", [&] () { - gen_parent_rom_route(xml, "ram_fs"); + gen_parent_rom_route(xml, "vfs"); gen_parent_rom_route(xml, "ld.lib.so"); + gen_parent_rom_route(xml, "vfs.lib.so"); gen_parent_route (xml); gen_parent_route (xml); gen_parent_route (xml); diff --git a/repos/libports/recipes/pkg/test-libc_vfs/archives b/repos/libports/recipes/pkg/test-libc_vfs/archives index 969852182a..cae223f994 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs/archives +++ b/repos/libports/recipes/pkg/test-libc_vfs/archives @@ -1,5 +1,4 @@ _/src/init _/src/test-libc_vfs -_/src/ram_fs _/src/libc _/src/vfs diff --git a/repos/libports/recipes/pkg/test-libc_vfs/runtime b/repos/libports/recipes/pkg/test-libc_vfs/runtime index 8e0c223f42..f8d30ead61 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs/runtime +++ b/repos/libports/recipes/pkg/test-libc_vfs/runtime @@ -10,7 +10,7 @@ - + @@ -28,13 +28,17 @@ + - + + + + - } + diff --git a/repos/libports/run/qt5_textedit.run b/repos/libports/run/qt5_textedit.run index a8e78d7407..ccb6112cac 100644 --- a/repos/libports/run/qt5_textedit.run +++ b/repos/libports/run/qt5_textedit.run @@ -4,7 +4,7 @@ import_from_depot [depot_user]/src/qt5_component \ [depot_user]/src/qt5_printsupport \ [depot_user]/src/qt5_textedit \ [depot_user]/src/qt5_widgets \ - [depot_user]/src/ram_fs + [depot_user]/src/vfs # # Build @@ -41,8 +41,10 @@ append config [qt5_start_nodes feature] append config { + + diff --git a/repos/os/recipes/pkg/test-fs_report/README b/repos/os/recipes/pkg/test-fs_report/README index d92b7b3e9d..f05d232d84 100644 --- a/repos/os/recipes/pkg/test-fs_report/README +++ b/repos/os/recipes/pkg/test-fs_report/README @@ -1,2 +1,2 @@ -Scenario that emulates the report_rom server by combining the ram_fs, fs_rom, +Scenario that emulates the report_rom server by combining the vfs/ram, fs_rom, and fs_report servers diff --git a/repos/os/recipes/pkg/test-fs_report/archives b/repos/os/recipes/pkg/test-fs_report/archives index 45e39401cd..7468a3f380 100644 --- a/repos/os/recipes/pkg/test-fs_report/archives +++ b/repos/os/recipes/pkg/test-fs_report/archives @@ -1,6 +1,6 @@ _/src/init -_/src/ram_fs _/src/fs_rom _/src/fs_report _/src/test-fs_report _/src/vfs +_/src/vfs_import diff --git a/repos/os/recipes/pkg/test-fs_report/runtime b/repos/os/recipes/pkg/test-fs_report/runtime index 92df00c343..80903b87b2 100644 --- a/repos/os/recipes/pkg/test-fs_report/runtime +++ b/repos/os/recipes/pkg/test-fs_report/runtime @@ -10,11 +10,12 @@ - + + @@ -34,15 +35,19 @@ + - - - - - - - + + + + + + + + + + diff --git a/repos/os/recipes/pkg/test-fs_rom_update/archives b/repos/os/recipes/pkg/test-fs_rom_update/archives index d58fddcfce..8077f964b7 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update/archives +++ b/repos/os/recipes/pkg/test-fs_rom_update/archives @@ -3,4 +3,4 @@ _/src/rom_logger _/src/rom_to_file _/src/dynamic_rom _/src/fs_rom -_/src/ram_fs +_/src/vfs diff --git a/repos/os/recipes/pkg/test-fs_rom_update/runtime b/repos/os/recipes/pkg/test-fs_rom_update/runtime index 29ad5bc56c..8166ab66d4 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update/runtime +++ b/repos/os/recipes/pkg/test-fs_rom_update/runtime @@ -3,15 +3,16 @@ - - <config iteration="4" /> + + <config iteration="4"/> - + + @@ -34,8 +35,10 @@ + + @@ -46,21 +49,21 @@ - + - + - + - + - + - + - + - + diff --git a/repos/os/recipes/pkg/test-vfs_stress_fs/archives b/repos/os/recipes/pkg/test-vfs_stress_fs/archives index b40de58752..42c8d262f4 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_fs/archives +++ b/repos/os/recipes/pkg/test-vfs_stress_fs/archives @@ -1,4 +1,3 @@ _/src/init _/src/vfs -_/src/ram_fs _/src/test-vfs_stress diff --git a/repos/os/recipes/pkg/test-vfs_stress_fs/runtime b/repos/os/recipes/pkg/test-vfs_stress_fs/runtime index 68ab20535a..796062343f 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_fs/runtime +++ b/repos/os/recipes/pkg/test-vfs_stress_fs/runtime @@ -10,7 +10,7 @@ - + @@ -36,8 +36,10 @@ + + diff --git a/repos/os/src/server/block_cache/chunk.h b/repos/os/src/server/block_cache/chunk.h index 967d43752f..658e973bc7 100644 --- a/repos/os/src/server/block_cache/chunk.h +++ b/repos/os/src/server/block_cache/chunk.h @@ -4,7 +4,7 @@ * \author Stefan Kalkowski * \date 2014-01-06 * - * Note: originally taken from ram_fs server, and adapted to cache needs + * Note: originally taken from vfs/ram, and adapted to cache needs */ /* diff --git a/repos/os/src/test/fs_report/main.cc b/repos/os/src/test/fs_report/main.cc index fa4aae7814..e577fb3c76 100644 --- a/repos/os/src/test/fs_report/main.cc +++ b/repos/os/src/test/fs_report/main.cc @@ -1,5 +1,5 @@ /* - * \brief Test for combining ram_fs, fs_rom, and fs_report + * \brief Test for combining vfs/ram, fs_rom, and fs_report * \author Norman Feske * \date 2017-06-28 */ diff --git a/repos/os/src/test/ram_fs_chunk/target.mk b/repos/os/src/test/ram_fs_chunk/target.mk index 03bd0b41b4..78910a43e5 100644 --- a/repos/os/src/test/ram_fs_chunk/target.mk +++ b/repos/os/src/test/ram_fs_chunk/target.mk @@ -1,4 +1,3 @@ -TARGET = test-ram_fs_chunk -SRC_CC = main.cc -INC_DIR += $(REP_DIR)/src/server/ram_fs -LIBS = base +TARGET = test-ram_fs_chunk +SRC_CC = main.cc +LIBS = base diff --git a/repos/ports/recipes/pkg/nic_router-nat-dns/archives b/repos/ports/recipes/pkg/nic_router-nat-dns/archives index e104c97f9d..692a315a36 100644 --- a/repos/ports/recipes/pkg/nic_router-nat-dns/archives +++ b/repos/ports/recipes/pkg/nic_router-nat-dns/archives @@ -5,5 +5,6 @@ _/src/libssl _/src/libgetdns _/src/libcrypto _/src/posix +_/src/vfs _/src/vfs_lxip _/src/vfs_jitterentropy diff --git a/repos/ports/recipes/pkg/nic_router-nat-dns/runtime b/repos/ports/recipes/pkg/nic_router-nat-dns/runtime index 0500134704..6fbd6e6482 100644 --- a/repos/ports/recipes/pkg/nic_router-nat-dns/runtime +++ b/repos/ports/recipes/pkg/nic_router-nat-dns/runtime @@ -84,6 +84,7 @@ listen_addresses: + diff --git a/repos/ports/run/netperf.inc b/repos/ports/run/netperf.inc index f01ed78246..2d89afd637 100644 --- a/repos/ports/run/netperf.inc +++ b/repos/ports/run/netperf.inc @@ -82,8 +82,8 @@ append_if $use_nic_bridge packages " [depot_user]/src/nic_bridge " append_if $use_nic_router packages " [depot_user]/src/nic_router " append_if $use_usb_driver packages " [depot_user]/src/platform_drv " append_if $use_usb_driver packages " [depot_user]/src/usb_drv " -append_if $use_wifi_driver packages " [depot_user]/src/ram_fs " append_if $use_wifi_driver packages " [depot_user]/src/fs_rom " +append_if $use_wifi_driver packages " [depot_user]/src/vfs_import " append_if $use_wifi_driver packages " [depot_user]/src/report_rom " append_if $use_wifi_driver packages " [depot_user]/src/wifi_drv " append_if $use_wifi_driver packages " [depot_user]/src/libcrypto " @@ -141,18 +141,21 @@ if { $use_wifi_driver } { - + - - - + + + + } append config "" append config { - - + + + + diff --git a/repos/ports/run/stubby_deploy.run b/repos/ports/run/stubby_deploy.run index b364af2d7c..aea8a81c54 100644 --- a/repos/ports/run/stubby_deploy.run +++ b/repos/ports/run/stubby_deploy.run @@ -1,5 +1,10 @@ assert_spec x86 +if {[have_spec linux]} { + puts "Platform is unsupported." + exit 0 +} + create_boot_directory proc current_pkg { pkg } { return $pkg/[_current_depot_archive_version pkg $pkg] } @@ -8,7 +13,6 @@ import_from_depot [depot_user]/src/[base_src] \ [depot_user]/pkg/[drivers_nic_pkg] \ [depot_user]/src/report_rom \ [depot_user]/src/fs_rom \ - [depot_user]/src/ram_fs \ [depot_user]/src/vfs \ [depot_user]/src/init \ [depot_user]/src/rtc_drv \ @@ -105,8 +109,10 @@ install_config { + + diff --git a/repos/ports/run/vbox5_genode_usb_hid.run b/repos/ports/run/vbox5_genode_usb_hid.run index 5d232ab98e..6d23547755 100644 --- a/repos/ports/run/vbox5_genode_usb_hid.run +++ b/repos/ports/run/vbox5_genode_usb_hid.run @@ -19,7 +19,7 @@ set build_components { drivers/usb server/log_terminal server/fs_rom - server/ram_fs + server/vfs lib/vfs/import server/report_rom app/usb_report_filter virtualbox5 @@ -73,26 +73,29 @@ append config { - + - - + + + + - - + + - - + + + @@ -250,12 +253,12 @@ set boot_modules { usb_drv usb_report_filter fs_rom - ram_fs + vfs vfs.lib.so vfs_import.lib.so report_rom virtualbox5-nova usb_hid.iso vm_genode_usb_hid.vbox - ld.lib.so libc.lib.so vfs.lib.so libm.lib.so libc_pipe.lib.so + ld.lib.so libc.lib.so libm.lib.so libc_pipe.lib.so libiconv.lib.so stdcxx.lib.so qemu-usb.lib.so } diff --git a/repos/ports/run/vbox_share.inc b/repos/ports/run/vbox_share.inc index 22bea0341d..08a8d2ac38 100644 --- a/repos/ports/run/vbox_share.inc +++ b/repos/ports/run/vbox_share.inc @@ -103,9 +103,9 @@ catch { exec dd if=/dev/urandom of=bin/test.bin bs=4096 count=8160 } # set build_components { server/input_merger - server/ram_fs server/report_rom server/fs_rom server/vfs + server/report_rom server/fs_rom server/vfs server/tcp_terminal drivers/nic - lib/vfs/lwip lib/vfs/pipe + lib/vfs/lwip lib/vfs/pipe lib/vfs/import } # @@ -115,10 +115,10 @@ foreach pkg {bash coreutils} { lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg } set boot_modules { - ram_fs vfs fs_rom + vfs fs_rom posix.lib.so bash.tar coreutils.tar - tcp_terminal vfs_lwip.lib.so vfs_pipe.lib.so ipxe_nic_drv report_rom - input_merger + tcp_terminal vfs_lwip.lib.so vfs_pipe.lib.so vfs_import.lib.so + ipxe_nic_drv report_rom input_merger test.bin template.bat } @@ -145,23 +145,27 @@ set config_of_app { - + - - - - + + + + + + + - + + diff --git a/repos/ports/run/virtualbox_auto.inc b/repos/ports/run/virtualbox_auto.inc index c5bd996710..11d11da99a 100644 --- a/repos/ports/run/virtualbox_auto.inc +++ b/repos/ports/run/virtualbox_auto.inc @@ -44,7 +44,7 @@ lappend_if [expr $use_ps2] build_components drivers/input lappend_if [expr $use_usb] build_components drivers/usb lappend_if [expr $use_usb] build_components app/usb_report_filter lappend_if [have_spec x86] build_components drivers/rtc -lappend_if [expr $use_ram_fs || $use_usb] build_components server/ram_fs +lappend_if [expr $use_ram_fs || $use_usb] build_components lib/vfs/import lappend_if [expr $use_cpu_load] build_components app/trace_subject_reporter lappend_if [expr $use_cpu_load] build_components app/cpu_load_display lappend_if [expr $use_cpu_load] build_components app/top @@ -157,21 +157,26 @@ append_if [expr $use_rumpfs] config { } append_if [expr $use_ram_fs] config { - } + + } append_if [expr $use_ram_fs] config " " append_if [expr $use_ram_fs] config { - } + + + } for { set i 1} { $i <= ${use_vms} } { incr i} { append_if [expr $use_ram_fs] config " - - - " + + + " } append_if [expr $use_ram_fs] config { - + + + } for { set i 1} { $i <= ${use_vms} } { incr i} { append_if [expr $use_ram_fs] config " @@ -251,20 +256,22 @@ append_if [expr $use_cpu_load] config { append_if [expr $use_usb] config { - - + + - - + + + + - - + + @@ -288,8 +295,9 @@ append_if [expr $use_usb] config { - - + + + @@ -374,7 +382,7 @@ append config { install_config $config append boot_modules { - part_block ahci_drv fs_rom + part_block ahci_drv fs_rom vfs libc.lib.so vfs.lib.so libm.lib.so libc_pipe.lib.so libiconv.lib.so stdcxx.lib.so @@ -384,10 +392,9 @@ append boot_modules { lappend_if [expr $use_rumpfs] boot_modules rump.lib.so lappend_if [expr $use_rumpfs] boot_modules rump_fs.lib.so lappend_if [expr $use_rumpfs] boot_modules vfs_rump.lib.so -lappend_if [expr $use_rumpfs] boot_modules vfs lappend_if [expr $use_serial] boot_modules log_terminal lappend_if [expr $use_vbox5] boot_modules $virtualbox5_binary -lappend_if [expr $use_ram_fs || $use_usb] boot_modules ram_fs +lappend_if [expr $use_ram_fs || $use_usb] boot_modules vfs_import.lib.so lappend_if [expr $use_ram_fs && !$use_overlay_from_disk] boot_modules $overlay_image lappend_if [expr $use_cpu_load] boot_modules trace_subject_reporter lappend_if [expr $use_cpu_load] boot_modules cpu_load_display