Replace use of ram_fs by VFS server

Issue #3734
This commit is contained in:
Norman Feske
2020-04-20 14:00:57 +02:00
parent f0c4fc1e22
commit f14cc2edab
28 changed files with 178 additions and 120 deletions

View File

@@ -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

View File

@@ -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 {
<start name="ram_fs">
<resource name="RAM" quantum="8M"/>
<binary name="vfs"/>
<provides> <service name="File_system"/> </provides>
<config>
<vfs> <ram/> </vfs>
<default-policy root="/" writeable="yes"/>
</config>
</start>

View File

@@ -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 {
</start>
<start name="config_fs">
<binary name="ram_fs"/>
<binary name="vfs"/>
<resource name="RAM" quantum="4M"/>
<provides> <service name="File_system"/> </provides>
<config>
<content>
<dir name="managed">
<rom name="fonts.config" as="fonts"/>
<inline name="runtime"><config/></inline>
<inline name="depot_query"><query/></inline>
</dir>
<inline name="deploy"></inline>
</content>
<vfs>
<ram/>
<import>
<dir name="managed">
<rom name="fonts" label="fonts.config"/>
<inline name="runtime"><config/></inline>
<inline name="depot_query"><query/></inline>
</dir>
<inline name="deploy"></inline>
</import>
</vfs>
<default-policy root="/" writeable="yes"/>
</config>
</start>
@@ -146,11 +149,16 @@ install_config {
</start>
<start name="report_fs">
<binary name="ram_fs"/>
<binary name="vfs"/>
<resource name="RAM" quantum="4M"/>
<provides> <service name="File_system"/> </provides>
<config>
<content> <inline name="log">See the core log for messages.</inline> </content>
<vfs>
<ram/>
<import>
<inline name="log">See the core log for messages.</inline>
</import>
</vfs>
<policy label="ro" root="/"/>
<default-policy root="/" writeable="yes"/>
</config>

View File

@@ -149,23 +149,26 @@ install_config {
</start>
<start name="report_fs">
<binary name="ram_fs"/>
<binary name="vfs"/>
<resource name="RAM" quantum="16M"/>
<provides> <service name="File_system"/> </provides>
<config>
<content>
<inline name="log">### start ###</inline>
<dir name="runtime">
<inline name="state"><empty/></inline>
<dir name="wifi_drv">
<inline name="accesspoints"><empty/></inline>
<inline name="state"> <empty/></inline>
<vfs>
<ram/>
<import>
<inline name="log">### start ###</inline>
<dir name="runtime">
<inline name="state"><empty/></inline>
<dir name="wifi_drv">
<inline name="accesspoints"><empty/></inline>
<inline name="state"> <empty/></inline>
</dir>
<dir name="nic_router"> <inline name="state"> <empty/></inline> </dir>
<dir name="update"> <inline name="state"> <empty/></inline> </dir>
<dir name="depot_query"><inline name="blueprint"><empty/></inline> </dir>
</dir>
<dir name="nic_router"> <inline name="state"> <empty/></inline> </dir>
<dir name="update"> <inline name="state"> <empty/></inline> </dir>
<dir name="depot_query"><inline name="blueprint"><empty/></inline> </dir>
</dir>
</content>
</import>
</vfs>
<policy label="fs_report -> " root="/" writeable="yes"/>
<policy label="log_terminal -> " root="/" writeable="yes"/>
<policy label="report_fs_rom -> " root="/"/>

View File

@@ -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 {
<start name="ram_fs">
<resource name="RAM" quantum="8M"/>
<binary name="vfs"/>
<provides> <service name="File_system"/> </provides>
<config>
<vfs> <ram/> </vfs>
<default-policy root="/" writeable="yes"/>
</config>
<route>

View File

@@ -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"

View File

@@ -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<Cpu_session> (xml);
gen_parent_route<Pd_session> (xml);
gen_parent_route<Log_session> (xml);