* [PATCH v1] tools/firmware: reproducible seabios build
@ 2018-07-13 11:04 Olaf Hering
2018-07-18 9:39 ` Wei Liu
0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2018-07-13 11:04 UTC (permalink / raw)
To: Ian Jackson, Wei Liu, xen-devel; +Cc: Olaf Hering
The buildsystem of seabios always includes the current time and the
hostname into the resulting binary. To avoid that, it is required to
have a file '.version' in the toplevel directory of seabios-dir-remote.
And it is required to pass EXTRAVERSION= to make because its toplevel
Makefile does not take EXTRAVERSION from environment.
Adjust the code to create a '.version' file with fixed content.
Adjust the code to pass EXTRAVERSION down to make.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
--
After commit 1233d253a4 ("firmware/seabios: fix build on systems with non GNU
toolchains") this change is now hopefully non-controversial.
---
tools/firmware/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index 842b48c3d3..b11f1c5970 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -30,6 +30,8 @@ seabios-dir:
GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir
cp seabios-config seabios-dir/.config;
$(MAKE) -C seabios-dir olddefconfig CC=$(SEABIOSCC) LD=$(SEABIOSLD)
+ rm -f seabios-dir/.version
+ echo '$(SEABIOS_UPSTREAM_REVISION)' > seabios-dir/.version
.PHONY: all
all: $(SUBDIRS-y)
@@ -130,4 +132,4 @@ subtree-force-update-all:
$(MAKE) ovmf-dir-force-update
subdir-all-seabios-dir: seabios-dir
- $(MAKE) -C $< CC=$(SEABIOSCC) LD=$(SEABIOSLD) PYTHON=$(PYTHON) all;
+ $(MAKE) -C $< CC=$(SEABIOSCC) LD=$(SEABIOSLD) PYTHON=$(PYTHON) EXTRAVERSION="-Xen" all;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v1] tools/firmware: reproducible seabios build
2018-07-13 11:04 [PATCH v1] tools/firmware: reproducible seabios build Olaf Hering
@ 2018-07-18 9:39 ` Wei Liu
2018-07-18 9:58 ` Olaf Hering
0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2018-07-18 9:39 UTC (permalink / raw)
To: Olaf Hering; +Cc: Wei Liu, Ian Jackson, xen-devel
On Fri, Jul 13, 2018 at 01:04:42PM +0200, Olaf Hering wrote:
> The buildsystem of seabios always includes the current time and the
> hostname into the resulting binary. To avoid that, it is required to
> have a file '.version' in the toplevel directory of seabios-dir-remote.
> And it is required to pass EXTRAVERSION= to make because its toplevel
> Makefile does not take EXTRAVERSION from environment.
>
> Adjust the code to create a '.version' file with fixed content.
> Adjust the code to pass EXTRAVERSION down to make.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> --
>
> After commit 1233d253a4 ("firmware/seabios: fix build on systems with non GNU
> toolchains") this change is now hopefully non-controversial.
> ---
> tools/firmware/Makefile | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
> index 842b48c3d3..b11f1c5970 100644
> --- a/tools/firmware/Makefile
> +++ b/tools/firmware/Makefile
> @@ -30,6 +30,8 @@ seabios-dir:
> GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir
> cp seabios-config seabios-dir/.config;
> $(MAKE) -C seabios-dir olddefconfig CC=$(SEABIOSCC) LD=$(SEABIOSLD)
> + rm -f seabios-dir/.version
There is no need to rm -f here because the following > will clear its
content anyway.
> + echo '$(SEABIOS_UPSTREAM_REVISION)' > seabios-dir/.version
>
> .PHONY: all
> all: $(SUBDIRS-y)
> @@ -130,4 +132,4 @@ subtree-force-update-all:
> $(MAKE) ovmf-dir-force-update
>
> subdir-all-seabios-dir: seabios-dir
> - $(MAKE) -C $< CC=$(SEABIOSCC) LD=$(SEABIOSLD) PYTHON=$(PYTHON) all;
> + $(MAKE) -C $< CC=$(SEABIOSCC) LD=$(SEABIOSLD) PYTHON=$(PYTHON) EXTRAVERSION="-Xen" all;
I would like you to define a SEABIOS_EXTRAVERSION somewhere (along side
SEABIOSCC etc) instead of hardcoding -Xen here.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v1] tools/firmware: reproducible seabios build
2018-07-18 9:39 ` Wei Liu
@ 2018-07-18 9:58 ` Olaf Hering
2018-07-18 9:59 ` Wei Liu
0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2018-07-18 9:58 UTC (permalink / raw)
To: Wei Liu; +Cc: xen-devel, Ian Jackson
[-- Attachment #1.1: Type: text/plain, Size: 337 bytes --]
Am Wed, 18 Jul 2018 10:39:31 +0100
schrieb Wei Liu <wei.liu2@citrix.com>:
> > + rm -f seabios-dir/.version
> There is no need to rm -f here because the following > will clear its
> content anyway.
The content of seabios-dir is coming from upstream, ".version" might be a symlink. Thats why I added this rm command.
Olaf
[-- Attachment #1.2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] tools/firmware: reproducible seabios build
2018-07-18 9:58 ` Olaf Hering
@ 2018-07-18 9:59 ` Wei Liu
0 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2018-07-18 9:59 UTC (permalink / raw)
To: Olaf Hering; +Cc: Ian Jackson, Wei Liu, xen-devel
On Wed, Jul 18, 2018 at 11:58:21AM +0200, Olaf Hering wrote:
> Am Wed, 18 Jul 2018 10:39:31 +0100
> schrieb Wei Liu <wei.liu2@citrix.com>:
>
> > > + rm -f seabios-dir/.version
> > There is no need to rm -f here because the following > will clear its
> > content anyway.
>
>
> The content of seabios-dir is coming from upstream, ".version" might be a symlink. Thats why I added this rm command.
Oh, OK. Please leave the rm -f as-is then.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-18 9:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-13 11:04 [PATCH v1] tools/firmware: reproducible seabios build Olaf Hering
2018-07-18 9:39 ` Wei Liu
2018-07-18 9:58 ` Olaf Hering
2018-07-18 9:59 ` Wei Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.