stubdom: disable building of pv-grub per default
cover stubdom: disable building of pv-grub per default
This is a first step of deprecating pv-grub. Switch the default to not building it.
NOTE: This should be mentioned in the release notes!
Juergen Gross (2):
stubdom: fix build with disabled pv-grub
stubdom: disable building pv-grub
Makefile | 4 ++-- stubdom/Makefile | 13 +++++++++++++ stubdom/configure | 8 ++------ stubdom/configure.ac | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/2 stubdom: fix build with disabled pv-grub
Today the build will fail if --disable-pv-grub as a parameter of configure, as the main Makefile will unconditionally try to build a 32-bit pv-grub stubdom.
Fix that by introducing a pv-grub32 target in stubdom/Makefile taking care of this situation.
--- Makefile | 4 ++-- stubdom/Makefile | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-)
Makefile +2 -2
@@ -72,7 +72,7 @@ build-tools-oxenstored: build-tools-public-headers build-stubdom: mini-os-dir build-tools-public-headers $(MAKE) -C stubdom build ifeq (x86_64,$(XEN_TARGET_ARCH)) - XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub + XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub32 endif .PHONY: build-docs
@@ -143,7 +143,7 @@ install-tools: install-tools-public-headers install-stubdom: mini-os-dir install-tools $(MAKE) -C stubdom install ifeq (x86_64,$(XEN_TARGET_ARCH)) - XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub + XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub32 endif .PHONY: tools/firmware/seabios-dir-force-update
stubdom/Makefile +13 -0
@@ -531,6 +531,13 @@ vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxenguest grub DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/grub/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a +.PHONY: pv-grub32 +ifneq ($(filter grub,$(STUBDOM_TARGETS)),) +pv-grub32: pv-grub +else +pv-grub32: +endif + .PHONY: xenstore-stubdom xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxenguest xenstore DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/xenstore-minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/xenstore/xenstored.a
@@ -560,6 +567,12 @@ install-grub: pv-grub $(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)" $(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-grub/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/pv-grub-$(XEN_TARGET_ARCH).gz" +ifneq ($(filter grub,$(STUBDOM_TARGETS)),) +install-grub32: install-grub +else +install-grub32: +endif + install-c: c-stubdom install-caml: caml-stubdom
Signature · 1 line
2.26.2
PATCH 2/2 stubdom: disable building pv-grub
In reply to Juergen GrossThe stubdom based pv-grub is using a very outdated version of grub (0.97) and should not be used any longer. Mainline grub has support for PV guests for a long time now, so that should be used as a boot loader of a PV domain.
So disable building pv-grub per default. In case someone really wants to continue using it he/she can still use a pv-grub binary from an older Xen version or manually enable building it via:
configure --enable-pv-grub
--- stubdom/configure | 8 ++------ stubdom/configure.ac | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-)
stubdom/configure +2 -6
@@ -1342,7 +1342,7 @@ Optional Features: --enable-ioemu-stubdom Build and install ioemu-stubdom --enable-c-stubdom Build and install c-stubdom (default is DISABLED) --enable-caml-stubdom Build and install caml-stubdom (default is DISABLED) - --disable-pv-grub Build and install pv-grub (default is ENABLED) + --enable-pv-grub Build and install pv-grub (default is DISABLED) --disable-xenstore-stubdom Build and install xenstore-stubdom (default is ENABLED)
@@ -2129,11 +2129,7 @@ fi else -grub=y -STUBDOM_TARGETS="$STUBDOM_TARGETS grub" -STUBDOM_BUILD="$STUBDOM_BUILD pv-grub" -STUBDOM_INSTALL="$STUBDOM_INSTALL install-grub" -STUBDOM_UNINSTALL="$STUBDOM_UNINSTALL install-grub" +grub=n fi
stubdom/configure.ac +1 -1
@@ -21,7 +21,7 @@ m4_include([../m4/fetcher.m4]) AX_STUBDOM_CONDITIONAL([ioemu-stubdom], [ioemu]) AX_STUBDOM_DEFAULT_DISABLE([c-stubdom], [c]) AX_STUBDOM_DEFAULT_DISABLE([caml-stubdom], [caml]) -AX_STUBDOM_DEFAULT_ENABLE([pv-grub], [grub]) +AX_STUBDOM_DEFAULT_DISABLE([pv-grub], [grub]) AX_STUBDOM_DEFAULT_ENABLE([xenstore-stubdom], [xenstore]) AX_STUBDOM_DEFAULT_ENABLE([xenstorepvh-stubdom], [xenstorepvh]) AX_STUBDOM_CONDITIONAL([vtpm-stubdom], [vtpm])
Signature · 1 line
2.26.2
Quoted 4 lines · Juergen Gross
This is a first step of deprecating pv-grub. Switch the default to not building it.
NOTE: This should be mentioned in the release notes!
And/or perhaps in ./CHANGELOG.md?
Jan
Quoted 7 lines · Jan Beulich
Quoted 4 lines · Juergen Gross
This is a first step of deprecating pv-grub. Switch the default to not building it.
NOTE: This should be mentioned in the release notes!
And/or perhaps in ./CHANGELOG.md?
Oh yes, of course!
I'll add this to patch 2.
Juergen
Re: [PATCH 1/2] stubdom: fix build with disabled pv-grub
In reply to Juergen GrossJuergen Gross, le jeu. 09 sept. 2021 10:27:04 +0200, a ecrit:
Quoted 8 lines
Today the build will fail if --disable-pv-grub as a parameter of configure, as the main
Makefilewill unconditionally try to build a 32-bit pv-grub stubdom.Fix that by introducing a pv-grub32 target in stubdom/Makefile taking care of this situation.
Signed-off-by Juergen Gross <[email protected]>
Quoted 61 lines
--- Makefile | 4 ++-- stubdom/Makefile | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-)Makefile +2
-2@@ -72,7 +72,7 @@ build-tools-oxenstored: build-tools-public-headers build-stubdom: mini-os-dir build-tools-public-headers $(MAKE) -C stubdom build ifeq (x86_64,$(XEN_TARGET_ARCH)) - XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub + XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub32 endif .PHONY: build-docs@@ -143,7 +143,7 @@ install-tools: install-tools-public-headers install-stubdom: mini-os-dir install-tools $(MAKE) -C stubdom install ifeq (x86_64,$(XEN_TARGET_ARCH)) - XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub + XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub32 endif .PHONY: tools/firmware/seabios-dir-force-updatestubdom/Makefile +13
-0@@ -531,6 +531,13 @@ vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxenguest grub DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/grub/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a +.PHONY: pv-grub32 +ifneq ($(filter grub,$(STUBDOM_TARGETS)),) +pv-grub32: pv-grub +else +pv-grub32: +endif + .PHONY: xenstore-stubdom xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxenguest xenstore DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/xenstore-minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/xenstore/xenstored.a@@ -560,6 +567,12 @@ install-grub: pv-grub $(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)" $(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-grub/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/pv-grub-$(XEN_TARGET_ARCH).gz" +ifneq ($(filter grub,$(STUBDOM_TARGETS)),) +install-grub32: install-grub +else +install-grub32: +endif + install-c: c-stubdom install-caml: caml-stubdomSignature · 1 line
2.26.2
Signature · 4 lines
Samuel The nice thing about Windows is - It does not just crash, it displays a dialog box and lets you press 'OK' first. (Arno Schaefer's .sig)
Re: [PATCH 2/2] stubdom: disable building pv-grub
In reply to Juergen GrossJuergen Gross, le jeu. 09 sept. 2021 10:27:05 +0200, a ecrit:
Quoted 5 lines
The stubdom based pv-grub is using a very outdated version of grub (0.97) and should not be used any longer. Mainline grub has support for PV guests for a long time now, so that should be used as a boot loader of a PV domain.
Quoted 7 lines
So disable building pv-grub per default. In case someone really wants to continue using it he/she can still use a pv-grub binary from an older Xen version or manually enable building it via:
configure --enable-pv-grubSigned-off-by Juergen Gross <[email protected]>
Quoted 47 lines
--- stubdom/configure | 8 ++------ stubdom/configure.ac | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-)stubdom/configure +2
-6@@ -1342,7 +1342,7 @@ Optional Features: --enable-ioemu-stubdom Build and install ioemu-stubdom --enable-c-stubdom Build and install c-stubdom (default is DISABLED) --enable-caml-stubdom Build and install caml-stubdom (default is DISABLED) - --disable-pv-grub Build and install pv-grub (default is ENABLED) + --enable-pv-grub Build and install pv-grub (default is DISABLED) --disable-xenstore-stubdom Build and install xenstore-stubdom (default is ENABLED)@@ -2129,11 +2129,7 @@ fi else -grub=y -STUBDOM_TARGETS="$STUBDOM_TARGETS grub" -STUBDOM_BUILD="$STUBDOM_BUILD pv-grub" -STUBDOM_INSTALL="$STUBDOM_INSTALL install-grub" -STUBDOM_UNINSTALL="$STUBDOM_UNINSTALL install-grub" +grub=n fistubdom/configure.ac +1
-1@@ -21,7 +21,7 @@ m4_include([../m4/fetcher.m4]) AX_STUBDOM_CONDITIONAL([ioemu-stubdom], [ioemu]) AX_STUBDOM_DEFAULT_DISABLE([c-stubdom], [c]) AX_STUBDOM_DEFAULT_DISABLE([caml-stubdom], [caml]) -AX_STUBDOM_DEFAULT_ENABLE([pv-grub], [grub]) +AX_STUBDOM_DEFAULT_DISABLE([pv-grub], [grub]) AX_STUBDOM_DEFAULT_ENABLE([xenstore-stubdom], [xenstore]) AX_STUBDOM_DEFAULT_ENABLE([xenstorepvh-stubdom], [xenstorepvh]) AX_STUBDOM_CONDITIONAL([vtpm-stubdom], [vtpm])Signature · 1 line
2.26.2
Signature · 4 lines
Samuel <Raize> can you guys see what I type? <vecna> no, raize <Raize> How do I set it up so you can see it?