diff mbox

tools/firmware: pass EXTRAVERSION to seabios build

Message ID 20170526124105.9567-1-olaf@aepfle.de (mailing list archive)
State New, archived
Headers show

Commit Message

Olaf Hering May 26, 2017, 12:41 p.m. UTC
Having a fixed version string in the seabios binary is cumbersome:
 - it is required to write something to '.version' in the toplevel
   directory of seabios-dir-remove.
 - it is required to pass EXTRAVERSION= to make.

The latter is impossible without this change. For some reason an 'export
EXTRAVERSION=something' prior to 'make tools' is not sufficient. It has
to be passed in as cmdline option to make.

Add a make variable SEABIOS_EXTRAVERSION= and pass it to make.
Allow changing the default via the environment.
Document the new variable in INSTALL.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 INSTALL                 | 2 ++
 tools/firmware/Makefile | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Comments

Ian Jackson May 26, 2017, 2:04 p.m. UTC | #1
Olaf Hering writes ("[PATCH] tools/firmware: pass EXTRAVERSION to seabios build"):
> Having a fixed version string in the seabios binary is cumbersome:
>  - it is required to write something to '.version' in the toplevel
>    directory of seabios-dir-remove.
>  - it is required to pass EXTRAVERSION= to make.

I can't quite parse this, but:

> The latter is impossible without this change. For some reason an 'export
> EXTRAVERSION=something' prior to 'make tools' is not sufficient. It has
> to be passed in as cmdline option to make.

This seems like a real problem which should be improved.  But maybe we
should use Xen's EXTRAVERSION by default ?

> +SEABIOS_EXTRAVERSION ?= "-prebuilt.xen.org"

I think this is a rather odd default value.  This image is precisely
not prebuild, for example.  Also I don't think a domain name is really
the right thing here.

Thanks,
Ian.
diff mbox

Patch

diff --git a/INSTALL b/INSTALL
index 58359da380..96245505d7 100644
--- a/INSTALL
+++ b/INSTALL
@@ -279,6 +279,8 @@  CHECKPOLICY=
 Use clang instead of GCC.
 clang=y
 
+The version string of the built-in seabios can be adjusted with:
+SEABIOS_EXTRAVERSION=
 
 Systemd support
 ===============
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index 8562f547bc..fcc9754b08 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -5,6 +5,8 @@  include $(XEN_ROOT)/tools/Rules.mk
 TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
 
+SEABIOS_EXTRAVERSION ?= "-prebuilt.xen.org"
+
 SUBDIRS-y :=
 SUBDIRS-$(CONFIG_OVMF) += ovmf-dir
 SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
@@ -35,7 +37,7 @@  ifeq ($(CONFIG_ROMBIOS),y)
 	false ; \
 	fi
 endif
-	$(MAKE) $(LD32BIT-y) CC=$(CC) PYTHON=$(PYTHON) subdirs-$@
+	$(MAKE) $(LD32BIT-y) CC=$(CC) PYTHON=$(PYTHON) EXTRAVERSION=$(SEABIOS_EXTRAVERSION) subdirs-$@
 
 
 .PHONY: install