All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] shim: don't let build modify shim.config
@ 2018-04-19 10:30 Juergen Gross
  2018-04-19 10:47 ` Jan Beulich
       [not found] ` <5AD873C502000078001BCA14@suse.com>
  0 siblings, 2 replies; 10+ messages in thread
From: Juergen Gross @ 2018-04-19 10:30 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, sstabellini, wei.liu2, George.Dunlap,
	andrew.cooper3, ian.jackson, tim, julien.grall, jbeulich

Currently building the shim will modify shim.config in case some config
option was added or modified in the hypervisor.

Avoid that by copying shim.config to an intermediate file instead.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
Not sure whether its worth to take that for 4.11.
In case the maintainers think it should be part of 4.11 then LGTM.
A followup patch should reduce the config options specified in
shim.config.
---
 .gitignore                      |  1 +
 tools/firmware/xen-dir/Makefile | 13 +++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/.gitignore b/.gitignore
index 7004349d5a..e7983859ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -161,6 +161,7 @@ tools/firmware/xen-dir/linkfarm.stamp*
 tools/firmware/xen-dir/xen-root
 tools/firmware/xen-dir/xen-shim
 tools/firmware/xen-dir/xen-shim-syms
+tools/firmware/xen-dir/xen-shim.config
 tools/flask/utils/flask-getenforce
 tools/flask/utils/flask-get-bool
 tools/flask/utils/flask-loadpolicy
diff --git a/tools/firmware/xen-dir/Makefile b/tools/firmware/xen-dir/Makefile
index a7e69ae777..666cb10018 100644
--- a/tools/firmware/xen-dir/Makefile
+++ b/tools/firmware/xen-dir/Makefile
@@ -41,21 +41,22 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
 $(D): linkfarm.stamp
 	$(MAKE) -C $(D)/xen distclean
 
-.PHONY: shim-%config
-shim-%config: $(D) FORCE
-	$(MAKE) -C $(D)/xen $*config \
+xen-shim.config: shim.config
+	cp $< $@
+	$(MAKE) -C $(D)/xen olddefconfig \
 		XEN_CONFIG_EXPERT=y \
-		KCONFIG_CONFIG=$(CURDIR)/shim.config
+		KCONFIG_CONFIG=$(CURDIR)/xen-shim.config
 
-xen-shim: $(D) shim-olddefconfig
+xen-shim: $(D) xen-shim.config
 	$(MAKE) -C $(D)/xen build \
 		XEN_CONFIG_EXPERT=y \
-		KCONFIG_CONFIG=$(CURDIR)/shim.config
+		KCONFIG_CONFIG=$(CURDIR)/xen-shim.config
 	ln -sf $(D)/xen/xen $@
 	ln -sf $(D)/xen/xen-syms $@-syms
 
 .PHONY: distclean clean
 distclean clean:
 	rm -f xen-shim xen-shim-syms *.old
+	rm -f xen-shim.config
 	rm -rf $(D)
 	rm -f linkfarm.stamp*
-- 
2.13.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-04-20  9:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 10:30 [PATCH] shim: don't let build modify shim.config Juergen Gross
2018-04-19 10:47 ` Jan Beulich
     [not found] ` <5AD873C502000078001BCA14@suse.com>
2018-04-19 11:01   ` Juergen Gross
2018-04-19 14:54     ` Wei Liu
2018-04-19 16:14       ` Andrew Cooper
2018-04-19 16:22         ` Wei Liu
2018-04-20  9:28           ` Roger Pau Monné
2018-04-20  9:33             ` Andrew Cooper
2018-04-20  9:47               ` Juergen Gross
2018-04-20  6:40         ` Juergen Gross

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.