On Mon, Mar 9, 2015 at 2:03 PM, JCA <[email protected]> wrote:
> On Mon, Mar 9, 2015 at 1:53 PM, Laszlo Ersek <[email protected]> wrote:
>> On 03/09/15 20:36, JCA wrote:
>>> On Mon, Mar 9, 2015 at 1:15 PM, Laszlo Ersek <[email protected]> wrote:
>>>> On 03/09/15 19:56, JCA wrote:
>>>>> On Mon, Mar 9, 2015 at 12:38 PM, Laszlo Ersek <[email protected]> wrote:
>>>>
>>>>>> (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'
>>>>
>>>> That's because "virtio-blk-device" means the MMIO (memory mapped) virtio
>>>> transport variant, and instead of that, on the i386 target, you need the
>>>> PCI variant. Use "virtio-blk-pci" please.
>>>>
>>>>>
>>>>> 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.
>>>>
>>>> Option 2 should suffice for quick & dirty testing, if you can get
>>>> virtio-blk-pci working.
>>>
>>> Thanks for your help again. Embarrassingly though, still no cigar here:
>>>
>>> qemu-system-i386: -device virtio-blk-pci,drive: Property
>>> 'virtio-blk-device.drive' can't find value 'on'
>>>
>>> This keeping exactly the same command line as above, but replacing
>>> virtio-blk-device with virtio-blk-pci.
>>
>> What qemu are you using? My guess is "ancient". That command line works
>> for me.
>
> It is QEMU 2.2.0 under Slackware 14.1. A Google search on the error
> returned has yet to yield anything really useful.
Well, I got it to work, but I do not know how
orthodox/proper/efficient my solution is. Here it is, in case it can
be use of others, and also in case anyone can propose something
better.
Since I am running QEMU under Linux, I went ahead and created a FAT32
partition on some external device (actually, a USB stick.) After that
partition got mounted in my Linux system at mount point /media/HD, I
created a symbolic link as follows:
ln -s /media/HD .
in the directory from which I am invoking QEMU. From that directory I did
qemu-system-i386 -pflash ./bios.bin -drive file=fat:./HD
This starts my OVMF instance successfully, and after a minute or two I
get the UEFI command line prompt. At this prompt I type
fs0:
and this gives me access to the FAT32 partition above. In this
partition I have a file named S1.efi, which I created using the EDK II
infrastructure. From the UEFI command line I simply do
S1
and the (very simple) UEFI application S1 gets executed all right.
One hurdle overcome :-)
------------------------------------------------------------------------------
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