<runtime ram="24M" caps="768" binary="init">

	<requires>
		<file_system label="fonts"/>
		<file_system label="target"/>
		<nic/>
		<nitpicker/>
	</requires>

	<content>
		<rom label="fetch_and_copy"/>
		<rom label="init"/>
		<rom label="libc.lib.so"/>
		<rom label="libcrypto.lib.so"/>
		<rom label="libm.lib.so"/>
		<rom label="libpng.lib.so"/>
		<rom label="libssl.lib.so"/>
		<rom label="machine.vdi"/>
		<rom label="menu_view"/>
		<rom label="menu_view_styles.tar"/>
		<rom label="machine.vbox"/>
		<rom label="report_rom"/>
		<rom label="vfs.lib.so"/>
		<rom label="vfs_lwip.lib.so"/>
		<rom label="zlib.lib.so"/>
	</content>

	<config>
		<parent-provides>
			<service name="ROM"/>
			<service name="PD"/>
			<service name="RM"/>
			<service name="CPU"/>
			<service name="LOG"/>
			<service name="Timer"/>
			<service name="File_system"/>
			<service name="Nitpicker"/>
			<service name="Nic"/>
		</parent-provides>
	
		<default-route>
			<any-service> <parent/> </any-service>
		</default-route>
	
		<default caps="128"/>

		<start name="report_rom">
			<resource name="RAM" quantum="1M"/>
			<provides>
				<service name="Report"/>
				<service name="ROM"/>
			</provides>
			<config>
				<policy label="dialog" report="dialog"/>
			</config>
		</start>
	
		<start name="menu_view" caps="256">
			<resource name="RAM" quantum="8M"/>
			<config>
				<libc stderr="/dev/log"/>
				<vfs>
					<tar name="menu_view_styles.tar" />
					<dir name="dev"> <log/> </dir>
					<dir name="fonts"> <fs label="fonts"/> </dir>
				</vfs>
			</config>
			<route>
				<service name="File_system" label="fonts">
					<parent label="fonts"/> </service>
				<service name="ROM" label="dialog">
					<child name="report_rom" label="dialog"/> </service>
				<any-service> <parent/> </any-service>
			</route>
		</start>
	
		<start name="fetch_and_copy" caps="256">
			<resource name="RAM" quantum="16M"/>
			<config>
				<libc stdout="/dev/log" stderr="/dev/log" socket="/socket" rtc="/dev/rtc"/>
				<vfs>
					<dir name="dev">
						<inline name="rtc">2018-01-01 00:01</inline>
						<log/> <zero name="random"/>
					</dir>
					<dir name="socket"> <lwip dhcp="yes"/> </dir>
					<dir name="target"> <fs label="target"/> </dir>
					<dir name="rom">
						<rom name="machine.vbox"/>
						<rom name="machine.vdi"/>
					</dir>
				</vfs>
				<fetch url="@URL@"
				       path="/target/installer.iso"
				       sha256="@SHA256@"/>
				<copy from="/rom/machine.vbox"  to="/target/machine.vbox"/>
				<copy from="/rom/machine.vdi" to="/target/machine.vdi"/>
			</config>
			<route>
				<service name="File_system" label="target">
					<parent label="target"/> </service>
				<service name="Report" label="dialog">
					<child name="report_rom" label="dialog"/> </service>
				<any-service> <parent/> </any-service>
			</route>
		</start>
	</config>

</runtime>
