Adaptation to lxIP-based fetchurl

This commit is contained in:
Norman Feske 2018-02-19 19:29:51 +01:00 committed by Christian Helmuth
parent e1f7dd0553
commit 03574e4a79
7 changed files with 44 additions and 5 deletions

View File

@ -15,4 +15,5 @@ _/src/init
_/src/chroot
_/src/libarchive
_/src/liblzma
_/src/vfs
_/raw/depot_download

View File

@ -27,6 +27,7 @@ _/src/bash-minimal
_/src/vim-minimal
_/src/coreutils-minimal
_/src/vfs
_/src/vfs_lxip
_/src/rump
_/src/ipxe_nic_drv
_/src/chroot

View File

@ -2,6 +2,7 @@
<parent-provides>
<service name="ROM"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="Timer"/>
@ -34,6 +35,25 @@
</config>
</start>
<start name="tcpip" caps="400">
<binary name="vfs"/>
<resource name="RAM" quantum="32M" />
<provides> <service name="File_system"/> </provides>
<config>
<vfs>
<dir name="etc">
<inline name="resolv.conf">nameserver 213.73.91.35</inline>
<inline name="hosts"/>
</dir>
<dir name="socket">
<lxip dhcp="yes"/>
</dir>
</vfs>
<default-policy root="/" writeable="yes"/>
</config>
<route> <any-service> <parent/> </any-service> </route>
</start>
<start name="depot_ro">
<binary name="chroot"/>
<resource name="RAM" quantum="1M" />
@ -80,6 +100,7 @@
<service name="File_system" label="depot_rw"> <parent label="depot"/> </service>
<service name="File_system" label="public"> <child name="public_ro"/> </service>
<service name="File_system" label="public_rw"> <parent label="public"/> </service>
<service name="File_system" label="tcpip"> <child name="tcpip"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>

View File

@ -4,6 +4,7 @@ import_from_depot genodelabs/src/[base_src] \
genodelabs/src/report_rom \
genodelabs/src/fs_rom \
genodelabs/src/vfs \
genodelabs/src/vfs_lxip \
genodelabs/src/fetchurl \
genodelabs/src/libc \
genodelabs/src/libssh \
@ -91,7 +92,7 @@ append config {
<start name="depot_download" caps="2000">
<binary name="init"/>
<resource name="RAM" quantum="32M"/>
<resource name="RAM" quantum="64M"/>
<route>
<service name="ROM" label="config">
<parent label="depot_download.config"/> </service>

View File

@ -108,10 +108,17 @@
</start>
<start name="fetchurl" caps="500">
<resource name="RAM" quantum="8M"/>
<resource name="RAM" quantum="32M"/>
<config>
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc"/>
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc" socket="/socket"/>
<vfs>
<dir name="etc">
<inline name="resolv.conf">nameserver 213.73.91.35</inline>
<inline name="hosts"/>
</dir>
<dir name="socket">
<lxip dhcp="yes"/>
</dir>
<dir name="download"> <fs label="download"/> </dir>
<dir name="dev">
<log/> <null/> <inline name="rtc">2000-01-01 00:00</inline>

View File

@ -92,7 +92,7 @@
<start name="depot_download" caps="2000">
<binary name="init"/>
<resource name="RAM" quantum="32M"/>
<resource name="RAM" quantum="64M"/>
<route>
<service name="ROM" label="config">
<parent label="config -> subinit/depot_download.config"/> </service>

View File

@ -27,6 +27,7 @@ void Depot_download_manager::gen_fetchurl_start_content(Xml_generator &xml,
xml.attribute("stdout", "/dev/log");
xml.attribute("stderr", "/dev/log");
xml.attribute("rtc", "/dev/rtc");
xml.attribute("socket", "/socket");
});
xml.node("vfs", [&] () {
xml.node("dir", [&] () {
@ -44,6 +45,8 @@ void Depot_download_manager::gen_fetchurl_start_content(Xml_generator &xml,
xml.append(date.string());
});
});
xml.node("fs", [&] () {
xml.attribute("label", "tcpip"); });
});
import.for_each_download([&] (Archive::Path const &path) {
@ -74,11 +77,16 @@ void Depot_download_manager::gen_fetchurl_start_content(Xml_generator &xml,
xml.node("parent", [&] () {
xml.attribute("label", "public_rw"); });
});
xml.node("service", [&] () {
xml.attribute("name", File_system::Session::service_name());
xml.attribute("label", "tcpip");
xml.node("parent", [&] () {
xml.attribute("label", "tcpip"); });
});
gen_parent_unscoped_rom_route(xml, "fetchurl");
gen_parent_unscoped_rom_route(xml, "ld.lib.so");
gen_parent_rom_route(xml, "libc.lib.so");
gen_parent_rom_route(xml, "libm.lib.so");
gen_parent_rom_route(xml, "lwip.lib.so");
gen_parent_rom_route(xml, "curl.lib.so");
gen_parent_rom_route(xml, "libssh.lib.so");
gen_parent_rom_route(xml, "libssl.lib.so");