mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
tool: Consolidate qemu nic setup.
Right now the same code dealing with nic setup on qemu is duplicated in many different run scripts. It makes it unnecesarily complex to change the existing config or add support for new nic types. Lets move all this common code to qemu.inc. Ref #3825
This commit is contained in:
committed by
Christian Helmuth
parent
aa2511e209
commit
fe0ad0addb
@@ -120,15 +120,7 @@ exec tar cfv bin/genode_org.tar -h -C bin/genode_org .
|
||||
|
||||
build_boot_image { genode_org.tar }
|
||||
|
||||
proc qemu_nic_model {} {
|
||||
if [have_spec x86] { return e1000 }
|
||||
if [have_spec lan9118] { return lan9118 }
|
||||
if [have_spec zynq] { return cadence_gem }
|
||||
return nic_model_missing
|
||||
}
|
||||
|
||||
append qemu_args " -netdev user,id=net0,hostfwd=tcp::5555-:80 "
|
||||
append qemu_args " -net nic,model=[qemu_nic_model],netdev=net0 "
|
||||
append qemu_args " -nographic "
|
||||
append_qemu_nic_args "hostfwd=tcp::5555-:80"
|
||||
|
||||
run_genode_until forever
|
||||
|
||||
@@ -179,16 +179,8 @@ EpA5DBBklj8UE2CdONvN
|
||||
#build { }
|
||||
build_boot_image { }
|
||||
|
||||
proc qemu_nic_model {} {
|
||||
if [have_spec x86] { return e1000 }
|
||||
if [have_spec lan9118] { return lan9118 }
|
||||
if [have_spec zynq] { return cadence_gem }
|
||||
return nic_model_missing
|
||||
}
|
||||
|
||||
append qemu_args " -netdev user,id=net0,hostfwd=tcp::5555-:80,hostfwd=tcp::5556-:443 "
|
||||
append qemu_args " -net nic,model=[qemu_nic_model],netdev=net0 "
|
||||
append qemu_args " -nographic "
|
||||
append_qemu_nic_args "hostfwd=tcp::5555-:80,hostfwd=tcp::5556-:443"
|
||||
append xen_args { sdl=0\; vif=\["model=e1000,mac=02:00:00:00:01:01,bridge=xenbr0"\] }
|
||||
|
||||
run_genode_until forever
|
||||
|
||||
@@ -316,16 +316,8 @@ build_boot_image { netserver }
|
||||
#
|
||||
|
||||
# qemu config
|
||||
append qemu_args " -nographic "
|
||||
|
||||
proc qemu_nic_model {} {
|
||||
if [have_spec x86] { return e1000 }
|
||||
if [have_spec lan9118] { return lan9118 }
|
||||
return nic_model_missing
|
||||
}
|
||||
|
||||
append qemu_args " -netdev user,id=net0,hostfwd=tcp::12865-:12865,hostfwd=tcp::49153-:49153 "
|
||||
append qemu_args " -net nic,model=[qemu_nic_model],netdev=net0 "
|
||||
append qemu_args " -nographic "
|
||||
append_qemu_nic_args "hostfwd=tcp::12865-:12865,hostfwd=tcp::49153-:49153"
|
||||
|
||||
set ip_match_string ""
|
||||
set force_ports ""
|
||||
|
||||
@@ -75,8 +75,8 @@ foreach binary $guest_os_binaries {
|
||||
source ${genode_dir}/repos/ports/run/seoul.inc
|
||||
|
||||
append qemu_args " -cpu phenom -smp 2 "
|
||||
append qemu_args " -net nic,model=e1000 "
|
||||
append qemu_args " -nographic "
|
||||
append_qemu_nic_args
|
||||
|
||||
if { [get_cmd_switch --autopilot] } {
|
||||
run_genode_until {\[init -\> seoul\] VMM: # Hello Genode world!} 300
|
||||
|
||||
@@ -62,6 +62,6 @@ source ${genode_dir}/repos/ports/run/seoul.inc
|
||||
|
||||
append qemu_args " -m 1024 "
|
||||
append qemu_args " -cpu phenom "
|
||||
append qemu_args " -net nic,model=e1000 "
|
||||
append_qemu_nic_args
|
||||
|
||||
run_genode_until forever
|
||||
|
||||
@@ -57,6 +57,6 @@ foreach binary $guest_os_binaries {
|
||||
source ${genode_dir}/repos/ports/run/seoul.inc
|
||||
|
||||
append qemu_args " -cpu phenom "
|
||||
append qemu_args " -net nic,model=e1000 "
|
||||
append_qemu_nic_args
|
||||
|
||||
run_genode_until forever
|
||||
|
||||
Reference in New Issue
Block a user