All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
@ 2012-07-16 23:50 Matt Wilson
  2012-07-20 18:52 ` Matt Wilson
  2012-07-23  7:49 ` Jan Beulich
  0 siblings, 2 replies; 24+ messages in thread
From: Matt Wilson @ 2012-07-16 23:50 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, xen-devel

# HG changeset patch
# User Matt Wilson <msw@amazon.com>
# Date 1342481836 0
# Branch efi
# Node ID dd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
# Parent  9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi

After commit 25594:ad08cd8e7097, EFI Xen binaries were installed to
/efi instead of /usr/lib64/efi. This patch restores the previous
behviour established in commit 23645:638f31a30b6c.

Signed-off-by: Matt Wilson <msw@amazon.com>
Reported-by: Olaf Hering <olaf@aepfle.de>

diff -r 9950f2dc2ee6 -r dd1ab0cae2c8 Config.mk
--- a/Config.mk	Mon Jul 09 10:10:27 2012 +0100
+++ b/Config.mk	Mon Jul 16 23:37:16 2012 +0000
@@ -48,6 +48,7 @@ SHAREDIR    ?= $(PREFIX)/share
 DOCDIR      ?= $(SHAREDIR)/doc/xen
 MANDIR      ?= $(SHAREDIR)/man
 BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d
+EFI_DIR     ?= /usr/lib64/efi
 
 # arguments: variable, common path part, path to test, if yes, if no
 define setvar_dir
diff -r 9950f2dc2ee6 -r dd1ab0cae2c8 docs/misc/efi.markdown
--- a/docs/misc/efi.markdown	Mon Jul 09 10:10:27 2012 +0100
+++ b/docs/misc/efi.markdown	Mon Jul 16 23:37:16 2012 +0000
@@ -4,10 +4,12 @@ newer. Additionally, the binutils build 
 for the x86_64-pep emulation (i.e. `--enable-targets=x86_64-pep` or an option
 of equivalent effect should be passed to the configure script).
 
