Re: [Xen-devel] [PATCH v1] Rename DEBUG_DIR to XEN_DEBUG_DIR

2018-03-13 Thread Olaf Hering
Am Tue, 13 Mar 2018 11:56:51 +
schrieb Roger Pau Monné :

> Do you think that would solve your issues?

This will most likely work, yes. Thanks.

Olaf


pgpOkexrAA35u.pgp
Description: Digitale Signatur von OpenPGP
___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v1] Rename DEBUG_DIR to XEN_DEBUG_DIR

2018-03-13 Thread Roger Pau Monné
On Mon, Mar 12, 2018 at 04:45:51PM +0100, Olaf Hering wrote:
> The usage of DEBUG_DIR breaks OVMF build. Rename it to XEN_DEBUG_DIR.
> 
> The default DEBUG_DIR=/usr/lib/debug can not be used for rpm builds
> because that directory is "owned" by rpm-packaging itself to store the
> autogenerated ${pkg}-debuginfo.rpm data. Thats why I set it to /boot.
> This worked fine until recently, only /boot/xen-syms was affected by
> that change, and in fact only the "xen" build needed DEBUG_DIR as make
> cmdline option.
> 
> Now tools/firmware/Makefile also uses DEBUG_DIR. To set DEBUG_DIR the
> tools build must be done like "make DEBUG_DIR=/my/dir". But this breaks
> build with --enable-ovmf because ovmf.git makes use of the very same
> variable. For some reason it can not deal with a custom value, some
> autogenerated file will not be found:
> 
> [  126s] make[8]: *** No rule to make target '/boot/AutoGen.h', needed by 
> '/home/abuild/rpmbuild/BUILD/xen-4.11.20180228T150620.cb671efbf1/non-dbg/tools/firmware/ovmf-dir-remote/Build/OvmfX64/DEBUG_GCC5/X64/OvmfPkg/ResetVector/ResetVector/OUTPUT/ResetVector.bin'.
> 
> Fixes commit b38c4e1763 ("build: remove shim related targets")

I would rather prefer to fix this properly by setting DEBUG_DIR in
config/Paths.mk.in from configure for the tools usage. This should
allow the path to be set from configure and thus avoid the need of
passing it from the command line when calling make. Do you think that
would solve your issues?

I can prepare a patch to do that.

Roger.

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH v1] Rename DEBUG_DIR to XEN_DEBUG_DIR

2018-03-12 Thread Olaf Hering
The usage of DEBUG_DIR breaks OVMF build. Rename it to XEN_DEBUG_DIR.

The default DEBUG_DIR=/usr/lib/debug can not be used for rpm builds
because that directory is "owned" by rpm-packaging itself to store the
autogenerated ${pkg}-debuginfo.rpm data. Thats why I set it to /boot.
This worked fine until recently, only /boot/xen-syms was affected by
that change, and in fact only the "xen" build needed DEBUG_DIR as make
cmdline option.

Now tools/firmware/Makefile also uses DEBUG_DIR. To set DEBUG_DIR the
tools build must be done like "make DEBUG_DIR=/my/dir". But this breaks
build with --enable-ovmf because ovmf.git makes use of the very same
variable. For some reason it can not deal with a custom value, some
autogenerated file will not be found:

[  126s] make[8]: *** No rule to make target '/boot/AutoGen.h', needed by 
'/home/abuild/rpmbuild/BUILD/xen-4.11.20180228T150620.cb671efbf1/non-dbg/tools/firmware/ovmf-dir-remote/Build/OvmfX64/DEBUG_GCC5/X64/OvmfPkg/ResetVector/ResetVector/OUTPUT/ResetVector.bin'.

Fixes commit b38c4e1763 ("build: remove shim related targets")

Signed-off-by: Olaf Hering 
---

In case this patch gets applied, it is also required to fix the 
build regression introduced by cee8bb62ff in 4.10.


 INSTALL |  4 ++--
 config/StdGNU.mk|  2 +-
 config/SunOS.mk |  2 +-
 tools/firmware/Makefile |  2 +-
 xen/Makefile| 14 +++---
 xen/test/livepatch/Makefile |  2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/INSTALL b/INSTALL
index 9aa9ebdddc..3c05a7a35c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -196,10 +196,10 @@ OCAMLFIND_DESTDIR= and OCAMLFIND_METADIR= will have the 
same effect.
 OCAMLDESTDIR=
 
 The xen subsystem will install the hypervisor into fixed locations.
-BOOT_DIR defaults to /boot, DEBUG_DIR defaults to /usr/lib/debug and
+BOOT_DIR defaults to /boot, XEN_DEBUG_DIR defaults to /usr/lib/debug and
 EFI_DIR to /usr/lib64/efi.
 BOOT_DIR=
-DEBUG_DIR=
+XEN_DEBUG_DIR=
 EFI_DIR=
 
 The make target 'rpmball' will build a xen.rpm. This variable can be
diff --git a/config/StdGNU.mk b/config/StdGNU.mk
index 039274ea61..f75e39782c 100644
--- a/config/StdGNU.mk
+++ b/config/StdGNU.mk
@@ -27,7 +27,7 @@ INSTALL_DATA = $(INSTALL) -m0644 -p
 INSTALL_PROG = $(INSTALL) -m0755 -p
 
 BOOT_DIR ?= /boot
-DEBUG_DIR ?= /usr/lib/debug
+XEN_DEBUG_DIR ?= /usr/lib/debug
 
 SOCKET_LIBS =
 UTIL_LIBS = -lutil
diff --git a/config/SunOS.mk b/config/SunOS.mk
index 0fe5f45590..f36120c4a1 100644
--- a/config/SunOS.mk
+++ b/config/SunOS.mk
@@ -19,7 +19,7 @@ INSTALL_DATA = $(INSTALL) -m0644 -p
 INSTALL_PROG = $(INSTALL) -m0755 -p
 
 BOOT_DIR ?= /boot
-DEBUG_DIR ?= /usr/lib/debug
+XEN_DEBUG_DIR ?= /usr/lib/debug
 
 SunOS_LIBDIR = /usr/sfw/lib
 SunOS_LIBDIR_x86_64 = /usr/sfw/lib/amd64
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index 5a7cf7766d..13cefb5ce9 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -8,7 +8,7 @@ endif
 # hvmloader is a 32-bit protected mode binary.
 TARGET  := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
-DEBG_DIR := $(DESTDIR)$(DEBUG_DIR)$(XENFIRMWAREDIR)
+DEBG_DIR := $(DESTDIR)$(XEN_DEBUG_DIR)$(XENFIRMWAREDIR)
 
 SUBDIRS-y :=
 SUBDIRS-$(CONFIG_OVMF) += ovmf-dir
diff --git a/xen/Makefile b/xen/Makefile
index 62d479c799..79f3a95ec1 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -60,15 +60,15 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) 
$(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) 
$(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
-   [ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
-   $(INSTALL_DATA) $(TARGET)-syms 
$(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
-   $(INSTALL_DATA) $(TARGET)-syms.map 
$(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION).map
+   [ -d "$(D)$(XEN_DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(XEN_DEBUG_DIR)
+   $(INSTALL_DATA) $(TARGET)-syms 
$(D)$(XEN_DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
+   $(INSTALL_DATA) $(TARGET)-syms.map 
$(D)$(XEN_DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION).map
$(INSTALL_DATA) $(KCONFIG_CONFIG) 
$(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
[ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \
$(INSTALL_DATA) $(TARGET).efi 
$(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
if [ -e $(TARGET).efi.map ]; then \
-   $(INSTALL_DATA) $(TARGET).efi.map 
$(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
+   $(INSTALL_DATA) $(TARGET).efi.map 
$(D)$(XEN_DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
fi; \
ln -sf $(T)-$(XEN_FULLVERSION).efi 
$(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
ln -sf