From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8DAB71A1E0E for ; Wed, 5 Oct 2016 08:28:48 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C99BC008346; Wed, 5 Oct 2016 15:28:47 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-104.phx2.redhat.com [10.3.116.104]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u95FSkLO010654; Wed, 5 Oct 2016 11:28:47 -0400 To: spam collector References: <1825038664.87486514.1475464584880.JavaMail.zimbra@cableone.net> <9f2b0b8c-9bfb-dd73-f7cb-cd6df775c237@redhat.com> <812341546.91963700.1475549145141.JavaMail.zimbra@cableone.net> <5c54ce38-9f0c-ac8d-c926-570ebc3dd720@redhat.com> <1747186652.93714260.1475599157436.JavaMail.zimbra@cableone.net> <94a76bd7-732c-c8f6-b8be-8175dd061b86@redhat.com> <1410853764.96270806.1475635626572.JavaMail.zimbra@cableone.net> Cc: edk2-devel@ml01.01.org From: Laszlo Ersek Message-ID: <280e3403-1821-396e-5243-54b770dcb01a@redhat.com> Date: Wed, 5 Oct 2016 17:28:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1410853764.96270806.1475635626572.JavaMail.zimbra@cableone.net> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 05 Oct 2016 15:28:47 +0000 (UTC) Subject: Re: OVMF.fd and placement of EfiBootServicesData X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 15:28:48 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 10/05/16 04:47, spam collector wrote: > > ----- Original Message ----- >> From: "Laszlo Ersek" >> To: "spam collector" >> Cc: edk2-devel@ml01.01.org >> Sent: Tuesday, October 4, 2016 10:22:34 AM >> Subject: Re: [edk2] OVMF.fd and placement of EfiBootServicesData >> * The first stage improvement is the following command line: >> >> qemu-system-x86_64 -pflash OVMF.fd > > This did not work either with or without the NvVars file present. I think I'll need a more complete issue riport then -- what is your exact QEMU command line, and what OVMF binary are you using? >> * The second stage improvement is the following command line: >> >> # create the virtual machine's private variable store from the >> # pristine variable store template, if the former doesn't exist yet, >> # or has been lost for some reason >> if ! [ -e GUEST_1_VARS.fd ]; then >> cp OVMF_VARS.fd GUEST_1_VARS.fd >> fi >> >> qemu-system-x86_64 \ >> -drive if=pflash,format=raw,unit=0,readonly,file=OVMF_CODE.fd \ >> -drive if=pflash,format=raw,unit=1,file=GUEST_1_VARS.fd \ >> ... >> >> In this case, the OVMF_CODE.fd and OVMF_VARS.fd are used separately. >> (You can find both files under the Build directory; plus Gerd Hoffmann's >> RPM files also package them.) > > For the life of me I could not find any directory called "Build". The Build directory exists in the source edk2 tree, if you build the firmware yourself. > I did find a few RPM files and one of them contained: > OVMF_CODE-pure-efi.fd > and > OVMF_VARS-pure-efi.fd Yes, they are from Gerd's "edk2.git-ovmf-ia32" package (since you mention IA32), from , and they are recommended to use. > However, no matter the emulation (32- or 64-bit), neither worked and > would get as far as printing the '.' just before the > .FLOPPY failed > .CD-ROM failed > etc. > lines and go no further. These messages mean the following: you are running QEMU in a default configuration, with a default NIC, a default floppy, a default CD-ROM, and so on. OVMF automatically generates boot options for these (in some unspecified order), and then tries to boot those options. Specifically the dots with the long delay mean that OVMF is trying to PXE boot from your virtual NIC. There are two ways around this: - First, if you have a dedicated device you want to boot off of, use the "bootindex" property I mentioned earlier. - Specifically, if you want to boot the UEFI shell like this, then use "/usr/share/edk2.git/ovmf-ia32/UefiShell.iso" with an ide-cd or scsi-cd device. - Second, you can pass "-nodefaults" to QEMU. This option will prevent the automatic creation of the NIC, the floppy, the CD-ROM -- and a lot more actually, such as keyboard, mouse, VGA too --; in turn OVMF should not create boot options for these devices either, and should drop you directly to the shell. Assuming of course that your firmware binary includes the shell in the first place. If it doesn't, then you can only use "UefiShell.iso". I recommend trying the following (32-bit command line), with Gerd's package: FW_BIN=/usr/share/edk2.git/ovmf-ia32/OVMF_CODE-pure-efi.fd VARS_TMPL=/usr/share/edk2.git/ovmf-ia32/OVMF_VARS-pure-efi.fd VARS=myvars.fd SHELL_ISO=/usr/share/edk2.git/ovmf-ia32/UefiShell.iso if ! [ -e "$VARS" ]; then cp -v -- "$VARS_TMPL" "$VARS" fi qemu-system-i386 \ -m 2048 \ -machine accel=kvm \ \ -drive if=pflash,format=raw,unit=0,readonly,file="$FW_BIN" \ -drive if=pflash,format=raw,unit=1,file="$VARS" \ \ -device virtio-scsi-pci,id=scsi0 \ -drive if=none,format=raw,readonly,file="$SHELL_ISO",id=shell \ -device scsi-cd,bus=scsi0.0,drive=shell,bootindex=1 \ \ -chardev file,id=debugfile,path=ovmf.log \ -device isa-debugcon,iobase=0x402,chardev=debugfile This will boot the shell for you, and even save the OVMF debug log in the file "ovmf.log". > would you please specify a specific URL that contains the two files > you speak of, whether it be a listing of those files, a .gz file, or > even a .rpm file. If you GNU/Linux distro of choice is RPM-based, simply follow the instrutions at . Otherwise, download the "edk2.git-ovmf-ia32" or "edk2.git-ovmf-x64" RPM file (as needed) from , and extract it with: rpm2cpio FILENAME | pax -r -v The extracted files you want are: usr/share/edk2.git/ovmf-*/OVMF_CODE-pure-efi.fd usr/share/edk2.git/ovmf-*/OVMF_VARS-pure-efi.fd usr/share/edk2.git/ovmf-*/UefiShell.iso Thanks Laszlo