On Mon, Mar 9, 2015 at 12:38 PM, Laszlo Ersek <[email protected]> wrote:
> On 03/09/15 16:57, JCA wrote:
>> I have just started looking into UEFI in general, and EDK II and OVMF
>> in particular, so I may be asking trivial, even annoying, questions.
>> Please bear with me and my current level of ignorance.
>>
>> I have been able to install EDK II in my Linux box, and I have used it
>> to build an instance of the OVMF which I can successfully launch under
>> QEMU. I also have some UEFI applications, built with the EDK II
>> environment, which I would like to run under OVMF. I am sure that how
>> to do so must be documented somewhere, but I have so far been unable
>> to find anything directly relevant. Can anybody in this forum provide
>> any pointers to documentation on how to run UEFI applications, as
>> created under the EDK II environment, under OVMF?
>
> I'd try one of the following two:
>
> (1) create a virtual disk image with "qemu-img", and use the "guestfish"
> utility to format it as FAT32 and to copy your UEFI application binary
> to it. Then launch qemu with this image attached to it as an IDE drive
> or a virtio-blk drive or a virtio-scsi scsi-hd.
>
> Instead of "guestfish", you can populate the image with "mtools" as
> well. See the "-i" option in the mtools manual.
>
> (2) A variant of the above. Create an empty directory on the host, and
> copy your UEFI application binary there. Then use the following qemu
> options:
>
> -drive file=fat:/host/directory/name,id=drive0,if=none,format=raw \
> -device virtio-blk-device,drive=drive0
>
> In either case, after entering the UEFI shell, you should be able to
> navigate to the binary and run it.
Second option, here is what I am getting after appending the options
that you mentioned to my invocation of qemu:
qemu-system-i386: -device virtio-blk-device,drive=drive0: No
'virtio-bus' bus found for device 'virtio-blk-device'
Actually, this is the command line that I am using:
qemu-system-i386 -pflash ./bios.bin -drive
file=fat:./hda-contents,id=drive0,if=none,format=raw -device
virtio-blk-device,drive=drive0
Removing all the options after hda-contents my OVMF starts correctly,
and I can get to the UEFI shell without issues.
I have not been able to try the first option yet, for I don't have the
guestfish utility. I'll try and get it.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel