Skip to contentSkip to conversation

shim: don't let build modify shim.config

PATCH In review Juergen Gross 3 participants 3 messages Apr 20, 2018 – Apr 23, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v3 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 | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
tools/firmware/xen-dir/Makefile +6 -10
index a7e69ae777..84648c3faf 100644
@@ -41,16 +41,12 @@ 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
-
-xen-shim: $(D) shim-olddefconfig
-	$(MAKE) -C $(D)/xen build \
-		XEN_CONFIG_EXPERT=y \
-		KCONFIG_CONFIG=$(CURDIR)/shim.config
+$(D)/xen/.config: shim.config $(D)
+	cp $< $@
+	$(MAKE) -C $(@D) olddefconfig XEN_CONFIG_EXPERT=y
+
+xen-shim: $(D)/xen/.config
+	$(MAKE) -C $(<D) build 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
Reviewed-by on v3 1/1
#1 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 20.04.18 at 17:47, <[email protected]> wrote:

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.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v3 1/1
#2 lore raw
In reply to Juergen Gross
Quoted 6 lines · Juergen Gross

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.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel