[OE-core] [PATCH] qemu*.conf: Add slirp support for all qemu machines

Randy Witt randy.e.witt at linux.intel.com
Tue Nov 29 18:24:13 UTC 2016


>
> "-device virtio-net-device,netdev=net0" and
> "-netdev user,id=net0,hostfwd=tcp::2222-:22"
>
> Then there is no way for user to override the second part, and we can't
> call the first part as a "QB_SLIRP_OPT" since it is only part of them,
> so I won't break them into 2, and if the user defines QB_SLIRP_OPT
> in there bsp conf file, then it will be replaced totally.
>

I'm aware that this will only work for one instance, but currently it doesn't 
work at all and it blocks a high priority bug. The only way to make it 100% 
work, would be to have qemu do the binding of the port to a dynamic one and then 
the user queries it after. Otherwise there is always a window where another 
process could bind to the port.

I don't think the bsp should be in the business of choosing which ports to 
forward. And if it is, then it should be a separate option in the qemuboot.conf, 
with just the "-netdev user" part because otherwise the user will always have to 
modify qemuboot.conf just to forward different ports.

It makes more sense to let the user do something like "runqemu slirp=22,65,..." 
and then return back the actual port used in the forwarding.




More information about the Openembedded-core mailing list