Getting Networking to work on QEMU : Monkey Port

Sujay Raj sujayraaj at gmail.com
Wed May 6 16:37:46 UTC 2015


Hi,

I have successfully compiled RTEMS and all applications that donot
require networking work fine in QEMU. I tried compiled the
network-demos overwriting the networkconfig.h with
networkconfig-qemu.h.
initially there was an error with the networkconfig-qemu file:

../networkconfig.h:148:12: error: conflicting types for
'rtems_3c509_driver_attach'
 extern int rtems_3c509_driver_attach (struct rtems_bsdnet_ifconfig *, int);
..... include/bsp.h:102:12: note: previous declaration of
'rtems_3c509_driver_attach' was here
 extern int rtems_3c509_driver_attach(struct rtems_bsdnet_ifconfig *config);

So I removed the extra 'int' parameter from the function,  it should
work if I use other nic like i82559er or ne2k_isa.

Most of the network demos compiled successfully.

then I tried setting up tap:

sudo tunctl -u `id -u`
sudo ifconfig tap0 10.1.1.1 netmask 255.255.255.0 up
sudo dhcpd -d tap0

and when each of the above executed successfully, I ran

sudo qemu -cpu 486 -m 8 -kernel netdemo/o-optimize/netdemo.exe -net
nic,macaddr=00:80:7F:22:61:77,model=i82559er -net
tap,vlan=0,ifname=tap0,script=no,downscript=no

but each time netdemo shows that the host is unreachable, so do other
applications.

I even tried running those applications using the user networking in
qemu (by port-forwarding) but that too didn't work.

So, Either I am missing a step, or doing it wrong. This was my fourth
day I spent over this problem so I decided to ask for help.

Kindly have a look.

With Regards,
Sujay Raj


More information about the devel mailing list