hvmloader: add knob for fixed SMBIOS date string

To allow reproducible builds of hvmloader introduce a make variable
SMBIOS_REL_DATE=mm/dd/yyyy to provide a fixed date string. Without this
change the hvmloader binary changes with every rebuild.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Jan Beulich <jbeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Olaf Hering authored and Ian Campbell committed 2015-04-02 10:46:10 +01:00
1 parent f5da952dbd
commit b9245b75bb
2 files changed
+5 -1

No files matched your search

+1
View File
@@ -216,6 +216,7 @@ into the binaries. To allow reproducible builds the following variables
can be used to provide fixed timestamps in the expected format.
XEN_BUILD_DATE=<output of date(1)>
XEN_BUILD_TIME=hh:mm:ss
SMBIOS_REL_DATE=mm/dd/yyyy
The following variables can be used to tweak some aspects of the
hypervisor build.
+4 -1
View File
@@ -26,6 +26,9 @@ SUBDIRS := acpi
# The HVM loader is started in 32-bit mode at the address below:
LOADADDR = 0x100000
# SMBIOS spec requires format mm/dd/yyyy
SMBIOS_REL_DATE ?= $(shell date +%m/%d/%Y)
CFLAGS += $(CFLAGS_xeninclude)
OBJS = hvmloader.o mp_tables.o util.o smbios.o
@@ -88,7 +91,7 @@ all: subdirs-all
$(MAKE) hvmloader
ovmf.o rombios.o seabios.o hvmloader.o: roms.inc
smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(shell date +%m/%d/%Y)\""
smbios.o: CFLAGS += -D__SMBIOS_DATE__="$(SMBIOS_REL_DATE)"
hvmloader: $(OBJS) acpi/acpi.a
$(LD) $(LDFLAGS_DIRECT) -N -Ttext $(LOADADDR) -o hvmloader.tmp $^
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.