From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8WdJ-0004CU-RR for qemu-devel@nongnu.org; Wed, 29 Jan 2014 10:01:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8WdC-0005MT-Ns for qemu-devel@nongnu.org; Wed, 29 Jan 2014 10:00:53 -0500 Received: from cantor2.suse.de ([195.135.220.15]:35994 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8WdC-0005MM-2d for qemu-devel@nongnu.org; Wed, 29 Jan 2014 10:00:46 -0500 Message-ID: <52E9179B.4020603@suse.de> Date: Wed, 29 Jan 2014 16:00:43 +0100 From: Alexander Graf MIME-Version: 1.0 References: <20140121181101.GB1323@ERROL.INI.CMU.EDU> <20140121183851.GA26382@redhat.com> <20140124164608.GB1293@ERROL.INI.CMU.EDU> <20140125000945.GA10357@crash.ini.cmu.edu> <6FAEE645-799D-4535-B568-75AB5E4D206C@suse.de> <20140128204023.GC29329@ERROL.INI.CMU.EDU> <20140129030736.GA23361@crash.ini.cmu.edu> <20140129145342.GD29329@ERROL.INI.CMU.EDU> In-Reply-To: <20140129145342.GD29329@ERROL.INI.CMU.EDU> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] osx bootloader List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gabriel L. Somlo" Cc: "qemu-devel@nongnu.org" On 01/29/2014 03:53 PM, Gabriel L. Somlo wrote: > On Wed, Jan 29, 2014 at 12:29:17PM +0100, BALATON Zoltan wrote: >> I've also found this: >> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OvmfPkg >> which might be what we need for using Apple's boot.efi but I don't >> know how ready is it and if it works with OS X. > I managed to boot OVMF following their wiki; It seems to work with kvm > enabled, but not with -M q35. My current command line is: > > bin/qemu-system-x86_64 -enable-kvm -m 2048 -cpu core2duo \ > -usb -device usb-kbd -device usb-mouse \ > -device isa-applesmc,osk="..." \ > -hda mlion_hdd.img > > after having replaced bios.bin and vgabios-cirrus.bin with the OVMF > files. > > It obviously fails to boot OS X (now THAT would have been a surprise!) > but at least it detects the hard disk: > > fs0 :HardDisk - Alias hd12a1 blk0 > PciRoot(0x0)/Pci(0x1,0x1)/Ata(Primary,Master,0x0)/HD(1,GPT,BA0DB2B5-2270-4749-B794-BC005BEC1863,0x28,0x64000) > > I poked around the "boot maintenance manager" a bit, and "boot from > file" looked promising -- I was hoping to navigate straight to > /System/Library/CoreServices/boot.efi and just hit "Enter", but was > only able to see an empty folder hierarchy: > > EFI/ > APPLE/ > EXTENSIONS/ > .Trashes/ > 501/ > > So I guess I have a bit more RTFM ahead of me. Maybe I can find a way > to copy boot.efi over to the actual EFI partition, which I assume is > the only one I can explore with OVMF from the entire disk image... You will need an EFI HFS+ driver (look at the refind pointer) because boot.efi will use EFI callbacks to read the kernel and kext cache. Alex