shim: don't let build modify shim.config
PATCH v2 1/1 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.
---
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.
--- tools/firmware/xen-dir/Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
tools/firmware/xen-dir/Makefile +6 -8
@@ -41,16 +41,14 @@ 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_CONFIG_EXPERT=y \ - KCONFIG_CONFIG=$(CURDIR)/shim.config +$(D)/xen/.config: shim.config $(D) + cp $< $@ + $(MAKE) -C $(D)/xen olddefconfig \ + XEN_CONFIG_EXPERT=y -xen-shim: $(D) shim-olddefconfig +xen-shim: $(D) $(D)/xen/.config $(MAKE) -C $(D)/xen build \ - XEN_CONFIG_EXPERT=y \ - KCONFIG_CONFIG=$(CURDIR)/shim.config + XEN_CONFIG_EXPERT=y ln -sf $(D)/xen/xen $@ ln -sf $(D)/xen/xen-syms $@-syms
Signature · 7 lines
2.13.6 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 44
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 20.04.18 at 08:40, <[email protected]> wrote:
tools/firmware/xen-dir/Makefile +1
-5@@ -41,16 +41,14 @@ 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_CONFIG_EXPERT=y \ - KCONFIG_CONFIG=$(CURDIR)/shim.config +$(D)/xen/.config: shim.config $(D)
Do you need the $(D)/ prefix here, ...
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 46
Quoted 2 lines
tools/firmware/xen-dir/Makefile +2
-0+ cp $< $@ + $(MAKE) -C $(D)/xen olddefconfig \
... here, and ...
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 49
Quoted 4 lines
tools/firmware/xen-dir/Makefile +2
-1+ XEN_CONFIG_EXPERT=y -xen-shim: $(D) shim-olddefconfig +xen-shim: $(D) $(D)/xen/.config
... here? In the middle case using $(@D) might be better anyway. Other than that LGTM, but please consider removing the line continuations from the make invocations.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 21 lines · Jan Beulich
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 44
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 20.04.18 at 08:40, <[email protected]> wrote:
tools/firmware/xen-dir/Makefile +1
-5@@ -41,16 +41,14 @@ 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_CONFIG_EXPERT=y \ - KCONFIG_CONFIG=$(CURDIR)/shim.config +$(D)/xen/.config: shim.config $(D)Do you need the $(D)/ prefix here, ...
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 46
Quoted 2 lines
tools/firmware/xen-dir/Makefile +2
-0+ cp $< $@ + $(MAKE) -C $(D)/xen olddefconfig \... here, and ...
Quoted 8 lines
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 49
Quoted 4 lines
tools/firmware/xen-dir/Makefile +2
-1+ XEN_CONFIG_EXPERT=y -xen-shim: $(D) shim-olddefconfig +xen-shim: $(D) $(D)/xen/.config... here? In the middle case using $(@D) might be better anyway. Other than that LGTM, but please consider removing the line continuations from the make invocations.
You are aware of the line further up:
D=xen-root
So $(D)/xen is just the path to the hypervisor part of the shim. This has nothing to do with $(@D) or other variants of the make automatic variables.
Maybe another patch renaming D to SHIMSRC wouldn't be too bad...
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 32 lines
Quoted 1 line
Quoted 1 line · On 20.04.18 at 14:13, <[email protected]> wrote:
Quoted 21 lines · Jan Beulich
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 44
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 20.04.18 at 08:40, <[email protected]> wrote:
tools/firmware/xen-dir/Makefile +1
-5@@ -41,16 +41,14 @@ 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_CONFIG_EXPERT=y \ - KCONFIG_CONFIG=$(CURDIR)/shim.config +$(D)/xen/.config: shim.config $(D)Do you need the $(D)/ prefix here, ...
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 46
Quoted 2 lines
tools/firmware/xen-dir/Makefile +2
-0+ cp $< $@ + $(MAKE) -C $(D)/xen olddefconfig \... here, and ...
Quoted 8 lines
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 49
Quoted 4 lines
tools/firmware/xen-dir/Makefile +2
-1+ XEN_CONFIG_EXPERT=y -xen-shim: $(D) shim-olddefconfig +xen-shim: $(D) $(D)/xen/.config... here? In the middle case using $(@D) might be better anyway. Other than that LGTM, but please consider removing the line continuations from the make invocations.
Quoted 3 lines
You are aware of the line further up:
D=xen-root
Oh, indeed. This xen-dir/xen-root hierarchy is confusing.
Quoted 3 lines
So $(D)/xen is just the path to the hypervisor part of the shim. This has nothing to do with $(@D) or other variants of the make automatic variables.
The suggested $(@D) would still be worthwhile to have imo, but I agree you can't drop the $(D)/ prefixes.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 36 lines · Jan Beulich
Quoted 32 lines
Quoted 1 line
Quoted 1 line · On 20.04.18 at 14:13, <[email protected]> wrote:
Quoted 21 lines · Jan Beulich
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 44
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 20.04.18 at 08:40, <[email protected]> wrote:
tools/firmware/xen-dir/Makefile +1
-5@@ -41,16 +41,14 @@ 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_CONFIG_EXPERT=y \ - KCONFIG_CONFIG=$(CURDIR)/shim.config +$(D)/xen/.config: shim.config $(D)Do you need the $(D)/ prefix here, ...
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 46
Quoted 2 lines
tools/firmware/xen-dir/Makefile +2
-0+ cp $< $@ + $(MAKE) -C $(D)/xen olddefconfig \... here, and ...
Quoted 8 lines
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 49
Quoted 4 lines
tools/firmware/xen-dir/Makefile +2
-1+ XEN_CONFIG_EXPERT=y -xen-shim: $(D) shim-olddefconfig +xen-shim: $(D) $(D)/xen/.config... here? In the middle case using $(@D) might be better anyway. Other than that LGTM, but please consider removing the line continuations from the make invocations.
Quoted 3 lines
You are aware of the line further up:
D=xen-root
Quoted 8 lines
Oh, indeed. This xen-dir/xen-root hierarchy is confusing.
Quoted 3 lines
So $(D)/xen is just the path to the hypervisor part of the shim. This has nothing to do with $(@D) or other variants of the make automatic variables.
The suggested $(@D) would still be worthwhile to have imo, but I agree you can't drop the $(D)/ prefixes.
Okay. I'll send V3 soon using $(@D).
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel