experimental qemu-devel port update, please test!

Bakul Shah bakul at bitblocks.com
Mon Apr 23 19:56:07 UTC 2007


> >> I found and fixed one bug in src/core/osloader.c (in
> >> etherboot-5.4.3 code) which allows me to get a little bit
> >> further.  If anyone wants to play with this more, I can send
> >> them my changes.
> > 
> >  You may want to post those on the qemu list...
> 
> On this list too, since I'm not subscribed to the qemu list (nor are 
> many people on this list I'm guessing).

The change I am talking about is in etherboot-5.4.3 code, not
in qemu.  I tried upgrading ports/net/etherboot 5.4.3 but my
effort is not in a usable state right now.

Download etherboot-5.4.3.tar.bz2, untar it, cd to its top dir
and apply the following patch -- this is the only critical
change.  And I borrowed other changes from the current
net/etherboot port.

If you can compile rtl8139.zrom fine, run qemu with
an explicit -option-rom argument and make sure you use
model=rtl8139.

it will use dhcp to get an address, load freebsd's
pxeboot and jump to it at which point everything halts.

May be etherboot does too much.  Since freebsd does pxeboot
on a real machine, ideally the exact same pxeboot should work
with etherboot.

--- src/core/osloader.c.orig	Sat Feb 24 06:44:59 2007
+++ src/core/osloader.c	Sat Apr 21 21:50:37 2007
@@ -344,6 +344,8 @@
 	}
 #endif /* defined(ELF_IMAGE) && defined(IMAGE_MULTIBOOT) */
 
+	if (!len) goto done;
+
 	/* Either len is greater or the skip is greater */
 	if ((skip_sectors > (len >> 9)) ||
 		((skip_sectors == (len >> 9)) && (skip_bytes >= (len & 0x1ff)))) {
@@ -355,6 +357,7 @@
 		skip_bytes -= len;
 	}
 	else {
+	done:
 		len -= (skip_sectors << 9) + skip_bytes;
 		data += (skip_sectors << 9) + skip_bytes;
 		skip_sectors = os_download(data, len, eof);


More information about the freebsd-emulation mailing list