From owner-freebsd-emulation@FreeBSD.ORG Tue Apr 24 12:08:42 2007 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A54E16A400 for ; Tue, 24 Apr 2007 12:08:42 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 4A35D13C455 for ; Tue, 24 Apr 2007 12:08:41 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from neutrino.centtech.com (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l3OC8bGU031065; Tue, 24 Apr 2007 07:08:37 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <462DF345.8000606@freebsd.org> Date: Tue, 24 Apr 2007 07:08:37 -0500 From: Eric Anderson User-Agent: Thunderbird 2.0.0.0 (X11/20070420) MIME-Version: 1.0 To: Kostik Belousov References: <462ADE46.3080304@freebsd.org> <20070423192309.E77F65B3B@mail.bitblocks.com> <20070424112231.GC2441@deviant.kiev.zoral.com.ua> In-Reply-To: <20070424112231.GC2441@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/3154/Tue Apr 24 01:13:03 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd-emulation@freebsd.org Subject: Re: experimental qemu-devel port update, please test! X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2007 12:08:42 -0000 On 04/24/07 06:22, Kostik Belousov wrote: > On Mon, Apr 23, 2007 at 12:23:09PM -0700, Bakul Shah wrote: >>>>> 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); > > You may try the following patch for btx: > http://people.freebsd.org/~kib/realbtx/realbtx.2.patch > or take the pxeboot built from the patched source at > http://people.freebsd.org/~kib/realbtx/pxeboot > > Please, handle the patch with care - do not install /boot/boot2 or > /boot/loader built with patch on the machine without ability to boot > from removable media, since the changes are in earliest stage and were not > tested exhaustive. I can confirm this works like a charm!!!! I had to send pxelinux.0 to the QEMU system first, and then have it load the pxeboot file you created above (I used the binary). It boots my QEMU NFS root system perfectly.. AWESOME!!!! Anything else you want to test? Thanks! Eric