Getting Networking to work on QEMU : Monkey Port

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


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
initially there was an error with the networkconfig-qemu file:

../networkconfig.h:148:12: error: conflicting types for
 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 netmask 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

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

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