[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] shim: don't let build modify shim.config



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@xxxxxxxx>
---
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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.