create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
                  [depot_user]/pkg/[drivers_nic_pkg] \
                  [depot_user]/src/init
build {
	app/rom_logger
	proxy/remote_rom/backend/nic_ip/client
}

install_config {
<config>
	<parent-provides>
		<service name="CAP"/>
		<service name="LOG"/>
		<service name="RM"/>
		<service name="SIGNAL"/>
		<service name="ROM" />
		<service name="RAM" />
		<service name="CPU" />
		<service name="PD" />
		<service name="IO_MEM" />
		<service name="IRQ" />
	</parent-provides>
	<default-route>
		<any-service> <parent/> <any-child/> </any-service>
	</default-route>
	<default caps="100" />
	<start name="timer">
		<resource name="RAM" quantum="1M"/>
		<provides><service name="Timer"/></provides>
	</start>

	<start name="drivers" caps="1000">
		<resource name="RAM" quantum="32M" constrain_phys="yes"/>
		<binary name="init"/>
		<route>
			<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
			<service name="Timer"> <child name="timer"/> </service>
			<any-service> <parent/> </any-service>
		</route>
		<provides> <service name="Nic"/> </provides>
	</start>

	<start name="rom_logger">
		<resource name="RAM" quantum="4M"/>
		<config rom="remote" />
		<route>
			<service name="ROM" label_suffix="remote">
				<child name="remote_rom_client"/>
			</service>
			<any-service> <parent/> </any-service>
		</route>
	</start>

	<start name="remote_rom_client">
		<resource name="RAM" quantum="8M"/>
		<provides><service name="ROM"/></provides>
		<config>
			<remote_rom name="remote" src="192.168.42.11" dst="192.168.42.10" />
		</config>
	</start>
</config>}

build_boot_image {
	remote_rom_client
	rom_logger
}
append qemu_args " -nographic "
append qemu_args " -net tap,ifname=tap0 "
run_genode_until forever
