x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
PATCH 1/1 x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
# HG changeset patch
# User Matt Wilson <[email protected]>
# 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.
Config.mk +1 -0
@@ -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
docs/misc/efi.markdown +4 -2
@@ -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
xen/Makefile +5 -5
@@ -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 \
Quoted 9 lines · Matt
x86/EFI: define and use
EFI_DIRmake variable, defaulting to/usr/lib64/efiAfter 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 <[email protected]>Reported-by Olaf Hering <[email protected]>
Olaf, can you give this a test?
Matt
Quoted 54 lines
diff -r
9950f2dc2ee6-rdd1ab0cae2c8Config.mkConfig.mk +1
-0@@ -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_dirdiff -r
9950f2dc2ee6-rdd1ab0cae2c8docs/misc/efi.markdowndocs/misc/efi.markdown +4
-2@@ -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 existingdiff -r
9950f2dc2ee6-rdd1ab0cae2c8xen/Makefilexen/Makefile +5
-5@@ -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
[email protected]
http://lists.xen.org/xen-devel
Quoted 9 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
# HG changeset patch
# User Matt Wilson <[email protected]>
# Date 1342481836 0
# Branch efi
# Node IDdd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
# Parent9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
x86/EFI: define and useEFI_DIRmake variable, defaulting to/usr/lib64/efi
Quoted 3 lines
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.
Config.mk SHAREDIR ?= $(PREFIX)/share · line 51
Quoted 11 lines
Signed-off-by Matt Wilson <[email protected]>Reported-by Olaf Hering <[email protected]>diff -r
9950f2dc2ee6-rdd1ab0cae2c8Config.mkConfig.mk +1
-0@@ -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
Quoted 58 lines
Config.mk +0
-0# arguments: variable, common path part, path to test, if yes, if no define setvar_dirdiff -r
9950f2dc2ee6-rdd1ab0cae2c8docs/misc/efi.markdowndocs/misc/efi.markdown +1
-1@@ -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_MOUNTPOINTis overridden as needed, should the default of/boot/efi
notdocs/misc/efi.markdown +3
-1-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 existingdiff -r
9950f2dc2ee6-rdd1ab0cae2c8xen/Makefilexen/Makefile +0
-0@@ -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)xen/Makefile +0
-2if [ -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; \
xen/Makefile +0
-1- ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi$(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
xen/Makefile +0
-1- ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi$(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
xen/Makefile +0
-1- ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi$(DESTDIR)$(LIBDIR)/efi/$(notdir $(TARGET)).efi; \
xen/Makefile +2
-0+ [ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \ + $(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_DIR)/$(notdir$(TARGET))-$(XEN_FULLVERSION).efi; \
xen/Makefile +1
-0+ ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi$(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
xen/Makefile +1
-0+ ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi$(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
xen/Makefile +1
-0+ ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi$(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET)).efi; \
xen/Makefile +0
-0if [ -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 \
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
# HG changeset patch
# User Matt Wilson <[email protected]>
# Date 1342481836 0
# Branch efi
# Node IDdd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
# Parent9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
x86/EFI: define and useEFI_DIRmake variable, defaulting to/usr/lib64/efi
Quoted 7 lines
Quoted 3 lines
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
Quoted 16 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
Quoted 13 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
# HG changeset patch
# User Matt Wilson <[email protected]>
# Date 1342481836 0
# Branch efi
# Node IDdd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
# Parent9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
x86/EFI: define and useEFI_DIRmake variable, defaulting to/usr/lib64/efiAfter 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.
Quoted 5 lines
Quoted 3 lines
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
Quoted 4 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
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
Quoted 9 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
Quoted 4 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
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
Quoted 16 lines · Jan Beulich
Quoted 16 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
Quoted 13 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
# HG changeset patch
# User Matt Wilson <[email protected]>
# Date 1342481836 0
# Branch efi
# Node IDdd1ab0cae2c870942c2e1b6bc3a507b1a40dae16
# Parent9950f2dc2ee6dfd172258a5a4ee29809b0ff8263
x86/EFI: define and useEFI_DIRmake variable, defaulting to/usr/lib64/efiAfter 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.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
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.
Quoted 25 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 11 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
Quoted 8 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
# HG changeset patch
# User Matt Wilson <[email protected]>
# Date 1342481836 0
# Branch efi
# Node IDdd1ab0cae2c870942c2e1b6bc3a507b1a40dae16# Parent9950f2dc2ee6dfd172258a5a4ee29809b0ff8263x86/EFI: define and useEFI_DIRmake variable, defaulting to
/usr/lib64/efiQuoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 4 lines
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?
Quoted 7 lines
Quoted 1 line
It's not set at all, I'm using what gets defined in config/*.mk.
25594:ad08cd8e7097 moved LIBDIR to configure and
config/Tools.mkso 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.
Quoted 2 lines
What is this stuff installed in
/usr/lib*/efianyway? 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.
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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
Quoted 33 lines · Jan Beulich
Quoted 25 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 11 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
Quoted 8 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
# HG changeset patch
# User Matt Wilson <[email protected]>
# Date 1342481836 0
# Branch efi
# Node IDdd1ab0cae2c870942c2e1b6bc3a507b1a40dae16# Parent9950f2dc2ee6dfd172258a5a4ee29809b0ff8263x86/EFI: define and useEFI_DIRmake variable, defaulting to
/usr/lib64/efiQuoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 4 lines
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?
Quoted 7 lines
Quoted 1 line
It's not set at all, I'm using what gets defined in config/*.mk.
25594:ad08cd8e7097 moved LIBDIR to configure and
config/Tools.mkso 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).
Quoted 3 lines
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.
Quoted 3 lines
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.
Quoted 7 lines
Quoted 2 lines
What is this stuff installed in
/usr/lib*/efianyway? 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?
Quoted 2 lines
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?
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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.
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 4 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
What is this stuff installed in
/usr/lib*/efianyway? I suppose it isn't boot time stuff (which should go in /boot or/boot/efi).
Quoted 6 lines
Quoted 4 lines
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.
Quoted 1 line
OOI what is
/boot/efifor 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.
Quoted 5 lines
Quoted 2 lines
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).
Quoted 3 lines
Does that mean we should be using
/usr/lib/xen/efirather than/usr/lib/efi?What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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_DIRwrong 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
Quoted 13 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 4 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
What is this stuff installed in
/usr/lib*/efianyway? I suppose it isn't boot time stuff (which should go in /boot or/boot/efi).Quoted 6 lines
Quoted 4 lines
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?
Quoted 8 lines
Not readily; I could ask the person who told me.
Quoted 1 line
OOI what is
/boot/efifor 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?
Quoted 10 lines
Quoted 5 lines
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).
Quoted 5 lines
Quoted 3 lines
Does that mean we should be using
/usr/lib/xen/efirather 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).
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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).
Quoted 5 lines
Quoted 2 lines
I could live with that. Unlike LIBDIR, where getting it wrong can mean things don't work, getting
EFI_DIRwrong 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...
Quoted 2 lines
But getting things consistent
would be a one-time per-distro task, so ought to be manageable.
Right.
Ian.
Quoted 17 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 15 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 4 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
What is this stuff installed in
/usr/lib*/efianyway? I suppose it isn't boot time stuff (which should go in /boot or/boot/efi).Quoted 6 lines
Quoted 4 lines
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.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
OOI what is
/boot/efifor 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/efiis effectively a /tmp style thing for the EFI shell?
You could view it that way, I think.
Jan
Quoted 20 lines · Jan Beulich
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).Quoted 3 lines
Does that mean we should be using
/usr/lib/xen/efirather than/usr/lib/efi?What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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).
Quoted 6 lines
Quoted 2 lines
I could live with that. Unlike LIBDIR, where getting it wrong can mean things don't work, getting
EFI_DIRwrong 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.
Quoted 24 lines · Ian Campbell
Quoted 23 lines · Jan Beulich
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).Quoted 3 lines
Does that mean we should be using
/usr/lib/xen/efirather than/usr/lib/efi?What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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_DIRwrong is merely ugly.
Quoted 8 lines
Quoted 3 lines
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.
Quoted 2 lines
/usr/lib64/efiseems 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
Quoted 9 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
Quoted 2 lines · Ian Campbell
/usr/lib64/efiseems as good as anything. Suitable alternatives might be/usr/{lib,lib64}/xen/efi/...I think that
/boot/xen.eficould 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/efiis 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
Quoted 26 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 8 lines · Jan Beulich
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).Quoted 1 line
Does that mean we should be using
/usr/lib/xen/efirather than
/usr/lib/efi?Quoted 15 lines
Quoted 2 lines
What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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_DIRwrong is merely ugly.
Quoted 8 lines
Quoted 3 lines
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.
Quoted 2 lines
/usr/lib64/efiseems 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
Quoted 35 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 8 lines · Jan Beulich
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).Quoted 1 line
Does that mean we should be using
/usr/lib/xen/efirather than
/usr/lib/efi?Quoted 15 lines
Quoted 2 lines
What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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_DIRwrong is merely ugly.Quoted 8 lines
Quoted 3 lines
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?
Quoted 7 lines
Yes, that's my understanding too.
Quoted 2 lines
/usr/lib64/efiseems 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?
Quoted 3 lines
Jan
Quoted 42 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 40 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 8 lines · Jan Beulich
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).Quoted 1 line
Does that mean we should be using
/usr/lib/xen/efirather than
/usr/lib/efi?Quoted 15 lines
Quoted 2 lines
What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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_DIRwrong is merely ugly.Quoted 8 lines
Quoted 3 lines
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.
Quoted 2 lines
/usr/lib64/efiseems as good as anything. Suitable alternatives might be/usr/{lib,lib64}/xen/efi/...
Quoted 6 lines
Quoted 2 lines
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
Quoted 45 lines · Jan Beulich
Quoted 45 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 42 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 8 lines · Jan Beulich
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).Quoted 1 line
Does that mean we should be using
/usr/lib/xen/efirather than
/usr/lib/efi?Quoted 15 lines
Quoted 2 lines
What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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_DIRwrong is merely ugly.Quoted 8 lines
Quoted 3 lines
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.
Quoted 2 lines
/usr/lib64/efiseems 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).
Quoted 7 lines
Quoted 3 lines
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
Quoted 57 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
Quoted 45 lines · Jan Beulich
Quoted 45 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 42 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 8 lines · Jan Beulich
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).Quoted 1 line
Does that mean we should be using
/usr/lib/xen/efirather than
/usr/lib/efi?Quoted 15 lines
Quoted 2 lines
What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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_DIRwrong is merely ugly.Quoted 8 lines
Quoted 3 lines
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.
Quoted 2 lines
/usr/lib64/efiseems 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).Quoted 7 lines
Quoted 3 lines
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/
Quoted 8 lines
$ 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.efiIs 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
Quoted 64 lines · Jan Beulich
Quoted 64 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
Quoted 45 lines · Jan Beulich
Quoted 45 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 42 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 8 lines · Jan Beulich
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).Quoted 1 line
Does that mean we should be using
/usr/lib/xen/efirather than
/usr/lib/efi?Quoted 15 lines
Quoted 2 lines
What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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_DIRwrong is merely ugly.Quoted 8 lines
Quoted 3 lines
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.
Quoted 2 lines
/usr/lib64/efiseems 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).Quoted 7 lines
Quoted 3 lines
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
Quoted 5 lines
Quoted 1 line
Is there some other change needed?
The placement of the default
EFI_DIRdefinition needs adjustment iirc - if we're going to hard-code an architecture specific directory, that definition ought to live inconfig/x86_64.mk.
With an alternative in config/x86_32.mk?
Or do these belong in StdGNU.mk etc?
Quoted 66 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 64 lines · Jan Beulich
Quoted 64 lines
Quoted 1 line
Quoted 1 line · Matt Wilson
Quoted 45 lines · Jan Beulich
Quoted 45 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 42 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 8 lines · Jan Beulich
Quoted 2 lines
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.efion SLE11, so I'm afraid this really ins't well standardized (and hence anEFI_DIRoverride is warranted, yet settling on a proper default may be problematic).Quoted 1 line
Does that mean we should be using
/usr/lib/xen/efirather than
/usr/lib/efi?Quoted 15 lines
Quoted 2 lines
What is the policy for EFI install location on RPM/LSB based systems?
Don't know.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
We already have
EFI_MOUNTPOINTunder xen/*, I thinkEFI_DIRunder 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_DIRwrong is merely ugly.Quoted 8 lines
Quoted 3 lines
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.
Quoted 2 lines
/usr/lib64/efiseems 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).Quoted 7 lines
Quoted 3 lines
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
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Is there some other change needed?
The placement of the default
EFI_DIRdefinition needs adjustment iirc - if we're going to hard-code an architecture specific directory, that definition ought to live inconfig/x86_64.mk.With an alternative in
config/x86_32.mk?
There's no EFI support on x86-32.
Quoted 1 line
Or do these belong in StdGNU.mk etc?
No.
Jan
PATCH v2 1/1 x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
In reply to Jan BeulichAfter 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
config/x86_64.mk +2 -0
@@ -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
docs/misc/efi.markdown +4 -2
@@ -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
xen/Makefile +6 -6
@@ -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 \