All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
	sstabellini@kernel.org, wei.liu2@citrix.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, tim@xen.org, julien.grall@arm.com,
	jbeulich@suse.com
Subject: [PATCH] shim: don't let build modify shim.config
Date: Thu, 19 Apr 2018 12:30:24 +0200	[thread overview]
Message-ID: <20180419103024.14731-1-jgross@suse.com> (raw)

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

             reply	other threads:[~2018-04-19 10:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 10:30 Juergen Gross [this message]
2018-04-19 10:47 ` [PATCH] shim: don't let build modify shim.config 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

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=20180419103024.14731-1-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 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.