Update to commit 4e03af8 for qemu 2.5
And enable IPv6 for bug 1280318
This commit is contained in:
parent
cfc2ed2341
commit
8f1455cda5
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ noarch/
|
||||
.build*.log
|
||||
*.src.rpm
|
||||
/ipxe-20150407-gitdc795b9f.tar.xz
|
||||
/ipxe-20150821-git4e03af8.tar.xz
|
||||
|
27
0001-build-Enable-IPv6-for-in-qemu-config.patch
Normal file
27
0001-build-Enable-IPv6-for-in-qemu-config.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 59b02541da838ce9a0246178deb3c377109589bb Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <59b02541da838ce9a0246178deb3c377109589bb.1447780013.git.crobinso@redhat.com>
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Tue, 17 Nov 2015 11:56:06 -0500
|
||||
Subject: [PATCH ipxe] build: Enable IPv6 for in qemu config
|
||||
|
||||
---
|
||||
A fedora user requested it here:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1280318
|
||||
|
||||
src/config/qemu/general.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/config/qemu/general.h b/src/config/qemu/general.h
|
||||
index 30f60d3..61d0ad4 100644
|
||||
--- a/src/config/qemu/general.h
|
||||
+++ b/src/config/qemu/general.h
|
||||
@@ -8,3 +8,6 @@
|
||||
|
||||
/* Work around missing EFI_PXE_BASE_CODE_PROTOCOL */
|
||||
#define EFI_DOWNGRADE_UX
|
||||
+
|
||||
+/* Enable IPv6 */
|
||||
+#define NET_PROTO_IPV6
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,51 +0,0 @@
|
||||
From b12b1b620fffc89e86af3879a945e7ffaa7c141d Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Fri, 10 Apr 2015 21:53:21 +0200
|
||||
Subject: [PATCH] [virtio] Downgrade per-iobuf debug messages to DBGC2
|
||||
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Signed-off-by: Michael Brown <mcb30@ipxe.org>
|
||||
---
|
||||
src/drivers/net/virtio-net.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/drivers/net/virtio-net.c b/src/drivers/net/virtio-net.c
|
||||
index 8b67d9d..533ccb0 100644
|
||||
--- a/src/drivers/net/virtio-net.c
|
||||
+++ b/src/drivers/net/virtio-net.c
|
||||
@@ -131,8 +131,8 @@ static void virtnet_enqueue_iob ( struct net_device *netdev,
|
||||
},
|
||||
};
|
||||
|
||||
- DBGC ( virtnet, "VIRTIO-NET %p enqueuing iobuf %p on vq %d\n",
|
||||
- virtnet, iobuf, vq_idx );
|
||||
+ DBGC2 ( virtnet, "VIRTIO-NET %p enqueuing iobuf %p on vq %d\n",
|
||||
+ virtnet, iobuf, vq_idx );
|
||||
|
||||
vring_add_buf ( vq, list, out, in, iobuf, 0 );
|
||||
vring_kick ( virtnet->ioaddr, vq, 1 );
|
||||
@@ -256,8 +256,8 @@ static void virtnet_process_tx_packets ( struct net_device *netdev ) {
|
||||
while ( vring_more_used ( tx_vq ) ) {
|
||||
struct io_buffer *iobuf = vring_get_buf ( tx_vq, NULL );
|
||||
|
||||
- DBGC ( virtnet, "VIRTIO-NET %p tx complete iobuf %p\n",
|
||||
- virtnet, iobuf );
|
||||
+ DBGC2 ( virtnet, "VIRTIO-NET %p tx complete iobuf %p\n",
|
||||
+ virtnet, iobuf );
|
||||
|
||||
netdev_tx_complete ( netdev, iobuf );
|
||||
}
|
||||
@@ -283,8 +283,8 @@ static void virtnet_process_rx_packets ( struct net_device *netdev ) {
|
||||
iob_unput ( iobuf, RX_BUF_SIZE );
|
||||
iob_put ( iobuf, len - sizeof ( struct virtio_net_hdr ) );
|
||||
|
||||
- DBGC ( virtnet, "VIRTIO-NET %p rx complete iobuf %p len %zd\n",
|
||||
- virtnet, iobuf, iob_len ( iobuf ) );
|
||||
+ DBGC2 ( virtnet, "VIRTIO-NET %p rx complete iobuf %p len %zd\n",
|
||||
+ virtnet, iobuf, iob_len ( iobuf ) );
|
||||
|
||||
/* Pass completed packet to the network stack */
|
||||
netdev_rx ( netdev, iobuf );
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,79 +0,0 @@
|
||||
From 755d2b8f6be681a2e620534b237471b75f28ed8c Mon Sep 17 00:00:00 2001
|
||||
From: Michael Brown <mcb30@ipxe.org>
|
||||
Date: Mon, 13 Apr 2015 12:06:59 +0100
|
||||
Subject: [PATCH] [efi] Ensure drivers are disconnected when ExitBootServices()
|
||||
is called
|
||||
|
||||
We hook the UEFI ExitBootServices() event and use it to trigger a call
|
||||
to shutdown_boot(). This does not automatically cause drivers to be
|
||||
disconnected from their devices, since device enumeration is now
|
||||
handled by the UEFI core rather than by iPXE. (Under the old and
|
||||
dubiously compatible device model, iPXE used to perform its own device
|
||||
enumeration and so the call to shutdown_boot() would indeed have
|
||||
caused drivers to be disconnected.)
|
||||
|
||||
Fix by replicating parts of the dummy "EFI root device" from
|
||||
efiprefix.c to efidrvprefix.c, so that the call to shutdown_boot()
|
||||
will call efi_driver_disconnect_all().
|
||||
|
||||
Originally-fixed-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Tested-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Signed-off-by: Michael Brown <mcb30@ipxe.org>
|
||||
---
|
||||
src/arch/x86/prefix/efidrvprefix.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
diff --git a/src/arch/x86/prefix/efidrvprefix.c b/src/arch/x86/prefix/efidrvprefix.c
|
||||
index 3daefd0..4fbb19f 100644
|
||||
--- a/src/arch/x86/prefix/efidrvprefix.c
|
||||
+++ b/src/arch/x86/prefix/efidrvprefix.c
|
||||
@@ -21,7 +21,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <ipxe/init.h>
|
||||
+#include <ipxe/device.h>
|
||||
#include <ipxe/efi/efi.h>
|
||||
+#include <ipxe/efi/efi_driver.h>
|
||||
|
||||
/**
|
||||
* EFI entry point
|
||||
@@ -44,3 +46,36 @@ EFI_STATUS EFIAPI _efidrv_start ( EFI_HANDLE image_handle,
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+/**
|
||||
+ * Probe EFI root bus
|
||||
+ *
|
||||
+ * @v rootdev EFI root device
|
||||
+ */
|
||||
+static int efi_probe ( struct root_device *rootdev __unused ) {
|
||||
+
|
||||
+ /* Do nothing */
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Remove EFI root bus
|
||||
+ *
|
||||
+ * @v rootdev EFI root device
|
||||
+ */
|
||||
+static void efi_remove ( struct root_device *rootdev __unused ) {
|
||||
+
|
||||
+ efi_driver_disconnect_all();
|
||||
+}
|
||||
+
|
||||
+/** EFI root device driver */
|
||||
+static struct root_driver efi_root_driver = {
|
||||
+ .probe = efi_probe,
|
||||
+ .remove = efi_remove,
|
||||
+};
|
||||
+
|
||||
+/** EFI root device */
|
||||
+struct root_device efi_root_device __root_device = {
|
||||
+ .dev = { .name = "EFI" },
|
||||
+ .driver = &efi_root_driver,
|
||||
+};
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,10 +0,0 @@
|
||||
/* Requested here: https://bugzilla.redhat.com/show_bug.cgi?id=842932 */
|
||||
#undef BANNER_TIMEOUT
|
||||
#define BANNER_TIMEOUT 30
|
||||
#undef ROM_BANNER_TIMEOUT
|
||||
#define ROM_BANNER_TIMEOUT 0
|
||||
|
||||
/* Requested here: https://bugzilla.redhat.com/show_bug.cgi?id=1058176 */
|
||||
#define IMAGE_PNG
|
||||
|
||||
#undef EFI_PROTO_LOAD_FILE
|
42
ipxe.spec
42
ipxe.spec
@ -34,12 +34,12 @@
|
||||
#
|
||||
# And then change these two:
|
||||
|
||||
%global date 20150407
|
||||
%global hash dc795b9f
|
||||
%global date 20150821
|
||||
%global hash 4e03af8
|
||||
|
||||
Name: ipxe
|
||||
Version: %{date}
|
||||
Release: 3.git%{hash}%{?dist}
|
||||
Release: 1.git%{hash}%{?dist}
|
||||
Summary: A network boot loader
|
||||
|
||||
Group: System Environment/Base
|
||||
@ -47,16 +47,10 @@ License: GPLv2 with additional permissions and BSD
|
||||
URL: http://ipxe.org/
|
||||
|
||||
Source0: %{name}-%{version}-git%{hash}.tar.xz
|
||||
Source2: config.local.general.h
|
||||
|
||||
# From upstream commit b12b1b620fffc89e86af3879a945e7ffaa7c141d
|
||||
Patch0001: 0001-virtio-Downgrade-per-iobuf-debug-messages-to-DBGC2.patch
|
||||
# From upstream commit 755d2b8f6be681a2e620534b237471b75f28ed8c
|
||||
Patch0002: 0002-efi-Ensure-drivers-are-disconnected-when-ExitBootSer.patch
|
||||
|
||||
# From QEMU
|
||||
Patch1001: qemu-0001-efi_snp-improve-compliance-with-the-EFI_SIMPLE_NETWO.patch
|
||||
Patch1002: qemu-0002-efi-make-load-file-protocol-optional.patch
|
||||
# Enable IPv6 for qemu's config
|
||||
# Sent upstream: http://lists.ipxe.org/pipermail/ipxe-devel/2015-November/004494.html
|
||||
Patch0001: 0001-build-Enable-IPv6-for-in-qemu-config.patch
|
||||
|
||||
%ifarch %{buildarches}
|
||||
BuildRequires: perl
|
||||
@ -122,25 +116,11 @@ DNS, HTTP, iSCSI, etc.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}-git%{hash}
|
||||
|
||||
# From upstream
|
||||
%patch0001 -p1
|
||||
%patch0002 -p1
|
||||
# From QEMU
|
||||
%patch1001 -p1
|
||||
%patch1002 -p1
|
||||
|
||||
# Apply local configuration tweaks
|
||||
cp -a %{SOURCE2} src/config/local/general.h
|
||||
|
||||
%build
|
||||
%ifarch %{buildarches}
|
||||
# The src/Makefile.housekeeping relies on .git/index existing
|
||||
# but since we pass GITVERSION= to make, we don't actally need
|
||||
# it to be the real deal, so just touch it to let the build pass
|
||||
mkdir .git
|
||||
touch .git/index
|
||||
|
||||
ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin
|
||||
cd src
|
||||
# ath9k drivers are too big for an Option ROM
|
||||
@ -155,9 +135,9 @@ make %{?_smp_mflags} \
|
||||
# build roms with efi support for qemu
|
||||
mkdir bin-combined
|
||||
for rom in %qemuroms; do
|
||||
make NO_WERROR=1 V=1 GITVERSION=%{hash} CROSS_COMPILE=x86_64-linux-gnu- bin/${rom}.rom
|
||||
make NO_WERROR=1 V=1 GITVERSION=%{hash} CROSS_COMPILE=x86_64-linux-gnu- bin-i386-efi/${rom}.efidrv
|
||||
make NO_WERROR=1 V=1 GITVERSION=%{hash} CROSS_COMPILE=x86_64-linux-gnu- bin-x86_64-efi/${rom}.efidrv
|
||||
make NO_WERROR=1 V=1 CONFIG=qemu GITVERSION=%{hash} CROSS_COMPILE=x86_64-linux-gnu- bin/${rom}.rom
|
||||
make NO_WERROR=1 V=1 CONFIG=qemu GITVERSION=%{hash} CROSS_COMPILE=x86_64-linux-gnu- bin-i386-efi/${rom}.efidrv
|
||||
make NO_WERROR=1 V=1 CONFIG=qemu GITVERSION=%{hash} CROSS_COMPILE=x86_64-linux-gnu- bin-x86_64-efi/${rom}.efidrv
|
||||
vid="0x${rom%%????}"
|
||||
did="0x${rom#????}"
|
||||
EfiRom -f "$vid" -i "$did" --pci23 \
|
||||
@ -223,6 +203,10 @@ done
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 17 2015 Cole Robinson <crobinso@redhat.com> - 20150821-1.git4e03af8
|
||||
- Update to commit 4e03af8 for qemu 2.5
|
||||
- Enable IPv6 (bug 1280318)
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20150407-3.gitdc795b9f
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
|
@ -1,160 +0,0 @@
|
||||
From 9e870d92035ec7ca946e702236bfe104e964f8c6 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Thu, 22 Jan 2015 22:05:35 +0100
|
||||
Subject: [PATCH 1/2] efi_snp: improve compliance with the
|
||||
EFI_SIMPLE_NETWORK_PROTOCOL spec
|
||||
|
||||
The efi_snp interface dates back to 2008, when the GetStatus() interface
|
||||
must have been seriously under-specified. The UEFI Specification (2.4)
|
||||
specifies EFI_SIMPLE_NETWORK_PROTOCOL in detail however. In short:
|
||||
|
||||
- the Transmit() interface is assumed to link (not copy) the SNP client's
|
||||
buffer and return at once (without blocking), taking ownership of the
|
||||
buffer temporarily;
|
||||
|
||||
- the GetStatus() interface releases one of the completed (transmitted or
|
||||
internally copied) buffers back to the caller. If there are several
|
||||
completed buffers, it is unspecified which one is returned.
|
||||
|
||||
The EFI build of the grub boot loader actually verifies the buffer address
|
||||
returned by GetStatus(), therefore in efi_snp we must at least fake the
|
||||
queueing of client buffers. This patch doesn't track client buffers
|
||||
together with the internally queued io_buffer structures, we consider a
|
||||
client buffer recyclable as soon as we make a deep copy of it and queue
|
||||
the copy internally.
|
||||
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
---
|
||||
src/include/ipxe/efi/efi_snp.h | 6 +++++
|
||||
src/interface/efi/efi_snp.c | 54 ++++++++++++++++++++++++------------------
|
||||
2 files changed, 37 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/include/ipxe/efi/efi_snp.h b/src/include/ipxe/efi/efi_snp.h
|
||||
index a18bced..863a81a 100644
|
||||
--- a/src/include/ipxe/efi/efi_snp.h
|
||||
+++ b/src/include/ipxe/efi/efi_snp.h
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <ipxe/efi/Protocol/HiiDatabase.h>
|
||||
#include <ipxe/efi/Protocol/LoadFile.h>
|
||||
|
||||
+#define MAX_RECYCLED_TXBUFS 64
|
||||
+
|
||||
/** An SNP device */
|
||||
struct efi_snp_device {
|
||||
/** List of SNP devices */
|
||||
@@ -44,6 +46,10 @@ struct efi_snp_device {
|
||||
* Used in order to generate TX completions.
|
||||
*/
|
||||
unsigned int tx_count_txbufs;
|
||||
+ /** Holds the addresses of recycled SNP client buffers; a ring. */
|
||||
+ void *tx_recycled_txbufs[MAX_RECYCLED_TXBUFS];
|
||||
+ /** The index of the first buffer to return to the SNP client. */
|
||||
+ unsigned tx_first_txbuf;
|
||||
/** Outstanding RX packet count (via "interrupt status") */
|
||||
unsigned int rx_count_interrupts;
|
||||
/** Outstanding RX packet count (via WaitForPacket event) */
|
||||
diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c
|
||||
index 67fba34..c21af33 100644
|
||||
--- a/src/interface/efi/efi_snp.c
|
||||
+++ b/src/interface/efi/efi_snp.c
|
||||
@@ -68,6 +68,14 @@ static void efi_snp_set_state ( struct efi_snp_device *snpdev ) {
|
||||
*/
|
||||
mode->State = EfiSimpleNetworkInitialized;
|
||||
}
|
||||
+
|
||||
+ if (mode->State != EfiSimpleNetworkInitialized) {
|
||||
+ /* Zero the number of recycled buffers when moving to any other
|
||||
+ * state than Initialized. Transmit() and GetStatus() are only
|
||||
+ * valid in Initialized.
|
||||
+ */
|
||||
+ snpdev->tx_count_txbufs = 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -446,12 +454,12 @@ efi_snp_nvdata ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, BOOLEAN read,
|
||||
*
|
||||
* @v snp SNP interface
|
||||
* @v interrupts Interrupt status, or NULL
|
||||
- * @v txbufs Recycled transmit buffer address, or NULL
|
||||
+ * @v txbuf Recycled transmit buffer address, or NULL
|
||||
* @ret efirc EFI status code
|
||||
*/
|
||||
static EFI_STATUS EFIAPI
|
||||
efi_snp_get_status ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||
- UINT32 *interrupts, VOID **txbufs ) {
|
||||
+ UINT32 *interrupts, VOID **txbuf ) {
|
||||
struct efi_snp_device *snpdev =
|
||||
container_of ( snp, struct efi_snp_device, snp );
|
||||
|
||||
@@ -485,30 +493,22 @@ efi_snp_get_status ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||
DBGC2 ( snpdev, " INTS:%02x", *interrupts );
|
||||
}
|
||||
|
||||
- /* TX completions. It would be possible to design a more
|
||||
- * idiotic scheme for this, but it would be a challenge.
|
||||
- * According to the UEFI header file, txbufs will be filled in
|
||||
- * with a list of "recycled transmit buffers" (i.e. completed
|
||||
- * TX buffers). Observant readers may care to note that
|
||||
- * *txbufs is a void pointer. Precisely how a list of
|
||||
- * completed transmit buffers is meant to be represented as an
|
||||
- * array of voids is left as an exercise for the reader.
|
||||
- *
|
||||
- * The only users of this interface (MnpDxe/MnpIo.c and
|
||||
- * PxeBcDxe/Bc.c within the EFI dev kit) both just poll until
|
||||
- * seeing a non-NULL result return in txbufs. This is valid
|
||||
- * provided that they do not ever attempt to transmit more
|
||||
- * than one packet concurrently (and that TX never times out).
|
||||
+ /* In efi_snp_transmit() we enqueue packets by copying them (not by
|
||||
+ * linking them), hence we can recycle them immediately to the SNP
|
||||
+ * client.
|
||||
*/
|
||||
- if ( txbufs ) {
|
||||
- if ( snpdev->tx_count_txbufs &&
|
||||
- list_empty ( &snpdev->netdev->tx_queue ) ) {
|
||||
- *txbufs = "Which idiot designed this API?";
|
||||
+ if ( txbuf ) {
|
||||
+ if ( snpdev->tx_count_txbufs ) {
|
||||
+ unsigned first;
|
||||
+
|
||||
+ first = snpdev->tx_first_txbuf++;
|
||||
+ snpdev->tx_first_txbuf %= MAX_RECYCLED_TXBUFS;
|
||||
+ *txbuf = snpdev->tx_recycled_txbufs[first];
|
||||
snpdev->tx_count_txbufs--;
|
||||
} else {
|
||||
- *txbufs = NULL;
|
||||
+ *txbuf = NULL;
|
||||
}
|
||||
- DBGC2 ( snpdev, " TX:%s", ( *txbufs ? "some" : "none" ) );
|
||||
+ DBGC2 ( snpdev, " TX:%p", *txbuf );
|
||||
}
|
||||
|
||||
DBGC2 ( snpdev, "\n" );
|
||||
@@ -560,6 +560,12 @@ efi_snp_transmit ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||
if ( efi_snp_claimed )
|
||||
return EFI_NOT_READY;
|
||||
|
||||
+ assert ( snpdev->tx_count_txbufs <= MAX_RECYCLED_TXBUFS );
|
||||
+ if ( snpdev->tx_count_txbufs == MAX_RECYCLED_TXBUFS ) {
|
||||
+ /* No room to recycle another buffer. */
|
||||
+ return EFI_NOT_READY;
|
||||
+ }
|
||||
+
|
||||
/* Sanity checks */
|
||||
if ( ll_header_len ) {
|
||||
if ( ll_header_len != ll_protocol->ll_header_len ) {
|
||||
@@ -626,7 +632,9 @@ efi_snp_transmit ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||
|
||||
/* Record transmission as outstanding */
|
||||
snpdev->tx_count_interrupts++;
|
||||
- snpdev->tx_count_txbufs++;
|
||||
+ snpdev->tx_recycled_txbufs[(snpdev->tx_first_txbuf +
|
||||
+ snpdev->tx_count_txbufs++
|
||||
+ ) % MAX_RECYCLED_TXBUFS] = data;
|
||||
|
||||
return 0;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,102 +0,0 @@
|
||||
From 2daea2b8dd2c504a4f76a6b0b67bd3c4a2957fc7 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Tue, 10 Feb 2015 14:28:09 +0100
|
||||
Subject: [PATCH 2/2] [efi] make load file protocol optional
|
||||
|
||||
The load file implementation added by commit
|
||||
c7c3d839fc9120aee28de9aabe452dc85ad91502 doesn't support loading
|
||||
arbitrary files from the tftp server, so efi applications trying
|
||||
to do exactly that fail to boot:
|
||||
|
||||
iPXE 1.0.0+ (17ace) -- Open Source Network Boot Firmware -- http://ipxe.org
|
||||
Features: HTTP DNS TFTP EFI Menu
|
||||
|
||||
net0: 52:54:00:47:d3:07 using virtio-net on PCI00:09.0 (open)
|
||||
[Link:up, TX:0 TXE:0 RX:13 RXE:2]
|
||||
[RXE: 2 x "Operation not supported (http://ipxe.org/3c086083)"]
|
||||
Configuring (net0 52:54:00:47:d3:07)...... ok
|
||||
net0: 192.168.132.93/255.255.255.0 gw 192.168.132.1
|
||||
Next server: 192.168.132.1
|
||||
Filename: shim.efi
|
||||
tftp://192.168.132.1/shim.efi... ok
|
||||
Failed to open grubx64.efi - Not Found
|
||||
Failed to load image grubx64.efi: Not Found
|
||||
Failed to open MokManager.efi - Not Found
|
||||
Failed to load image MokManager.efi: Not Found
|
||||
Could not boot image: Error 0x7f04828e (http://ipxe.org/7f04828e)
|
||||
|
||||
Boot Failed. EFI Network
|
||||
|
||||
This is not acceptable for qemu. efi pxe configurations which work
|
||||
just fine with real hardware must work with qemu virtual machines too.
|
||||
|
||||
This patch adds a config option for the load file protocol
|
||||
implementation, to allow it being disabled, so we can turn it off
|
||||
for the pxe roms shipped with qemu.
|
||||
|
||||
The default for the new option maintains current behavior, i.e.
|
||||
load file is enabled unless you override it in config/local/general.h
|
||||
|
||||
Suggested-by: Laszlo Ersek <lersek@redhat.com>
|
||||
|
||||
See discussion here:
|
||||
http://lists.ipxe.org/pipermail/ipxe-devel/2015-February/003979.html
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
---
|
||||
src/config/general.h | 6 ++++++
|
||||
src/interface/efi/efi_snp.c | 5 +++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/src/config/general.h b/src/config/general.h
|
||||
index 65c1f85..8c91601 100644
|
||||
--- a/src/config/general.h
|
||||
+++ b/src/config/general.h
|
||||
@@ -142,6 +142,12 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
#undef NONPNP_HOOK_INT19 /* Hook INT19 on non-PnP BIOSes */
|
||||
|
||||
/*
|
||||
+ * EFI specific options
|
||||
+ *
|
||||
+ */
|
||||
+#define EFI_PROTO_LOAD_FILE /* register LOAD_FILE protocol */
|
||||
+
|
||||
+/*
|
||||
* Error message tables to include
|
||||
*
|
||||
*/
|
||||
diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c
|
||||
index c21af33..85f4fa0 100644
|
||||
--- a/src/interface/efi/efi_snp.c
|
||||
+++ b/src/interface/efi/efi_snp.c
|
||||
@@ -34,6 +34,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#include <ipxe/efi/efi_utils.h>
|
||||
#include <ipxe/efi/efi_snp.h>
|
||||
#include <usr/autoboot.h>
|
||||
+#include <config/general.h>
|
||||
|
||||
/** List of SNP devices */
|
||||
static LIST_HEAD ( efi_snp_devices );
|
||||
@@ -1033,7 +1034,9 @@ static int efi_snp_probe ( struct net_device *netdev ) {
|
||||
&efi_nii_protocol_guid, &snpdev->nii,
|
||||
&efi_nii31_protocol_guid, &snpdev->nii,
|
||||
&efi_component_name2_protocol_guid, &snpdev->name2,
|
||||
+#ifdef EFI_PROTO_LOAD_FILE
|
||||
&efi_load_file_protocol_guid, &snpdev->load_file,
|
||||
+#endif
|
||||
NULL ) ) != 0 ) {
|
||||
rc = -EEFI ( efirc );
|
||||
DBGC ( snpdev, "SNPDEV %p could not install protocols: "
|
||||
@@ -1082,7 +1085,9 @@ static int efi_snp_probe ( struct net_device *netdev ) {
|
||||
&efi_nii_protocol_guid, &snpdev->nii,
|
||||
&efi_nii31_protocol_guid, &snpdev->nii,
|
||||
&efi_component_name2_protocol_guid, &snpdev->name2,
|
||||
+#ifdef EFI_PROTO_LOAD_FILE
|
||||
&efi_load_file_protocol_guid, &snpdev->load_file,
|
||||
+#endif
|
||||
NULL );
|
||||
err_install_protocol_interface:
|
||||
free ( snpdev->path );
|
||||
--
|
||||
1.8.3.1
|
||||
|
Loading…
Reference in New Issue
Block a user