xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julian Pidancet <julian.pidancet@gmail.com>
To: xen-devel@lists.xensource.com
Cc: Ian.Campbell@citrix.com, Julian Pidancet <julian.pidancet@gmail.com>
Subject: [PATCH v2 2/3] firmware: Use mkhex from hvmloader directory for etherboot ROMs
Date: Fri, 10 Feb 2012 01:53:43 +0000	[thread overview]
Message-ID: <04bca2da081cc7cc2d1649c0d2d4d93af2bdccc2.1328837585.git.julian.pidancet@gmail.com> (raw)
In-Reply-To: <cover.1328837585.git.julian.pidancet@gmail.com>

To remain consistent with how other ROMs are built into hvmloader,
call mkhex on etherboot ROMs from the hvmloader directory, instead of
the etherboot directory. In other words, eb-roms.h is not used any more.

Introduce ETHERBOOT_NICS config option to choose which ROMs should be
built (kept rtl8139 and 8086100e per default as before).

Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
---
 Config.mk                         |    2 ++
 tools/firmware/etherboot/Config   |    2 --
 tools/firmware/etherboot/Makefile |   13 +++----------
 tools/firmware/hvmloader/Makefile |    9 ++++++---
 4 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/Config.mk b/Config.mk
index e2dc4b9..42508b8 100644
--- a/Config.mk
+++ b/Config.mk
@@ -222,6 +222,8 @@ endif
 QEMU_UPSTREAM_REVISION ?= master
 SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.1
 
+ETHERBOOT_NICS ?= rtl8139 8086100e
+
 # Specify which qemu-dm to use. This may be `ioemu' to use the old
 # Mercurial in-tree version, or a local directory, or a git URL.
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
diff --git a/tools/firmware/etherboot/Config b/tools/firmware/etherboot/Config
index 143914f..69963b9 100644
--- a/tools/firmware/etherboot/Config
+++ b/tools/firmware/etherboot/Config
@@ -1,6 +1,4 @@
 
-NICS = rtl8139 8086100e
-
 CFLAGS += -UPXE_DHCP_STRICT
 CFLAGS += -DPXE_DHCP_STRICT
 
diff --git a/tools/firmware/etherboot/Makefile b/tools/firmware/etherboot/Makefile
index c09140e..a195888 100644
--- a/tools/firmware/etherboot/Makefile
+++ b/tools/firmware/etherboot/Makefile
@@ -17,23 +17,16 @@ IPXE_TARBALL_URL := $(XEN_EXTFILES_URL)/ipxe-git-$(IPXE_GIT_TAG).tar.gz
 D=ipxe
 T=ipxe.tar.gz
 
-ROMS = $(addprefix $D/src/bin/, $(addsuffix .rom, $(NICS)))
+ROMS = $(addprefix $D/src/bin/, $(addsuffix .rom, $(ETHERBOOT_NICS)))
 
 .NOTPARALLEL:
 
 .PHONY: all
-all: eb-roms.h
+all: $(ROMS)
 
 %.rom: $D/src/arch/i386/Makefile
 	$(MAKE) -C $D/src bin/$(*F).rom
 
-eb-roms.h.new: $(ROMS)
-	cat $^ | ../hvmloader/mkhex etherboot >$@
-
-eb-roms.h: Config
-	$(MAKE) NO_WERROR=1 $@.new
-	mv -f $@.new $@
-
 $T:
 	if ! wget -O _$T $(IPXE_TARBALL_URL); then \
 		$(GIT) clone $(IPXE_GIT_URL) $D.git; \
@@ -56,7 +49,7 @@ $D/src/bin/NIC: $D/src/arch/i386/Makefile
 
 .PHONY: clean
 clean:
-	rm -rf $D $D.git *~ eb-roms.h _$T $T
+	rm -rf $D $D.git *~ _$T $T
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile
index e82146a..1ea32db 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -58,6 +58,8 @@ else
 CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.bin
 endif
 
+ETHERBOOT_ROMS := $(addprefix ../etherboot/ipxe/src/bin/, $(addsuffix .rom, $(ETHERBOOT_NICS)))
+
 .PHONY: all
 all: subdirs-all
 	$(MAKE) hvmloader
@@ -70,7 +72,7 @@ hvmloader: $(OBJS) acpi/acpi.a
 	$(OBJCOPY) hvmloader.tmp hvmloader
 	rm -f hvmloader.tmp
 
-roms.inc: $(ROMBIOS_ROM) $(SEABIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) ../etherboot/eb-roms.h
+roms.inc: $(ROMBIOS_ROM) $(SEABIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) $(ETHERBOOT_ROMS)
 	echo "/* Autogenerated file. DO NOT EDIT */" > $@.new
 
 ifneq ($(ROMBIOS_ROM),)
@@ -95,10 +97,11 @@ ifneq ($(CIRRUSVGA_ROM),)
 	sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
 	echo "#endif" >> $@.new
 endif
-
+ifneq ($(ETHERBOOT_ROMS),)
 	echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> $@.new
-	cat ../etherboot/eb-roms.h >> $@.new
+	sh ./mkhex etherboot $(ETHERBOOT_ROMS) >> $@.new
 	echo "#endif" >> $@.new
+endif
 
 	mv $@.new $@
 
-- 
Julian Pidancet

  parent reply	other threads:[~2012-02-10  1:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10  1:53 [PATCH v2 0/3] hvmloader: Make ROM dependencies optional Julian Pidancet
2012-02-10  1:53 ` [PATCH v2 1/3] hvmloader: Only compile 32bitbios_support.c when rombios is enabled Julian Pidancet
2012-02-10  9:03   ` Ian Campbell
2012-02-10  1:53 ` Julian Pidancet [this message]
2012-02-10  9:07   ` [PATCH v2 2/3] firmware: Use mkhex from hvmloader directory for etherboot ROMs Ian Campbell
2012-02-10  1:53 ` [PATCH v2 3/3] firmware: Introduce CONFIG_ROMBIOS and CONFIG_SEABIOS options Julian Pidancet
2012-02-10  9:16   ` Ian Campbell

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=04bca2da081cc7cc2d1649c0d2d4d93af2bdccc2.1328837585.git.julian.pidancet@gmail.com \
    --to=julian.pidancet@gmail.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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).