x86/shim: Fix parallel build following c/s 32b1d62887d0
PATCH 1/1 x86/shim: Fix parallel build following c/s 32b1d62887d0
Unfortunately, a parallel build from clean can fail in the following manner:
xen.git$ make -j4 -C tools/firmware/xen-dir/
make: Entering directory '/local/xen.git/tools/firmware/xen-dir'
mkdir -p xen-root
make: *** No rule to make target 'xen-root/xen/arch/x86/configs/pvshim_defconfig', needed by 'xen-root/xen/.config'. Stop.
make: *** Waiting for unfinished jobs....
The rule for pvshim_defconfig also need to depend on the linkfarm being established first.
---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
--- tools/firmware/xen-dir/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/firmware/xen-dir/Makefile +1 -1
@@ -38,7 +38,7 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE } # Copy enough of the tree to build the shim hypervisor -$(D): linkfarm.stamp +$(D) $(D)/xen/arch/x86/configs/pvshim_defconfig: linkfarm.stamp $(MAKE) -C $(D)/xen distclean $(D)/xen/.config: $(D) $(D)/xen/arch/x86/configs/pvshim_defconfig
Signature · 7 lines
2.11.0 _______________________________________________ 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 11 lines · Andrew Cooper
tools/firmware/xen-dir/Makefile +1
-1@@ -38,7 +38,7 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE } # Copy enough of the tree to build the shim hypervisor -$(D): linkfarm.stamp +$(D) $(D)/xen/arch/x86/configs/pvshim_defconfig: linkfarm.stamp $(MAKE) -C $(D)/xen distclean $(D)/xen/.config: $(D) $(D)/xen/arch/x86/configs/pvshim_defconfig
But this then allows two instances of "$(MAKE) -C $(D)/xen distclean" to run in parallel - not sure how well that would work. I think what we want instead is
$(D): linkfarm.stamp
$(MAKE) -C $(D)/xen distclean
$(D)/xen/arch/x86/configs/pvshim_defconfig: $(D)
$(D)/xen/.config: $(D)/xen/arch/x86/configs/pvshim_defconfig
...
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 16 lines · Jan Beulich
tools/firmware/xen-dir/Makefile linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE · line 44
Quoted 11 lines · Andrew Cooper
tools/firmware/xen-dir/Makefile +1
-1@@ -38,7 +38,7 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE } # Copy enough of the tree to build the shim hypervisor -$(D): linkfarm.stamp +$(D) $(D)/xen/arch/x86/configs/pvshim_defconfig: linkfarm.stamp $(MAKE) -C $(D)/xen distclean $(D)/xen/.config: $(D) $(D)/xen/arch/x86/configs/pvshim_defconfigBut this then allows two instances of "$(MAKE) -C $(D)/xen distclean" to run in parallel - not sure how well that would work. I think what we want instead is
Quoted 6 lines
$(D): linkfarm.stamp
$(MAKE) -C $(D)/xen distclean$(D)/xen/arch/x86/configs/pvshim_defconfig: $(D)
$(D)/xen/.config: $(D)/xen/arch/x86/configs/pvshim_defconfig
That also seems to work. Overall change is
(quoted diff) +0 -0
b/tools/firmware/xen-dir/Makefile
index 7435421251..697bbbd57b 100644
tools/firmware/xen-dir/Makefile +0 -0
@@ -41,7 +41,9 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
$(D): linkfarm.stamp
$(MAKE) -C $(D)/xen distclean
-$(D)/xen/.config: $(D) $(D)/xen/arch/x86/configs/pvshim_defconfig +$(D)/xen/arch/x86/configs/pvshim_defconfig: $(D)
+
+$(D)/xen/.config: $(D)/xen/arch/x86/configs/pvshim_defconfig $(MAKE) -C $(@D) KBUILD_DEFCONFIG=pvshim_defconfig XEN_CONFIG_EXPERT=y defconfig
xen-shim: $(D)/xen/.config
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel