From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 3/5] Add Makefile rules to build nic rom binaries with efi support
Date: Mon, 4 Mar 2013 11:07:31 +0100 [thread overview]
Message-ID: <1362391653-22287-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1362391653-22287-1-git-send-email-kraxel@redhat.com>
"make -C roms efirom" will build rom binaries with EFI support.
They are composed from three images: legacy bios, efi ia32
and efi x64. So netbooting via SeaBIOS will continue to work
like it does today, and additionally we get network support
for EFI. This target needs the EfiRom utility (shipped with
edk2) somewhere in the $PATH.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
roms/Makefile | 49 +++++++++++++++++++++++++++++++++++++------------
1 file changed, 37 insertions(+), 12 deletions(-)
diff --git a/roms/Makefile b/roms/Makefile
index be33652..3dc5609 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -2,18 +2,29 @@
vgabios_variants := stdvga cirrus vmware qxl
pxerom_variants := e1000 eepro100 ne2k_pci pcnet rtl8139 virtio
-pxe-rom-e1000 : VID := 8086
-pxe-rom-e1000 : DID := 100e
-pxe-rom-eepro100 : VID := 8086
-pxe-rom-eepro100 : DID := 1209
-pxe-rom-ne2k_pci : VID := 1050
-pxe-rom-ne2k_pci : DID := 0940
-pxe-rom-pcnet : VID := 1022
-pxe-rom-pcnet : DID := 2000
-pxe-rom-rtl8139 : VID := 10ec
-pxe-rom-rtl8139 : DID := 8139
-pxe-rom-virtio : VID := 1af4
-pxe-rom-virtio : DID := 1000
+pxe-rom-e1000 efi-rom-e1000 : VID := 8086
+pxe-rom-e1000 efi-rom-e1000 : DID := 100e
+pxe-rom-eepro100 efi-rom-eepro100 : VID := 8086
+pxe-rom-eepro100 efi-rom-eepro100 : DID := 1209
+pxe-rom-ne2k_pci efi-rom-ne2k_pci : VID := 1050
+pxe-rom-ne2k_pci efi-rom-ne2k_pci : DID := 0940
+pxe-rom-pcnet efi-rom-pcnet : VID := 1022
+pxe-rom-pcnet efi-rom-pcnet : DID := 2000
+pxe-rom-rtl8139 efi-rom-rtl8139 : VID := 10ec
+pxe-rom-rtl8139 efi-rom-rtl8139 : DID := 8139
+pxe-rom-virtio efi-rom-virtio : VID := 1af4
+pxe-rom-virtio efi-rom-virtio : DID := 1000
+
+#
+# EfiRom utility is shipped with edk2 / tianocore, in BaseTools/
+#
+# We need that to combine multiple images (legacy bios,
+# efi ia32, efi x64) into a single rom binary.
+#
+# We try to find it in the path. You can also pass the location on
+# the command line, i.e. "make EFIROM=/path/to/EfiRom efirom"
+#
+EFIROM ?= $(shell which EfiRom 2>/dev/null)
default:
@echo "nothing is build by default"
@@ -22,6 +33,8 @@ default:
@echo " seavgabios -- update vgabios binaries (seabios)"
@echo " lgplvgabios -- update vgabios binaries (lgpl)"
@echo " pxerom -- update nic roms (bios only)"
+ @echo " efirom -- update nic roms (bios+efi, this needs"
+ @echo " the EfiRom utility from edk2 / tianocore)"
bios: config.seabios
sh configure-seabios.sh $<
@@ -47,3 +60,15 @@ pxerom: $(patsubst %,pxe-rom-%,$(pxerom_variants))
pxe-rom-%:
make -C ipxe/src bin/$(VID)$(DID).rom
cp ipxe/src/bin/$(VID)$(DID).rom ../pc-bios/pxe-$*.rom
+
+efirom: $(patsubst %,efi-rom-%,$(pxerom_variants))
+
+efi-rom-%:
+ make -C ipxe/src bin/$(VID)$(DID).rom
+ make -C ipxe/src bin-i386-efi/$(VID)$(DID).efidrv
+ make -C ipxe/src bin-x86_64-efi/$(VID)$(DID).efidrv
+ $(EFIROM) -f "0x$(VID)" -i "0x$(DID)" -l 0x02 \
+ -b ipxe/src/bin/$(VID)$(DID).rom \
+ -ec ipxe/src/bin-i386-efi/$(VID)$(DID).efidrv \
+ -ec ipxe/src/bin-x86_64-efi/$(VID)$(DID).efidrv \
+ -o ../pc-bios/efi-$*.rom
--
1.7.9.7
next prev parent reply other threads:[~2013-03-04 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 10:07 [Qemu-devel] [PATCH 0/5] ipxe: add efi support Gerd Hoffmann
2013-03-04 10:07 ` [Qemu-devel] [PATCH 1/5] Add Makefile rules to build nic rom binaries Gerd Hoffmann
2013-03-04 10:07 ` [Qemu-devel] [PATCH 2/5] Update ipxe submodule to latest master Gerd Hoffmann
2013-03-04 10:07 ` Gerd Hoffmann [this message]
2013-03-04 10:07 ` [Qemu-devel] [PATCH 4/5] Add efi rom binaries Gerd Hoffmann
2013-03-04 10:07 ` [Qemu-devel] [PATCH 5/5] Switch to efi-enabled nic roms by default Gerd Hoffmann
2013-03-04 13:33 ` [Qemu-devel] [PATCH 0/5] ipxe: add efi support Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362391653-22287-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).