<runtime ram="80M" caps="1000" binary="init">

	<requires>
		<file_system label="report" writeable="no"/>
		<file_system label="target" writeable="yes"/>
		<timer/>
		<rtc/>
	</requires>

	<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="Rtc"/>
		</parent-provides>

		<default-route> <any-service> <parent/> <any-child/> </any-service> </default-route>

		<default caps="100"/>

		<start name="vfs" caps="150">
			<resource name="RAM" quantum="12M"/>
			<provides><service name="File_system"/></provides>
			<config>
				<vfs>
					<tar name="bash-minimal.tar" />
					<tar name="coreutils.tar" />
					<dir name="dev">
						<zero/> <null/> <log/> <rtc/>
						<dir name="pipe"> <pipe/> </dir>
					</dir>
					<dir name="rw">     <fs label="target"/> </dir>
					<dir name="report"> <fs label="report"/> </dir>
					<dir name="tmp"> <ram /> </dir>
					<inline name=".bash_profile">
						while true; do
							export VERSION=`printf "%(%T)T"`
							mkdir "/rw/$VERSION"
							cp -r /report/* "/rw/$VERSION/"
							sleep 60
						done
					</inline>
				</vfs>
				<policy label_prefix="vfs_rom" root="/"/>
				<default-policy root="/" writeable="yes"/>
			</config>
			<route>
				<service name="File_system" label="target"> <parent label="target"/> </service>
				<service name="File_system" label="report"> <parent label="report"/> </service>
				<any-service> <parent/> </any-service>
			</route>
		</start>

		<start name="vfs_rom">
			<resource name="RAM" quantum="16M"/>
			<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="450">
			<resource name="RAM" quantum="28M" />
			<exit propagate="yes"/>
			<config>
				<libc stdin="/dev/null" stdout="/dev/null"
				      stderr="/dev/log" rtc="/dev/rtc" pipe="/dev/pipe"/>
				<vfs> <fs/> </vfs>
				<arg value="bash"/>
				<arg value="--login"/>
				<env key="TERM" value="screen"/>
				<env key="PATH" value="/bin" />
				<env key="HOME" value="/" />
			</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>

	</config>

	<content>
		<rom label="ld.lib.so"/>
		<rom label="libc.lib.so"/>
		<rom label="libm.lib.so"/>
		<rom label="init"/>
		<rom label="fs_rom"/>
		<rom label="posix.lib.so"/>
		<rom label="bash-minimal.tar"/>
		<rom label="coreutils.tar"/>
		<rom label="vfs"/>
		<rom label="vfs.lib.so"/>
		<rom label="vfs_pipe.lib.so"/>
	</content>

</runtime>
