diff options
author | Matt Wilson <msw@amazon.com> | 2012-07-24 17:02:04 +0200 |
---|---|---|
committer | Matt Wilson <msw@amazon.com> | 2012-07-24 17:02:04 +0200 |
commit | 9e0de31c672fd127e6fb0c88a26eb147037a9abc (patch) | |
tree | 147961dad1a4328d54ad2ca37bd2059adcf21f86 | |
parent | f2c89c53c44d9d8adbba43db6f02701c8b155383 (diff) | |
download | xen-9e0de31c672fd127e6fb0c88a26eb147037a9abc.tar.gz xen-9e0de31c672fd127e6fb0c88a26eb147037a9abc.tar.bz2 xen-9e0de31c672fd127e6fb0c88a26eb147037a9abc.zip |
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
behaviour established in commit 23645:638f31a30b6c.
Signed-off-by: Matt Wilson <msw@amazon.com>
Reported-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Jan Beulich <jbeulich@suse.com>
-rw-r--r-- | config/x86_64.mk | 2 | ||||
-rw-r--r-- | docs/misc/efi.markdown | 6 | ||||
-rw-r--r-- | xen/Makefile | 12 |
3 files changed, 12 insertions, 8 deletions
diff --git a/config/x86_64.mk b/config/x86_64.mk index f9b21b14e4..7bead5c455 100644 --- a/config/x86_64.mk +++ b/config/x86_64.mk @@ -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 --git a/docs/misc/efi.markdown b/docs/misc/efi.markdown index 652ea4d1ff..d697bc23c8 100644 --- a/docs/misc/efi.markdown +++ b/docs/misc/efi.markdown @@ -4,10 +4,12 @@ newer. Additionally, the binutils build must be configured to include support 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 this +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 --git a/xen/Makefile b/xen/Makefile index fc8ce18f30..35d491e1bc 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -35,12 +35,12 @@ _install: $(TARGET).gz 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 \ |