From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLpfT-0002OT-E9 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 22:07:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLpfP-0002O1-Ll for qemu-devel@nongnu.org; Fri, 18 Dec 2009 22:07:43 -0500 Received: from [199.232.76.173] (port=56394 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLpfP-0002Ny-IY for qemu-devel@nongnu.org; Fri, 18 Dec 2009 22:07:39 -0500 Received: from mail-gx0-f223.google.com ([209.85.217.223]:60107) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLpfP-000884-F9 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 22:07:39 -0500 Received: by gxk23 with SMTP id 23so3904234gxk.2 for ; Fri, 18 Dec 2009 19:07:38 -0800 (PST) Message-ID: <4B2C4374.4060701@codemonkey.ws> Date: Fri, 18 Dec 2009 21:07:32 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [SeaBIOS] [PATCH 0/8] option rom loading overhaul. References: <1261134074-11795-1-git-send-email-kraxel@redhat.com> <4B2B9340.1020001@codemonkey.ws> <4B2BAF25.2070800@redhat.com> <4B2BB0E8.7060907@codemonkey.ws> <4B2BB5E0.9010701@redhat.com> <4B2BB7E6.9040705@codemonkey.ws> <20091219014842.GA17615@morn.localdomain> In-Reply-To: <20091219014842.GA17615@morn.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: Gerd Hoffmann , qemu-devel@nongnu.org Kevin O'Connor wrote: > On Fri, Dec 18, 2009 at 11:12:06AM -0600, Anthony Liguori wrote: > >> BTW, the following works: >> >> sudo x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img -snapshot >> -m 512 -net nic,model=rtl8139,macaddr=56:54:32:12:34:56 -net >> nic,model=e1000,macaddr=56:54:32:12:34:57 -net >> nic,model=virtio,macaddr=56:54:32:12:34:58 -boot menu=on -net tap >> -kernel /boot/vmlinuz-2.6.27.38-170.2.113.fc10.x86_64 -initrd >> /boot/initrd-2.6.27.38-170.2.113.fc10.x86_64.img -append "ro" >> >> Using the F12 menu, I can select any of the three option roms and it >> network boots or I can select 'Legacy Option ROM' and it will boot from >> -kernel. That is exceedingly cool :-) We just need to give it a proper >> PnP header and advertise it as a BEV device so that we can give it a >> meaningful name. >> > > As it stands now, if the command line has -kernel, it will always boot > from the kernel regardless of the item one selects in the boot menu. > Ah, I spoke too soon, you are indeed correct. I was wondering how that could possibly work :-) > (Legacy roms are always run - the boot menu only selects the order wrt > BCVs.) However, converting the rom into a BEV will indeed make it > selectable. > > Also, to see a truly interesting boot menu - try appending something > like the following to the command line: > > -fda disk.dsk -fdb odin1440.img -hdd dos-drivec -cdrom ../../iso/win-vista.iso -drive file=../../iso/win-xp.iso,media=cdrom,index=1 > > SeaBIOS allows one to boot from either floppy, any harddrive, and any > cdrom. > Very cool stuff! We just have to figure out a way to let a user specify which of these devices they want to boot from via the qemu command line. Maybe something that encodes a bus type and then an address on the bus or something like that. I think that works okay for PCI and IDE buses. For fw_cfg roms, I guess we could also just expose the filename as the address on the fw_cfg bus. Regards, Anthony Liguori