FYI: RTEMS-pc386 works with QEMU

Lars Munch lars at segv.dk
Sat Nov 27 14:36:10 UTC 2004


Hello

I have recently spent some time trying to get network going in bochs
using the pc386 bsp and the ne2000 driver. With some minor tweaks in the
bochs ne2000 emulator (timing issues on transmit) and tuntap device
(buggy configuration), using latest bochs from cvs, I had it sort of
going, but still with some problems on recieve.

Anyway, I finally gave up on bochs and tried QEMU instead. That was a
success and I now have network going using the netdemo example. For
QEMU see http://fabrice.bellard.free.fr/qemu/.

To get it going I:

1. compiled netdemo for rtems-pc386 using ne2000 on port 0x300 and irq 9
   and IP 192.168.0.2.

2. created a disc image with grub as I describe on
   http://www.rtems.org/phpwiki/index.php/Bochs

3. created a small tun/tap configuration script called tunconfig.sh
   containing

   #!/bin/sh
   TUN_DEV=$1
   TUN_HOST=192.168.0.1
   /sbin/ifconfig $TUN_DEV $TUN_HOST
   exit 0

4. ran qemu with (as root since tunconfig.sh cannot be run as normal user)
   qemu -isa -nics 1 -n tunconfig.sh -macaddr xx:xx:xx:xx:xx:xx \
     -m 32 -hdachs 20,16,63 -std-vga -boot c  harddisk.img

Now I can ping and telnet to my rtems running netdemo.exe in QEMU.

As a side bonus I also got EtherBoot going in QEMU. The EtherBoot-5.3.9
rom was simply made by "make bin/ne.zlilo" and loaded from GRUB using
the before mentioned disc image. So now I can load RTEMS into QEMU over
TFTP which is easier than modifying the disk image after each RTEMS
compilation.

Best regards
Lars Munch




More information about the users mailing list