Re: [edk2] OVMF networking revisited

Subject: Re: [edk2] OVMF networking revisited

From: Duane Voth <>

To: Laszlo Ersek <>

Date: 2013-03-26 19:48:45

Getting a chance to look at this again...

md5sum forIntel3.5/EFIX64/E3507X2.EFI matches.
build command line matches.
qemu version 1.2.0
qemu: I've had better success with the default console (instead of vnc)

If I add -s -S to the qemu command line and attach it to gdb:

$ gdb
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
0x0000fff0 in ?? ()
(gdb) cont

the console title will change from "QEMU [Stopped]" to "QEMU", but nothing appears on the screen...

At this point I'd like to use gdb to poke around but probably need some symbols. Andrei Warkentin's blog here looks helpful but his source ( is out of date... I'm getting:
/home/duanev/efi/edk2/AppPkg/AppPkg.dsc(...): error 4000: Instance of library class [DxeServicesTableLib] is not found
in [/home/duanev/efi/edk2/AppPkg/Applications/GdbSyms/GdbSyms.inf] [X64]
consumed by module [/home/duanev/efi/edk2/AppPkg/Applications/GdbSyms/GdbSyms.inf]

when I drop his GdbSyms into AppPkg. I don't understand the build environment yet -AppPkg/Applications/Sockets/WebServer also usesDxeServicesTableLib but compiles fine and I can't find any differences between the .inf files that might cause this. :P

On Fri, Mar 15, 2013 at 8:18 PM, Laszlo Ersek <> wrote:
On 03/11/13 21:11, Duane Voth wrote:
> I can run OVMF without networking using qemu with no problem, and I have
> qemu with networking (using taps and a bridge) working properly, but
> when I use the network enabled OVMF.fd I get the blank vga console with
> no screen or network activity. OVFM.fd builds with no errors using:
>> build -D NETWORK_ENABLE -p OvmfPkg\OvmfPkgX64.dsc
> I copy OVMF.fd to bios.bin, but no OvmfVideo.rom file is created or
> available as suggested by the online sourceforge docs
> (
> or the edk2\OvmfPkg\README.txt file, so I'm using the same
> CirrusLogic5446.rom that works with the non-networking OVMF.
> My qemu is version 1.2.0 (yes that is a 1 for the major version!) and
> I've tried it with the -no-kvm switch also.
> Any other ideas?

The following seems to work for me:

- At svn r14210, install the E1000 driver (md5sums):

20d90d53c40b892167b7d72d6f113e45 Intel3.5/EFIX64/E3507X2.EFI
8d2e6c53426e8adaf1525c8048f5f07f Intel3.5/EFI32/E3507E2.EFI

- build it with

OvmfPkg/ -p OvmfPkg/OvmfPkgX64.dsc \
-a X64 -b DEBUG -t GCC44 -n 4

- the output is "Build/OvmfX64/DEBUG_GCC44/FV/OVMF.fd"

- I tested with qemu v1.2.0 (built from git):

qemu-img create harddisk.img 10G

qemu-system-x86_64 -S -monitor stdio -enable-kvm -m 1024 \
-netdev user,id=net0 \
-device e1000,netdev=net0 \
-bios OVMF.fd \
-vga cirrus \
-debugcon file:debug.log \
-global isa-debugcon.iobase=0x402 \
-drive file=harddisk.img \
-display vnc=localhost:0

- once the "(qemu)" monitor prompt appears, start a vnc viewer from
another terminal:

vncviewer localhost:0

- when the guest window appears, type into the qemu monitor:


This should boot OVMF. The firmware knows about the e1000 card; for
example there's a (failing & long) attempt to PXE-boot, and then
"ipconfig" in the shell can report the MAC. The logfile is full of messages.


Obsolete [ruling] classes do not voluntarily abandon the stage of history. - Joseph Stalin

Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. - Albert Einstein