-Once built, `make install-xen` can place the resulting binary directly into
+Once built, `make install-xen` will place the resulting binary directly into
 the EFI boot partition, provided `EFI_VENDOR` is set in the environment (and
 `EFI_MOUNTPOINT` is overridden as needed, should the default of `/boot/efi` not
-match your system).
+match your system). The xen.efi binary will also be installed in
+`/usr/lib64/efi/`, unless `EFI_DIR` is set in the environment to 
+override the default.
 
 The binary itself will require a configuration file (names with the `.efi`
 extension of the binary's name replaced by `.cfg`, and - until an existing
diff -r 9950f2dc2ee6 -r dd1ab0cae2c8 xen/Makefile
--- a/xen/Makefile	Mon Jul 09 10:10:27 2012 +0100
+++ b/xen/Makefile	Mon Jul 16 23:37:16 2012 +0000
@@ -36,11 +36,11 @@ build install debug clean distclean csco
 	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
 	$(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
 	if [ -r $(TARGET).efi ]; then \
-		[ -d $(DESTDIR)$(LIBDIR)/efi ] || $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/efi; \
-		$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
-		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
-		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
-		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET)).efi; \
+		[ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \
+		$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
+		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
+		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
+		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET)).efi; \
 		if [ -n '$(EFI_MOUNTPOINT)' -a -n '$(EFI_VENDOR)' ]; then \
 			$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
 		elif [ "$(DESTDIR)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(DESTDIR))" ]; then \

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-16 23:50 [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi Matt Wilson
@ 2012-07-20 18:52 ` Matt Wilson
  2012-07-23  7:49 ` Jan Beulich
  1 sibling, 0 replies; 24+ messages in thread
From: Matt Wilson @ 2012-07-20 18:52 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, xen-devel

On Mon, Jul 16, 2012 at 04:50:33PM -0700, Wilson, Matt wrote:
>
> x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
> 
> After commit 25594:ad08cd8e7097, EFI Xen binaries were installed to
> /efi instead of /usr/lib64/efi. This patch restores the previous
> behviour established in commit 23645:638f31a30b6c.
> 
> Signed-off-by: Matt Wilson <msw@amazon.com>
> Reported-by: Olaf Hering <olaf@aepfle.de>

Olaf, can you give this a test?

Matt

> diff -r 9950f2dc2ee6 -r dd1ab0cae2c8 Config.mk
> --- a/Config.mk	Mon Jul 09 10:10:27 2012 +0100
> +++ b/Config.mk	Mon Jul 16 23:37:16 2012 +0000
> @@ -48,6 +48,7 @@ SHAREDIR    ?= $(PREFIX)/share
>  DOCDIR      ?= $(SHAREDIR)/doc/xen
>  MANDIR      ?= $(SHAREDIR)/man
>  BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d
> +EFI_DIR     ?= /usr/lib64/efi
>  
>  # arguments: variable, common path part, path to test, if yes, if no
>  define setvar_dir
> diff -r 9950f2dc2ee6 -r dd1ab0cae2c8 docs/misc/efi.markdown
> --- a/docs/misc/efi.markdown	Mon Jul 09 10:10:27 2012 +0100
> +++ b/docs/misc/efi.markdown	Mon Jul 16 23:37:16 2012 +0000
> @@ -4,10 +4,12 @@ newer. Additionally, the binutils build 
>  for the x86_64-pep emulation (i.e. `--enable-targets=x86_64-pep` or an option
>  of equivalent effect should be passed to the configure script).
>  
> -Once built, `make install-xen` can place the resulting binary directly into
> +Once built, `make install-xen` will place the resulting binary directly into
>  the EFI boot partition, provided `EFI_VENDOR` is set in the environment (and
>  `EFI_MOUNTPOINT` is overridden as needed, should the default of `/boot/efi` not
> -match your system).
> +match your system). The xen.efi binary will also be installed in
> +`/usr/lib64/efi/`, unless `EFI_DIR` is set in the environment to 
> +override the default.
>  
>  The binary itself will require a configuration file (names with the `.efi`
>  extension of the binary's name replaced by `.cfg`, and - until an existing
> diff -r 9950f2dc2ee6 -r dd1ab0cae2c8 xen/Makefile
> --- a/xen/Makefile	Mon Jul 09 10:10:27 2012 +0100
> +++ b/xen/Makefile	Mon Jul 16 23:37:16 2012 +0000
> @@ -36,11 +36,11 @@ build install debug clean distclean csco
>  	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
>  	$(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
>  	if [ -r $(TARGET).efi ]; then \
> -		[ -d $(DESTDIR)$(LIBDIR)/efi ] || $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/efi; \
> -		$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
> -		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
> -		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
> -		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET)).efi; \
> +		[ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \
> +		$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
> +		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
> +		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
> +		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET)).efi; \
>  		if [ -n '$(EFI_MOUNTPOINT)' -a -n '$(EFI_VENDOR)' ]; then \
>  			$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
>  		elif [ "$(DESTDIR)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(DESTDIR))" ]; then \
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-16 23:50 [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi Matt Wilson
  2012-07-20 18:52 ` Matt Wilson
@ 2012-07-23  7:49 ` Jan Beulich
  2012-07-23  8:05   ` Olaf Hering
  1 sibling, 1 reply; 24+ messages in thread
From: Jan Beulich @ 2012-07-23  7:49 UTC (permalink / raw)
  To: Matt Wilson; +Cc: Olaf Hering, xen-devel

>>> On 17.07.12 at 01:50, Matt Wilson <msw@amazon.com> wrote:
> # HG changeset patch
> # User Matt Wilson <msw@amazon.com>
> # Date 1342481836 0
> # Branch efi
> # Node ID dd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
> # Parent  9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
> x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
> 
> After commit 25594:ad08cd8e7097, EFI Xen binaries were installed to
> /efi instead of /usr/lib64/efi. This patch restores the previous
> behviour established in commit 23645:638f31a30b6c.

I don't follow - what you say suggests that $(LIBDIR) is empty,
which certainly isn't the case for me and hence would need
explanation of the circumstances under which this happens.

> Signed-off-by: Matt Wilson <msw@amazon.com>
> Reported-by: Olaf Hering <olaf@aepfle.de>
> 
> diff -r 9950f2dc2ee6 -r dd1ab0cae2c8 Config.mk
> --- a/Config.mk	Mon Jul 09 10:10:27 2012 +0100
> +++ b/Config.mk	Mon Jul 16 23:37:16 2012 +0000
> @@ -48,6 +48,7 @@ SHAREDIR    ?= $(PREFIX)/share
>  DOCDIR      ?= $(SHAREDIR)/doc/xen
>  MANDIR      ?= $(SHAREDIR)/man
>  BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d
> +EFI_DIR     ?= /usr/lib64/efi

With the above, this minimally ought to be $(LIBDIR)/efi - open
coding /usr/lib64 here doesn't look correct to me.

If there is actual use for overriding this location, I'm not
opposed to the change in principle.

Jan

>  
>  # arguments: variable, common path part, path to test, if yes, if no
>  define setvar_dir
> diff -r 9950f2dc2ee6 -r dd1ab0cae2c8 docs/misc/efi.markdown
> --- a/docs/misc/efi.markdown	Mon Jul 09 10:10:27 2012 +0100
> +++ b/docs/misc/efi.markdown	Mon Jul 16 23:37:16 2012 +0000
> @@ -4,10 +4,12 @@ newer. Additionally, the binutils build 
>  for the x86_64-pep emulation (i.e. `--enable-targets=x86_64-pep` or an option
>  of equivalent effect should be passed to the configure script).
>  
> -Once built, `make install-xen` can place the resulting binary directly into
> +Once built, `make install-xen` will place the resulting binary directly into
>  the EFI boot partition, provided `EFI_VENDOR` is set in the environment 
> (and
>  `EFI_MOUNTPOINT` is overridden as needed, should the default of `/boot/efi` 
> not
> -match your system).
> +match your system). The xen.efi binary will also be installed in
> +`/usr/lib64/efi/`, unless `EFI_DIR` is set in the environment to 
> +override the default.
>  
>  The binary itself will require a configuration file (names with the `.efi`
>  extension of the binary's name replaced by `.cfg`, and - until an existing
> diff -r 9950f2dc2ee6 -r dd1ab0cae2c8 xen/Makefile
> --- a/xen/Makefile	Mon Jul 09 10:10:27 2012 +0100
> +++ b/xen/Makefile	Mon Jul 16 23:37:16 2012 +0000
> @@ -36,11 +36,11 @@ build install debug clean distclean csco
>  	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir 
> $(TARGET)).gz
>  	$(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir 
> $(TARGET))-syms-$(XEN_FULLVERSION)
>  	if [ -r $(TARGET).efi ]; then \
> -		[ -d $(DESTDIR)$(LIBDIR)/efi ] || $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/efi; \
> -		$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir 
> $(TARGET))-$(XEN_FULLVERSION).efi; \
> -		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi 
> $(DESTDIR)$(LIBDIR)/efi/$(notdir 
> $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
> -		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi 
> $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
> -		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi 
> $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET)).efi; \
> +		[ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \
> +		$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_DIR)/$(notdir 
> $(TARGET))-$(XEN_FULLVERSION).efi; \
> +		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi 
> $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; 
> \
> +		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi 
> $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
> +		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi 
> $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET)).efi; \
>  		if [ -n '$(EFI_MOUNTPOINT)' -a -n '$(EFI_VENDOR)' ]; then \
>  			$(INSTALL_DATA) $(TARGET).efi 
> $(DESTDIR)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(notdir 
> $(TARGET))-$(XEN_FULLVERSION).efi; \
>  		elif [ "$(DESTDIR)" = "$(patsubst $(shell cd $(XEN_ROOT) && 
> pwd)/%,%,$(DESTDIR))" ]; then \

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23  7:49 ` Jan Beulich
@ 2012-07-23  8:05   ` Olaf Hering
  2012-07-23  8:20     ` Jan Beulich
  0 siblings, 1 reply; 24+ messages in thread
From: Olaf Hering @ 2012-07-23  8:05 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Matt Wilson, xen-devel

On Mon, Jul 23, Jan Beulich wrote:

> >>> On 17.07.12 at 01:50, Matt Wilson <msw@amazon.com> wrote:
> > # HG changeset patch
> > # User Matt Wilson <msw@amazon.com>
> > # Date 1342481836 0
> > # Branch efi
> > # Node ID dd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
> > # Parent  9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
> > x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
> > 
> > After commit 25594:ad08cd8e7097, EFI Xen binaries were installed to
> > /efi instead of /usr/lib64/efi. This patch restores the previous
> > behviour established in commit 23645:638f31a30b6c.
> 
> I don't follow - what you say suggests that $(LIBDIR) is empty,
> which certainly isn't the case for me and hence would need
> explanation of the circumstances under which this happens.

Jan,

how is LIBDIR set in your environment?

Olaf

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23  8:05   ` Olaf Hering
@ 2012-07-23  8:20     ` Jan Beulich
  2012-07-23  8:36       ` Olaf Hering
  2012-07-23  8:43       ` Ian Campbell
  0 siblings, 2 replies; 24+ messages in thread
From: Jan Beulich @ 2012-07-23  8:20 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Matt Wilson, xen-devel

>>> On 23.07.12 at 10:05, Olaf Hering <olaf@aepfle.de> wrote:
> On Mon, Jul 23, Jan Beulich wrote:
> 
>> >>> On 17.07.12 at 01:50, Matt Wilson <msw@amazon.com> wrote:
>> > # HG changeset patch
>> > # User Matt Wilson <msw@amazon.com>
>> > # Date 1342481836 0
>> > # Branch efi
>> > # Node ID dd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
>> > # Parent  9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
>> > x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
>> > 
>> > After commit 25594:ad08cd8e7097, EFI Xen binaries were installed to
>> > /efi instead of /usr/lib64/efi. This patch restores the previous
>> > behviour established in commit 23645:638f31a30b6c.
>> 
>> I don't follow - what you say suggests that $(LIBDIR) is empty,
>> which certainly isn't the case for me and hence would need
>> explanation of the circumstances under which this happens.
> 
> how is LIBDIR set in your environment?

It's not set at all, I'm using what gets defined in config/*.mk.

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23  8:20     ` Jan Beulich
@ 2012-07-23  8:36       ` Olaf Hering
  2012-07-23  8:58         ` Jan Beulich
  2012-07-23  8:43       ` Ian Campbell
  1 sibling, 1 reply; 24+ messages in thread
From: Olaf Hering @ 2012-07-23  8:36 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Matt Wilson, xen-devel

On Mon, Jul 23, Jan Beulich wrote:

> >>> On 23.07.12 at 10:05, Olaf Hering <olaf@aepfle.de> wrote:
> > how is LIBDIR set in your environment?
> 
> It's not set at all, I'm using what gets defined in config/*.mk.

Last time I looked these files were not sourced in xen/

Olaf

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23  8:20     ` Jan Beulich
  2012-07-23  8:36       ` Olaf Hering
@ 2012-07-23  8:43       ` Ian Campbell
  2012-07-23  9:07         ` Jan Beulich
  1 sibling, 1 reply; 24+ messages in thread
From: Ian Campbell @ 2012-07-23  8:43 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, Matt Wilson, xen-devel

On Mon, 2012-07-23 at 09:20 +0100, Jan Beulich wrote:
> >>> On 23.07.12 at 10:05, Olaf Hering <olaf@aepfle.de> wrote:
> > On Mon, Jul 23, Jan Beulich wrote:
> > 
> >> >>> On 17.07.12 at 01:50, Matt Wilson <msw@amazon.com> wrote:
> >> > # HG changeset patch
> >> > # User Matt Wilson <msw@amazon.com>
> >> > # Date 1342481836 0
> >> > # Branch efi
> >> > # Node ID dd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
> >> > # Parent  9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
> >> > x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
> >> > 
> >> > After commit 25594:ad08cd8e7097, EFI Xen binaries were installed to
> >> > /efi instead of /usr/lib64/efi. This patch restores the previous
> >> > behviour established in commit 23645:638f31a30b6c.
> >> 
> >> I don't follow - what you say suggests that $(LIBDIR) is empty,
> >> which certainly isn't the case for me and hence would need
> >> explanation of the circumstances under which this happens.
> > 
> > how is LIBDIR set in your environment?
> 
> It's not set at all, I'm using what gets defined in config/*.mk.

25594:ad08cd8e7097 moved LIBDIR to configure and config/Tools.mk so it's
not available under xen any more because a) we decided that we didn't
want to require configure to be run before building the hypervisor and
b) nobody spotted that the EFI stuff under xen/ used LIBDIR (it's not
built by make dist? that's what I checked when I tested it).

What is this stuff installed in /usr/lib*/efi anyway? I suppose it isn't
boot time stuff (which should go in /boot or /boot/efi). 

We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
(or in config/*) is fine also.

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23  8:36       ` Olaf Hering
@ 2012-07-23  8:58         ` Jan Beulich
  0 siblings, 0 replies; 24+ messages in thread
From: Jan Beulich @ 2012-07-23  8:58 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Matt Wilson, xen-devel

>>> On 23.07.12 at 10:36, Olaf Hering <olaf@aepfle.de> wrote:
> On Mon, Jul 23, Jan Beulich wrote:
> 
>> >>> On 23.07.12 at 10:05, Olaf Hering <olaf@aepfle.de> wrote:
>> > how is LIBDIR set in your environment?
>> 
>> It's not set at all, I'm using what gets defined in config/*.mk.
> 
> Last time I looked these files were not sourced in xen/

They have always been, from ./Config.mk.

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23  8:43       ` Ian Campbell
@ 2012-07-23  9:07         ` Jan Beulich
  2012-07-23  9:35           ` Ian Campbell
  0 siblings, 1 reply; 24+ messages in thread
From: Jan Beulich @ 2012-07-23  9:07 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, Matt Wilson, xen-devel

>>> On 23.07.12 at 10:43, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Mon, 2012-07-23 at 09:20 +0100, Jan Beulich wrote:
>> >>> On 23.07.12 at 10:05, Olaf Hering <olaf@aepfle.de> wrote:
>> > On Mon, Jul 23, Jan Beulich wrote:
>> > 
>> >> >>> On 17.07.12 at 01:50, Matt Wilson <msw@amazon.com> wrote:
>> >> > # HG changeset patch
>> >> > # User Matt Wilson <msw@amazon.com>
>> >> > # Date 1342481836 0
>> >> > # Branch efi
>> >> > # Node ID dd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
>> >> > # Parent  9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
>> >> > x86/EFI: define and use EFI_DIR make variable, defaulting to 
> /usr/lib64/efi
>> >> > 
>> >> > After commit 25594:ad08cd8e7097, EFI Xen binaries were installed to
>> >> > /efi instead of /usr/lib64/efi. This patch restores the previous
>> >> > behviour established in commit 23645:638f31a30b6c.
>> >> 
>> >> I don't follow - what you say suggests that $(LIBDIR) is empty,
>> >> which certainly isn't the case for me and hence would need
>> >> explanation of the circumstances under which this happens.
>> > 
>> > how is LIBDIR set in your environment?
>> 
>> It's not set at all, I'm using what gets defined in config/*.mk.
> 
> 25594:ad08cd8e7097 moved LIBDIR to configure and config/Tools.mk so it's
> not available under xen any more because a) we decided that we didn't
> want to require configure to be run before building the hypervisor and
> b) nobody spotted that the EFI stuff under xen/ used LIBDIR (it's not
> built by make dist? that's what I checked when I tested it).

It may not get built if your tool chain is too old. Do you see
xen/xen.efi after the build? If so, I'd also expect it to get
installed.

In any case, moving LIBDIR to the tools' configury process
may need to be revisisted.

> What is this stuff installed in /usr/lib*/efi anyway? I suppose it isn't
> boot time stuff (which should go in /boot or /boot/efi). 

It *is* boot time stuff, and is does *not* belong into /boot.
When putting this together, I was told that the EFI partition
has to be considered volatile (i.e. may get destroyed and
re-created at any time). This is why elilo.efi also has its real
home under /usr, not under /boot/efi.

> We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
> (or in config/*) is fine also.

That part wasn't controversial (if generally useful), but imo it
shouldn't expand to an open-coded path (unless put into
config/x86_64.mk).

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23  9:07         ` Jan Beulich
@ 2012-07-23  9:35           ` Ian Campbell
  2012-07-23 10:03             ` Jan Beulich
  0 siblings, 1 reply; 24+ messages in thread
From: Ian Campbell @ 2012-07-23  9:35 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, Matt Wilson, xen-devel

On Mon, 2012-07-23 at 10:07 +0100, Jan Beulich wrote:
> >>> On 23.07.12 at 10:43, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > On Mon, 2012-07-23 at 09:20 +0100, Jan Beulich wrote:
> >> >>> On 23.07.12 at 10:05, Olaf Hering <olaf@aepfle.de> wrote:
> >> > On Mon, Jul 23, Jan Beulich wrote:
> >> > 
> >> >> >>> On 17.07.12 at 01:50, Matt Wilson <msw@amazon.com> wrote:
> >> >> > # HG changeset patch
> >> >> > # User Matt Wilson <msw@amazon.com>
> >> >> > # Date 1342481836 0
> >> >> > # Branch efi
> >> >> > # Node ID dd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
> >> >> > # Parent  9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
> >> >> > x86/EFI: define and use EFI_DIR make variable, defaulting to 
> > /usr/lib64/efi
> >> >> > 
> >> >> > After commit 25594:ad08cd8e7097, EFI Xen binaries were installed to
> >> >> > /efi instead of /usr/lib64/efi. This patch restores the previous
> >> >> > behviour established in commit 23645:638f31a30b6c.
> >> >> 
> >> >> I don't follow - what you say suggests that $(LIBDIR) is empty,
> >> >> which certainly isn't the case for me and hence would need
> >> >> explanation of the circumstances under which this happens.
> >> > 
> >> > how is LIBDIR set in your environment?
> >> 
> >> It's not set at all, I'm using what gets defined in config/*.mk.
> > 
> > 25594:ad08cd8e7097 moved LIBDIR to configure and config/Tools.mk so it's
> > not available under xen any more because a) we decided that we didn't
> > want to require configure to be run before building the hypervisor and
> > b) nobody spotted that the EFI stuff under xen/ used LIBDIR (it's not
> > built by make dist? that's what I checked when I tested it).
> 
> It may not get built if your tool chain is too old. Do you see
> xen/xen.efi after the build? If so, I'd also expect it to get
> installed.

I don't get xen.efi. I guess Debian Squeeze's toolstack is too old.

> 
> In any case, moving LIBDIR to the tools' configury process
> may need to be revisisted.

LIB_DIR is a tools related concept. The EFI installation dir is a
semantically different thing even though it happens to also = /usr/lib
or /usr/lib64.

Moving the libdir stuff to configure has clear benefits (i.e. proper
automatic detection of lib vs lib64 on all distros). If anything is to
be revisited then it should be the non-use of configure for the
hypervisor, but I think introducing EFI_DIR is preferable to that
change.

> > What is this stuff installed in /usr/lib*/efi anyway? I suppose it isn't
> > boot time stuff (which should go in /boot or /boot/efi). 
> 
> It *is* boot time stuff, and is does *not* belong into /boot.
> When putting this together, I was told that the EFI partition
> has to be considered volatile (i.e. may get destroyed and
> re-created at any time).

Do you have a reference for this?

OOI what is /boot/efi for if it can be regenerated at any time?

>  This is why elilo.efi also has its real
> home under /usr, not under /boot/efi.

I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
and elilo uses /usr/lib/elilo. Does that mean we should be
using /usr/lib/xen/efi rather than /usr/lib/efi?

What is the policy for EFI install location on RPM/LSB based systems?

> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
> > (or in config/*) is fine also.
> 
> That part wasn't controversial (if generally useful), but imo it
> shouldn't expand to an open-coded path (unless put into
> config/x86_64.mk).

I could live with that. Unlike LIBDIR, where getting it wrong can mean
things don't work, getting EFI_DIR wrong is merely ugly.

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23  9:35           ` Ian Campbell
@ 2012-07-23 10:03             ` Jan Beulich
  2012-07-23 10:25               ` Ian Campbell
  2012-07-24  8:57               ` Ian Campbell
  0 siblings, 2 replies; 24+ messages in thread
From: Jan Beulich @ 2012-07-23 10:03 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, Matt Wilson, xen-devel

>>> On 23.07.12 at 11:35, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Mon, 2012-07-23 at 10:07 +0100, Jan Beulich wrote:
>> >>> On 23.07.12 at 10:43, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> > What is this stuff installed in /usr/lib*/efi anyway? I suppose it isn't
>> > boot time stuff (which should go in /boot or /boot/efi). 
>> 
>> It *is* boot time stuff, and is does *not* belong into /boot.
>> When putting this together, I was told that the EFI partition
>> has to be considered volatile (i.e. may get destroyed and
>> re-created at any time).
> 
> Do you have a reference for this?

Not readily; I could ask the person who told me.

> OOI what is /boot/efi for if it can be regenerated at any time?

To boot the system. As this is using the old FAT file system, it's
not really reliable in case of kernel crashes and could be
re-initialized from the EFI shell of other firmware management
operations, and hence shouldn't be used for any non-volatile data.

>>  This is why elilo.efi also has its real
>> home under /usr, not under /boot/efi.
> 
> I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
> and elilo uses /usr/lib/elilo.

It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
really ins't well standardized (and hence an EFI_DIR override is
warranted, yet settling on a proper default may be problematic).

> Does that mean we should be using /usr/lib/xen/efi rather than /usr/lib/efi?
> 
> What is the policy for EFI install location on RPM/LSB based systems?

Don't know.

>> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
>> > (or in config/*) is fine also.
>> 
>> That part wasn't controversial (if generally useful), but imo it
>> shouldn't expand to an open-coded path (unless put into
>> config/x86_64.mk).
> 
> I could live with that. Unlike LIBDIR, where getting it wrong can mean
> things don't work, getting EFI_DIR wrong is merely ugly.

Not exactly - it might still mean that boot loader installation (and
update) doesn't work anymore. But getting things consistent
would be a one-time per-distro task, so ought to be manageable.

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23 10:03             ` Jan Beulich
@ 2012-07-23 10:25               ` Ian Campbell
  2012-07-23 10:28                 ` Jan Beulich
  2012-07-24  8:57               ` Ian Campbell
  1 sibling, 1 reply; 24+ messages in thread
From: Ian Campbell @ 2012-07-23 10:25 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, Matt Wilson, xen-devel

On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
> >>> On 23.07.12 at 11:35, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > On Mon, 2012-07-23 at 10:07 +0100, Jan Beulich wrote:
> >> >>> On 23.07.12 at 10:43, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> >> > What is this stuff installed in /usr/lib*/efi anyway? I suppose it isn't
> >> > boot time stuff (which should go in /boot or /boot/efi). 
> >> 
> >> It *is* boot time stuff, and is does *not* belong into /boot.
> >> When putting this together, I was told that the EFI partition
> >> has to be considered volatile (i.e. may get destroyed and
> >> re-created at any time).
> > 
> > Do you have a reference for this?
> 
> Not readily; I could ask the person who told me.
> 
> > OOI what is /boot/efi for if it can be regenerated at any time?
> 
> To boot the system. As this is using the old FAT file system, it's
> not really reliable in case of kernel crashes and could be
> re-initialized from the EFI shell of other firmware management
> operations, and hence shouldn't be used for any non-volatile data.

So /boot/efi is effectively a /tmp style thing for the EFI shell?

> >>  This is why elilo.efi also has its real
> >> home under /usr, not under /boot/efi.
> > 
> > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
> > and elilo uses /usr/lib/elilo.
> 
> It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
> really ins't well standardized (and hence an EFI_DIR override is
> warranted, yet settling on a proper default may be problematic).
> 
> > Does that mean we should be using /usr/lib/xen/efi rather than /usr/lib/efi?
> > 
> > What is the policy for EFI install location on RPM/LSB based systems?
> 
> Don't know.

I think LSB basically #includes FHS for this but even the FHS 3.0 drafts
don't seem to mention EFI (at least not in a greppable way).

> 
> >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
> >> > (or in config/*) is fine also.
> >> 
> >> That part wasn't controversial (if generally useful), but imo it
> >> shouldn't expand to an open-coded path (unless put into
> >> config/x86_64.mk).
> > 
> > I could live with that. Unlike LIBDIR, where getting it wrong can mean
> > things don't work, getting EFI_DIR wrong is merely ugly.
> 
> Not exactly - it might still mean that boot loader installation (and
> update) doesn't work anymore.

At worst it'll just fail to include Xen, won't it? Installing Xen to the
wrong directory shouldn't effect any other EFI bootloader, I would
hope...

>  But getting things consistent
> would be a one-time per-distro task, so ought to be manageable.

Right.

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23 10:25               ` Ian Campbell
@ 2012-07-23 10:28                 ` Jan Beulich
  0 siblings, 0 replies; 24+ messages in thread
From: Jan Beulich @ 2012-07-23 10:28 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, Matt Wilson, xen-devel

>>> On 23.07.12 at 12:25, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
>> >>> On 23.07.12 at 11:35, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> > On Mon, 2012-07-23 at 10:07 +0100, Jan Beulich wrote:
>> >> >>> On 23.07.12 at 10:43, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> >> > What is this stuff installed in /usr/lib*/efi anyway? I suppose it isn't
>> >> > boot time stuff (which should go in /boot or /boot/efi). 
>> >> 
>> >> It *is* boot time stuff, and is does *not* belong into /boot.
>> >> When putting this together, I was told that the EFI partition
>> >> has to be considered volatile (i.e. may get destroyed and
>> >> re-created at any time).
>> > 
>> > Do you have a reference for this?
>> 
>> Not readily; I could ask the person who told me.
>> 
>> > OOI what is /boot/efi for if it can be regenerated at any time?
>> 
>> To boot the system. As this is using the old FAT file system, it's
>> not really reliable in case of kernel crashes and could be
>> re-initialized from the EFI shell of other firmware management
>> operations, and hence shouldn't be used for any non-volatile data.
> 
> So /boot/efi is effectively a /tmp style thing for the EFI shell?

You could view it that way, I think.

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-23 10:03             ` Jan Beulich
  2012-07-23 10:25               ` Ian Campbell
@ 2012-07-24  8:57               ` Ian Campbell
  2012-07-24  9:39                 ` Matt Wilson
  2012-07-24  9:40                 ` Jan Beulich
  1 sibling, 2 replies; 24+ messages in thread
From: Ian Campbell @ 2012-07-24  8:57 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, Matt Wilson, xen-devel

On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
> > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
> > and elilo uses /usr/lib/elilo.
> 
> It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
> really ins't well standardized (and hence an EFI_DIR override is
> warranted, yet settling on a proper default may be problematic).
> 
> > Does that mean we should be using /usr/lib/xen/efi rather than /usr/lib/efi?
> > 
> > What is the policy for EFI install location on RPM/LSB based systems?
> 
> Don't know.
> 
> >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
> >> > (or in config/*) is fine also.
> >> 
> >> That part wasn't controversial (if generally useful), but imo it
> >> shouldn't expand to an open-coded path (unless put into
> >> config/x86_64.mk).
> > 
> > I could live with that. Unlike LIBDIR, where getting it wrong can mean
> > things don't work, getting EFI_DIR wrong is merely ugly.
> 
> Not exactly - it might still mean that boot loader installation (and
> update) doesn't work anymore. But getting things consistent
> would be a one-time per-distro task, so ought to be manageable.

So is the upshot that the original patch is basically OK, subject to
settling on a reasonable default for EFI_DIR? With the proviso that
there's basically no standardisation of this stuff and every distro
seems to be choosing a different path?

/usr/lib64/efi seems as good as anything. Suitable alternatives might
be /usr/{lib,lib64}/xen/efi/...

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24  8:57               ` Ian Campbell
@ 2012-07-24  9:39                 ` Matt Wilson
  2012-07-24 10:40                   ` Jan Beulich
  2012-07-24  9:40                 ` Jan Beulich
  1 sibling, 1 reply; 24+ messages in thread
From: Matt Wilson @ 2012-07-24  9:39 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, Jan Beulich, xen-devel

On Tue, Jul 24, 2012 at 01:57:57AM -0700, Ian Campbell wrote:
> On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
> > > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
> > > and elilo uses /usr/lib/elilo.
> > 
> > It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
> > really ins't well standardized (and hence an EFI_DIR override is
> > warranted, yet settling on a proper default may be problematic).
> > 
> > > Does that mean we should be using /usr/lib/xen/efi rather than /usr/lib/efi?
> > > 
> > > What is the policy for EFI install location on RPM/LSB based systems?
> > 
> > Don't know.
> > 
> > >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
> > >> > (or in config/*) is fine also.
> > >> 
> > >> That part wasn't controversial (if generally useful), but imo it
> > >> shouldn't expand to an open-coded path (unless put into
> > >> config/x86_64.mk).
> > > 
> > > I could live with that. Unlike LIBDIR, where getting it wrong can mean
> > > things don't work, getting EFI_DIR wrong is merely ugly.
> > 
> > Not exactly - it might still mean that boot loader installation (and
> > update) doesn't work anymore. But getting things consistent
> > would be a one-time per-distro task, so ought to be manageable.
> 
> So is the upshot that the original patch is basically OK, subject to
> settling on a reasonable default for EFI_DIR? With the proviso that
> there's basically no standardisation of this stuff and every distro
> seems to be choosing a different path?

My Apologies for a late reply - I've been traveling over the past few
days.

That was my conclusion as well. For one more data point, it seems that
the GRUB2 efi binaries are deployed directly to
/boot/efi/EFI/redhat/grub.efi on Fedora/RHEL systems.

> /usr/lib64/efi seems as good as anything. Suitable alternatives might
> be /usr/{lib,lib64}/xen/efi/...

I think that /boot/xen.efi could also be suitable, but it is farther
from the pattern that we see in elilo and GRUB2 EFI binary locations
on SUSE and Debian systems. But I figure that /usr/lib64/efi is as
good as any other default choice.

Matt

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24  8:57               ` Ian Campbell
  2012-07-24  9:39                 ` Matt Wilson
@ 2012-07-24  9:40                 ` Jan Beulich
  2012-07-24 10:11                   ` Ian Campbell
  1 sibling, 1 reply; 24+ messages in thread
From: Jan Beulich @ 2012-07-24  9:40 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, Matt Wilson, xen-devel

>>> On 24.07.12 at 10:57, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
>> > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
>> > and elilo uses /usr/lib/elilo.
>> 
>> It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
>> really ins't well standardized (and hence an EFI_DIR override is
>> warranted, yet settling on a proper default may be problematic).
>> 
>> > Does that mean we should be using /usr/lib/xen/efi rather than 
> /usr/lib/efi?
>> > 
>> > What is the policy for EFI install location on RPM/LSB based systems?
>> 
>> Don't know.
>> 
>> >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
>> >> > (or in config/*) is fine also.
>> >> 
>> >> That part wasn't controversial (if generally useful), but imo it
>> >> shouldn't expand to an open-coded path (unless put into
>> >> config/x86_64.mk).
>> > 
>> > I could live with that. Unlike LIBDIR, where getting it wrong can mean
>> > things don't work, getting EFI_DIR wrong is merely ugly.
>> 
>> Not exactly - it might still mean that boot loader installation (and
>> update) doesn't work anymore. But getting things consistent
>> would be a one-time per-distro task, so ought to be manageable.
> 
> So is the upshot that the original patch is basically OK, subject to
> settling on a reasonable default for EFI_DIR? With the proviso that
> there's basically no standardisation of this stuff and every distro
> seems to be choosing a different path?

Yes, that's my understanding too.

> /usr/lib64/efi seems as good as anything. Suitable alternatives might
> be /usr/{lib,lib64}/xen/efi/...

Until we know better, I'd prefer to continue to use the location
we used so far (i.e. /usr/lib64/efi).

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24  9:40                 ` Jan Beulich
@ 2012-07-24 10:11                   ` Ian Campbell
  2012-07-24 10:43                     ` Jan Beulich
  0 siblings, 1 reply; 24+ messages in thread
From: Ian Campbell @ 2012-07-24 10:11 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, Matt Wilson, xen-devel

On Tue, 2012-07-24 at 10:40 +0100, Jan Beulich wrote:
> >>> On 24.07.12 at 10:57, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
> >> > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
> >> > and elilo uses /usr/lib/elilo.
> >> 
> >> It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
> >> really ins't well standardized (and hence an EFI_DIR override is
> >> warranted, yet settling on a proper default may be problematic).
> >> 
> >> > Does that mean we should be using /usr/lib/xen/efi rather than 
> > /usr/lib/efi?
> >> > 
> >> > What is the policy for EFI install location on RPM/LSB based systems?
> >> 
> >> Don't know.
> >> 
> >> >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
> >> >> > (or in config/*) is fine also.
> >> >> 
> >> >> That part wasn't controversial (if generally useful), but imo it
> >> >> shouldn't expand to an open-coded path (unless put into
> >> >> config/x86_64.mk).
> >> > 
> >> > I could live with that. Unlike LIBDIR, where getting it wrong can mean
> >> > things don't work, getting EFI_DIR wrong is merely ugly.
> >> 
> >> Not exactly - it might still mean that boot loader installation (and
> >> update) doesn't work anymore. But getting things consistent
> >> would be a one-time per-distro task, so ought to be manageable.
> > 
> > So is the upshot that the original patch is basically OK, subject to
> > settling on a reasonable default for EFI_DIR? With the proviso that
> > there's basically no standardisation of this stuff and every distro
> > seems to be choosing a different path?
> 
> Yes, that's my understanding too.
> 
> > /usr/lib64/efi seems as good as anything. Suitable alternatives might
> > be /usr/{lib,lib64}/xen/efi/...
> 
> Until we know better, I'd prefer to continue to use the location
> we used so far (i.e. /usr/lib64/efi).

OK by me.

Are you going to ack / commit this patch?


> 
> Jan
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24  9:39                 ` Matt Wilson
@ 2012-07-24 10:40                   ` Jan Beulich
  0 siblings, 0 replies; 24+ messages in thread
From: Jan Beulich @ 2012-07-24 10:40 UTC (permalink / raw)
  To: Matt Wilson; +Cc: Olaf Hering, Ian Campbell, xen-devel

>>> On 24.07.12 at 11:39, Matt Wilson <msw@amazon.com> wrote:
> On Tue, Jul 24, 2012 at 01:57:57AM -0700, Ian Campbell wrote:
>> /usr/lib64/efi seems as good as anything. Suitable alternatives might
>> be /usr/{lib,lib64}/xen/efi/...
> 
> I think that /boot/xen.efi could also be suitable, but it is farther
> from the pattern that we see in elilo and GRUB2 EFI binary locations
> on SUSE and Debian systems. But I figure that /usr/lib64/efi is as
> good as any other default choice.

/boot is certainly not a good choice - when there is a separate
boot partition, it's usually not that big, and putting stuff there
that's completely useless for the purpose of the partition doesn't
seem acceptable to me.

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24 10:11                   ` Ian Campbell
@ 2012-07-24 10:43                     ` Jan Beulich
  2012-07-24 12:04                       ` Matt Wilson
  0 siblings, 1 reply; 24+ messages in thread
From: Jan Beulich @ 2012-07-24 10:43 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, Matt Wilson, xen-devel

>>> On 24.07.12 at 12:11, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Tue, 2012-07-24 at 10:40 +0100, Jan Beulich wrote:
>> >>> On 24.07.12 at 10:57, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> > On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
>> >> > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
>> >> > and elilo uses /usr/lib/elilo.
>> >> 
>> >> It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
>> >> really ins't well standardized (and hence an EFI_DIR override is
>> >> warranted, yet settling on a proper default may be problematic).
>> >> 
>> >> > Does that mean we should be using /usr/lib/xen/efi rather than 
>> > /usr/lib/efi?
>> >> > 
>> >> > What is the policy for EFI install location on RPM/LSB based systems?
>> >> 
>> >> Don't know.
>> >> 
>> >> >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
>> >> >> > (or in config/*) is fine also.
>> >> >> 
>> >> >> That part wasn't controversial (if generally useful), but imo it
>> >> >> shouldn't expand to an open-coded path (unless put into
>> >> >> config/x86_64.mk).
>> >> > 
>> >> > I could live with that. Unlike LIBDIR, where getting it wrong can mean
>> >> > things don't work, getting EFI_DIR wrong is merely ugly.
>> >> 
>> >> Not exactly - it might still mean that boot loader installation (and
>> >> update) doesn't work anymore. But getting things consistent
>> >> would be a one-time per-distro task, so ought to be manageable.
>> > 
>> > So is the upshot that the original patch is basically OK, subject to
>> > settling on a reasonable default for EFI_DIR? With the proviso that
>> > there's basically no standardisation of this stuff and every distro
>> > seems to be choosing a different path?
>> 
>> Yes, that's my understanding too.
>> 
>> > /usr/lib64/efi seems as good as anything. Suitable alternatives might
>> > be /usr/{lib,lib64}/xen/efi/...
>> 
>> Until we know better, I'd prefer to continue to use the location
>> we used so far (i.e. /usr/lib64/efi).
> 
> OK by me.
> 
> Are you going to ack / commit this patch?

Once we see a version matching the outcome of the discussion
I would, certainly. Adjusting the patch that was sent earlier
would be something I'd likely get to only later this or next week.

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24 10:43                     ` Jan Beulich
@ 2012-07-24 12:04                       ` Matt Wilson
  2012-07-24 12:28                         ` Jan Beulich
  0 siblings, 1 reply; 24+ messages in thread
From: Matt Wilson @ 2012-07-24 12:04 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, Ian Campbell, xen-devel

On Tue, Jul 24, 2012 at 03:43:01AM -0700, Jan Beulich wrote:
> >>> On 24.07.12 at 12:11, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > On Tue, 2012-07-24 at 10:40 +0100, Jan Beulich wrote:
> >> >>> On 24.07.12 at 10:57, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> >> > On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
> >> >> > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
> >> >> > and elilo uses /usr/lib/elilo.
> >> >> 
> >> >> It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
> >> >> really ins't well standardized (and hence an EFI_DIR override is
> >> >> warranted, yet settling on a proper default may be problematic).
> >> >> 
> >> >> > Does that mean we should be using /usr/lib/xen/efi rather than 
> >> > /usr/lib/efi?
> >> >> > 
> >> >> > What is the policy for EFI install location on RPM/LSB based systems?
> >> >> 
> >> >> Don't know.
> >> >> 
> >> >> >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
> >> >> >> > (or in config/*) is fine also.
> >> >> >> 
> >> >> >> That part wasn't controversial (if generally useful), but imo it
> >> >> >> shouldn't expand to an open-coded path (unless put into
> >> >> >> config/x86_64.mk).
> >> >> > 
> >> >> > I could live with that. Unlike LIBDIR, where getting it wrong can mean
> >> >> > things don't work, getting EFI_DIR wrong is merely ugly.
> >> >> 
> >> >> Not exactly - it might still mean that boot loader installation (and
> >> >> update) doesn't work anymore. But getting things consistent
> >> >> would be a one-time per-distro task, so ought to be manageable.
> >> > 
> >> > So is the upshot that the original patch is basically OK, subject to
> >> > settling on a reasonable default for EFI_DIR? With the proviso that
> >> > there's basically no standardisation of this stuff and every distro
> >> > seems to be choosing a different path?
> >> 
> >> Yes, that's my understanding too.
> >> 
> >> > /usr/lib64/efi seems as good as anything. Suitable alternatives might
> >> > be /usr/{lib,lib64}/xen/efi/...
> >> 
> >> Until we know better, I'd prefer to continue to use the location
> >> we used so far (i.e. /usr/lib64/efi).
> > 
> > OK by me.
> > 
> > Are you going to ack / commit this patch?
> 
> Once we see a version matching the outcome of the discussion
> I would, certainly. Adjusting the patch that was sent earlier
> would be something I'd likely get to only later this or next week.

The current patch places xen.efi in /usr/lib64/efi/

$ find dist -name *efi
dist/install/usr/lib64/efi
dist/install/usr/lib64/efi/xen-4.2.efi
dist/install/usr/lib64/efi/xen-4.efi
dist/install/usr/lib64/efi/xen-4.2-unstable.efi
dist/install/usr/lib64/efi/xen.efi

Is there some other change needed?

Matt

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24 12:04                       ` Matt Wilson
@ 2012-07-24 12:28                         ` Jan Beulich
  2012-07-24 12:38                           ` Ian Campbell
  2012-07-24 13:51                           ` [PATCH v2] " Matt Wilson
  0 siblings, 2 replies; 24+ messages in thread
From: Jan Beulich @ 2012-07-24 12:28 UTC (permalink / raw)
  To: Matt Wilson; +Cc: Olaf Hering, Ian Campbell, xen-devel

>>> On 24.07.12 at 14:04, Matt Wilson <msw@amazon.com> wrote:
> On Tue, Jul 24, 2012 at 03:43:01AM -0700, Jan Beulich wrote:
>> >>> On 24.07.12 at 12:11, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> > On Tue, 2012-07-24 at 10:40 +0100, Jan Beulich wrote:
>> >> >>> On 24.07.12 at 10:57, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> >> > On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
>> >> >> > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
>> >> >> > and elilo uses /usr/lib/elilo.
>> >> >> 
>> >> >> It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
>> >> >> really ins't well standardized (and hence an EFI_DIR override is
>> >> >> warranted, yet settling on a proper default may be problematic).
>> >> >> 
>> >> >> > Does that mean we should be using /usr/lib/xen/efi rather than 
>> >> > /usr/lib/efi?
>> >> >> > 
>> >> >> > What is the policy for EFI install location on RPM/LSB based systems?
>> >> >> 
>> >> >> Don't know.
>> >> >> 
>> >> >> >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
>> >> >> >> > (or in config/*) is fine also.
>> >> >> >> 
>> >> >> >> That part wasn't controversial (if generally useful), but imo it
>> >> >> >> shouldn't expand to an open-coded path (unless put into
>> >> >> >> config/x86_64.mk).
>> >> >> > 
>> >> >> > I could live with that. Unlike LIBDIR, where getting it wrong can mean
>> >> >> > things don't work, getting EFI_DIR wrong is merely ugly.
>> >> >> 
>> >> >> Not exactly - it might still mean that boot loader installation (and
>> >> >> update) doesn't work anymore. But getting things consistent
>> >> >> would be a one-time per-distro task, so ought to be manageable.
>> >> > 
>> >> > So is the upshot that the original patch is basically OK, subject to
>> >> > settling on a reasonable default for EFI_DIR? With the proviso that
>> >> > there's basically no standardisation of this stuff and every distro
>> >> > seems to be choosing a different path?
>> >> 
>> >> Yes, that's my understanding too.
>> >> 
>> >> > /usr/lib64/efi seems as good as anything. Suitable alternatives might
>> >> > be /usr/{lib,lib64}/xen/efi/...
>> >> 
>> >> Until we know better, I'd prefer to continue to use the location
>> >> we used so far (i.e. /usr/lib64/efi).
>> > 
>> > OK by me.
>> > 
>> > Are you going to ack / commit this patch?
>> 
>> Once we see a version matching the outcome of the discussion
>> I would, certainly. Adjusting the patch that was sent earlier
>> would be something I'd likely get to only later this or next week.
> 
> The current patch places xen.efi in /usr/lib64/efi/
> 
> $ find dist -name *efi
> dist/install/usr/lib64/efi
> dist/install/usr/lib64/efi/xen-4.2.efi
> dist/install/usr/lib64/efi/xen-4.efi
> dist/install/usr/lib64/efi/xen-4.2-unstable.efi
> dist/install/usr/lib64/efi/xen.efi
> 
> Is there some other change needed?

The placement of the default EFI_DIR definition needs adjustment
iirc - if we're going to hard-code an architecture specific directory,
that definition ought to live in config/x86_64.mk.

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24 12:28                         ` Jan Beulich
@ 2012-07-24 12:38                           ` Ian Campbell
  2012-07-24 12:53                             ` Jan Beulich
  2012-07-24 13:51                           ` [PATCH v2] " Matt Wilson
  1 sibling, 1 reply; 24+ messages in thread
From: Ian Campbell @ 2012-07-24 12:38 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, Matt Wilson, xen-devel

On Tue, 2012-07-24 at 13:28 +0100, Jan Beulich wrote:
> >>> On 24.07.12 at 14:04, Matt Wilson <msw@amazon.com> wrote:
> > On Tue, Jul 24, 2012 at 03:43:01AM -0700, Jan Beulich wrote:
> >> >>> On 24.07.12 at 12:11, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> >> > On Tue, 2012-07-24 at 10:40 +0100, Jan Beulich wrote:
> >> >> >>> On 24.07.12 at 10:57, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> >> >> > On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
> >> >> >> > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
> >> >> >> > and elilo uses /usr/lib/elilo.
> >> >> >> 
> >> >> >> It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
> >> >> >> really ins't well standardized (and hence an EFI_DIR override is
> >> >> >> warranted, yet settling on a proper default may be problematic).
> >> >> >> 
> >> >> >> > Does that mean we should be using /usr/lib/xen/efi rather than 
> >> >> > /usr/lib/efi?
> >> >> >> > 
> >> >> >> > What is the policy for EFI install location on RPM/LSB based systems?
> >> >> >> 
> >> >> >> Don't know.
> >> >> >> 
> >> >> >> >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
> >> >> >> >> > (or in config/*) is fine also.
> >> >> >> >> 
> >> >> >> >> That part wasn't controversial (if generally useful), but imo it
> >> >> >> >> shouldn't expand to an open-coded path (unless put into
> >> >> >> >> config/x86_64.mk).
> >> >> >> > 
> >> >> >> > I could live with that. Unlike LIBDIR, where getting it wrong can mean
> >> >> >> > things don't work, getting EFI_DIR wrong is merely ugly.
> >> >> >> 
> >> >> >> Not exactly - it might still mean that boot loader installation (and
> >> >> >> update) doesn't work anymore. But getting things consistent
> >> >> >> would be a one-time per-distro task, so ought to be manageable.
> >> >> > 
> >> >> > So is the upshot that the original patch is basically OK, subject to
> >> >> > settling on a reasonable default for EFI_DIR? With the proviso that
> >> >> > there's basically no standardisation of this stuff and every distro
> >> >> > seems to be choosing a different path?
> >> >> 
> >> >> Yes, that's my understanding too.
> >> >> 
> >> >> > /usr/lib64/efi seems as good as anything. Suitable alternatives might
> >> >> > be /usr/{lib,lib64}/xen/efi/...
> >> >> 
> >> >> Until we know better, I'd prefer to continue to use the location
> >> >> we used so far (i.e. /usr/lib64/efi).
> >> > 
> >> > OK by me.
> >> > 
> >> > Are you going to ack / commit this patch?
> >> 
> >> Once we see a version matching the outcome of the discussion
> >> I would, certainly. Adjusting the patch that was sent earlier
> >> would be something I'd likely get to only later this or next week.
> > 
> > The current patch places xen.efi in /usr/lib64/efi/
> > 
> > $ find dist -name *efi
> > dist/install/usr/lib64/efi
> > dist/install/usr/lib64/efi/xen-4.2.efi
> > dist/install/usr/lib64/efi/xen-4.efi
> > dist/install/usr/lib64/efi/xen-4.2-unstable.efi
> > dist/install/usr/lib64/efi/xen.efi
> > 
> > Is there some other change needed?
> 
> The placement of the default EFI_DIR definition needs adjustment
> iirc - if we're going to hard-code an architecture specific directory,
> that definition ought to live in config/x86_64.mk.

With an alternative in config/x86_32.mk? 

Or do these belong in StdGNU.mk etc?

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24 12:38                           ` Ian Campbell
@ 2012-07-24 12:53                             ` Jan Beulich
  0 siblings, 0 replies; 24+ messages in thread
From: Jan Beulich @ 2012-07-24 12:53 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, Matt Wilson, xen-devel

>>> On 24.07.12 at 14:38, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Tue, 2012-07-24 at 13:28 +0100, Jan Beulich wrote:
>> >>> On 24.07.12 at 14:04, Matt Wilson <msw@amazon.com> wrote:
>> > On Tue, Jul 24, 2012 at 03:43:01AM -0700, Jan Beulich wrote:
>> >> >>> On 24.07.12 at 12:11, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> >> > On Tue, 2012-07-24 at 10:40 +0100, Jan Beulich wrote:
>> >> >> >>> On 24.07.12 at 10:57, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> >> >> > On Mon, 2012-07-23 at 11:03 +0100, Jan Beulich wrote:
>> >> >> >> > I noticed that (at least on Debian) grub uses /usr/lib/grub/<arch>-efi
>> >> >> >> > and elilo uses /usr/lib/elilo.
>> >> >> >> 
>> >> >> >> It's definitely /usr/lib64/efi/elilo.efi on SLE11, so I'm afraid this
>> >> >> >> really ins't well standardized (and hence an EFI_DIR override is
>> >> >> >> warranted, yet settling on a proper default may be problematic).
>> >> >> >> 
>> >> >> >> > Does that mean we should be using /usr/lib/xen/efi rather than 
>> >> >> > /usr/lib/efi?
>> >> >> >> > 
>> >> >> >> > What is the policy for EFI install location on RPM/LSB based systems?
>> >> >> >> 
>> >> >> >> Don't know.
>> >> >> >> 
>> >> >> >> >> > We already have EFI_MOUNTPOINT under xen/*, I think EFI_DIR under there
>> >> >> >> >> > (or in config/*) is fine also.
>> >> >> >> >> 
>> >> >> >> >> That part wasn't controversial (if generally useful), but imo it
>> >> >> >> >> shouldn't expand to an open-coded path (unless put into
>> >> >> >> >> config/x86_64.mk).
>> >> >> >> > 
>> >> >> >> > I could live with that. Unlike LIBDIR, where getting it wrong can mean
>> >> >> >> > things don't work, getting EFI_DIR wrong is merely ugly.
>> >> >> >> 
>> >> >> >> Not exactly - it might still mean that boot loader installation (and
>> >> >> >> update) doesn't work anymore. But getting things consistent
>> >> >> >> would be a one-time per-distro task, so ought to be manageable.
>> >> >> > 
>> >> >> > So is the upshot that the original patch is basically OK, subject to
>> >> >> > settling on a reasonable default for EFI_DIR? With the proviso that
>> >> >> > there's basically no standardisation of this stuff and every distro
>> >> >> > seems to be choosing a different path?
>> >> >> 
>> >> >> Yes, that's my understanding too.
>> >> >> 
>> >> >> > /usr/lib64/efi seems as good as anything. Suitable alternatives might
>> >> >> > be /usr/{lib,lib64}/xen/efi/...
>> >> >> 
>> >> >> Until we know better, I'd prefer to continue to use the location
>> >> >> we used so far (i.e. /usr/lib64/efi).
>> >> > 
>> >> > OK by me.
>> >> > 
>> >> > Are you going to ack / commit this patch?
>> >> 
>> >> Once we see a version matching the outcome of the discussion
>> >> I would, certainly. Adjusting the patch that was sent earlier
>> >> would be something I'd likely get to only later this or next week.
>> > 
>> > The current patch places xen.efi in /usr/lib64/efi/
>> > 
>> > $ find dist -name *efi
>> > dist/install/usr/lib64/efi
>> > dist/install/usr/lib64/efi/xen-4.2.efi
>> > dist/install/usr/lib64/efi/xen-4.efi
>> > dist/install/usr/lib64/efi/xen-4.2-unstable.efi
>> > dist/install/usr/lib64/efi/xen.efi
>> > 
>> > Is there some other change needed?
>> 
>> The placement of the default EFI_DIR definition needs adjustment
>> iirc - if we're going to hard-code an architecture specific directory,
>> that definition ought to live in config/x86_64.mk.
> 
> With an alternative in config/x86_32.mk? 

There's no EFI support on x86-32.

> Or do these belong in StdGNU.mk etc?

No.

Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
  2012-07-24 12:28                         ` Jan Beulich
  2012-07-24 12:38                           ` Ian Campbell
@ 2012-07-24 13:51                           ` Matt Wilson
  1 sibling, 0 replies; 24+ messages in thread
From: Matt Wilson @ 2012-07-24 13:51 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Olaf Hering, Ian Campbell, xen-devel

After commit 25594:ad08cd8e7097, EFI Xen binaries were installed to
/efi instead of /usr/lib64/efi. This patch restores the previous
behviour established in commit 23645:638f31a30b6c.

Changes since v2:
 * Move the definition of EFI_DIR to config/x86_64.mk
 * Check to make sure that EFI_DIR is defined when installing files
   in xen/Makefile

Signed-off-by: Matt Wilson <msw@amazon.com>
Reported-by: Olaf Hering <olaf@aepfle.de>

diff -r 9950f2dc2ee6 -r 56aae8a6e7f3 config/x86_64.mk
--- a/config/x86_64.mk	Mon Jul 09 10:10:27 2012 +0100
+++ b/config/x86_64.mk	Mon Jul 16 23:37:16 2012 +0000
@@ -12,6 +12,8 @@ CFLAGS += -m64
 
 SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64)
 
+EFI_DIR ?= /usr/lib64/efi
+
 # Use only if calling $(LD) directly.
 ifeq ($(XEN_OS),OpenBSD)
 LDFLAGS_DIRECT += -melf_x86_64_obsd
diff -r 9950f2dc2ee6 -r 56aae8a6e7f3 docs/misc/efi.markdown
--- a/docs/misc/efi.markdown	Mon Jul 09 10:10:27 2012 +0100
+++ b/docs/misc/efi.markdown	Mon Jul 16 23:37:16 2012 +0000
@@ -4,10 +4,12 @@ newer. Additionally, the binutils build 
 for the x86_64-pep emulation (i.e. `--enable-targets=x86_64-pep` or an option
 of equivalent effect should be passed to the configure script).
 
-Once built, `make install-xen` can place the resulting binary directly into
+Once built, `make install-xen` will place the resulting binary directly into
 the EFI boot partition, provided `EFI_VENDOR` is set in the environment (and
 `EFI_MOUNTPOINT` is overridden as needed, should the default of `/boot/efi` not
-match your system).
+match your system). The xen.efi binary will also be installed in
+`/usr/lib64/efi/`, unless `EFI_DIR` is set in the environment to 
+override the default.
 
 The binary itself will require a configuration file (names with the `.efi`
 extension of the binary's name replaced by `.cfg`, and - until an existing
diff -r 9950f2dc2ee6 -r 56aae8a6e7f3 xen/Makefile
--- a/xen/Makefile	Mon Jul 09 10:10:27 2012 +0100
+++ b/xen/Makefile	Mon Jul 16 23:37:16 2012 +0000
@@ -35,12 +35,12 @@ build install debug clean distclean csco
 	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
 	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
 	$(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
-	if [ -r $(TARGET).efi ]; then \
-		[ -d $(DESTDIR)$(LIBDIR)/efi ] || $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/efi; \
-		$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
-		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
-		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
-		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET)).efi; \
+	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
+		[ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \
+		$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
+		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
+		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
+		ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET)).efi; \
 		if [ -n '$(EFI_MOUNTPOINT)' -a -n '$(EFI_VENDOR)' ]; then \
 			$(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
 		elif [ "$(DESTDIR)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(DESTDIR))" ]; then \

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2012-07-24 13:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-16 23:50 [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi Matt Wilson
2012-07-20 18:52 ` Matt Wilson
2012-07-23  7:49 ` Jan Beulich
2012-07-23  8:05   ` Olaf Hering
2012-07-23  8:20     ` Jan Beulich
2012-07-23  8:36       ` Olaf Hering
2012-07-23  8:58         ` Jan Beulich
2012-07-23  8:43       ` Ian Campbell
2012-07-23  9:07         ` Jan Beulich
2012-07-23  9:35           ` Ian Campbell
2012-07-23 10:03             ` Jan Beulich
2012-07-23 10:25               ` Ian Campbell
2012-07-23 10:28                 ` Jan Beulich
2012-07-24  8:57               ` Ian Campbell
2012-07-24  9:39                 ` Matt Wilson
2012-07-24 10:40                   ` Jan Beulich
2012-07-24  9:40                 ` Jan Beulich
2012-07-24 10:11                   ` Ian Campbell
2012-07-24 10:43                     ` Jan Beulich
2012-07-24 12:04                       ` Matt Wilson
2012-07-24 12:28                         ` Jan Beulich
2012-07-24 12:38                           ` Ian Campbell
2012-07-24 12:53                             ` Jan Beulich
2012-07-24 13:51                           ` [PATCH v2] " Matt Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.