diff mbox

[Xen-devel,RFC,2/2] arm64: Create xen.efi binary for arm64

Message ID 1412212299-13831-3-git-send-email-roy.franz@linaro.org
State New
Headers show

Commit Message

Roy Franz Oct. 2, 2014, 1:11 a.m. UTC
The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
copy it to xen.efi so that the 'make install' processing is shared with
x86. Prior to this 'make install' was broken on arm64.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
---
 config/arm64.mk       | 2 ++
 xen/arch/arm/Makefile | 4 ++++
 2 files changed, 6 insertions(+)

Comments

Ian Campbell Oct. 2, 2014, 1:03 p.m. UTC | #1
On Wed, 2014-10-01 at 18:11 -0700, Roy Franz wrote:
> The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
> copy it to xen.efi so that the 'make install' processing is shared with
> x86. Prior to this 'make install' was broken on arm64.
> 
> Signed-off-by: Roy Franz <roy.franz@linaro.org>

If the affect of this is only to install Xen (and some symlinks)
into /usr/lib64/efi and optionally into the ESP then:
        Acked-by: Ian Campbell <ian.campbell@citrix.com>
        
What I don't want is for an extra xen.efi to show up in the
regular /boot directory. I think this patch doesn't do that though.

Jan, slight aside: what do you think about setting EFI_VENDOR to e.g.
XenProject by default (i.e. installing into the ESP by default)?
Jan Beulich Oct. 2, 2014, 1:09 p.m. UTC | #2
>>> On 02.10.14 at 15:03, <Ian.Campbell@citrix.com> wrote:
> On Wed, 2014-10-01 at 18:11 -0700, Roy Franz wrote:
>> The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
>> copy it to xen.efi so that the 'make install' processing is shared with
>> x86. Prior to this 'make install' was broken on arm64.
>> 
>> Signed-off-by: Roy Franz <roy.franz@linaro.org>
> 
> If the affect of this is only to install Xen (and some symlinks)
> into /usr/lib64/efi and optionally into the ESP then:
>         Acked-by: Ian Campbell <ian.campbell@citrix.com>
>         
> What I don't want is for an extra xen.efi to show up in the
> regular /boot directory. I think this patch doesn't do that though.
> 
> Jan, slight aside: what do you think about setting EFI_VENDOR to e.g.
> XenProject by default (i.e. installing into the ESP by default)?

The respective directory on the EFI partition ought to exist (and
I don't think we should be creating it). This part of the installation
being only an aid for developers anyway, I'd prefer keeping
EFI_VENDOR undefined (and hence skipping that installation step)
by default.

Jan
Ian Campbell Oct. 2, 2014, 2:08 p.m. UTC | #3
On Thu, 2014-10-02 at 14:09 +0100, Jan Beulich wrote:
> >>> On 02.10.14 at 15:03, <Ian.Campbell@citrix.com> wrote:
> > On Wed, 2014-10-01 at 18:11 -0700, Roy Franz wrote:
> >> The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
> >> copy it to xen.efi so that the 'make install' processing is shared with
> >> x86. Prior to this 'make install' was broken on arm64.
> >> 
> >> Signed-off-by: Roy Franz <roy.franz@linaro.org>
> > 
> > If the affect of this is only to install Xen (and some symlinks)
> > into /usr/lib64/efi and optionally into the ESP then:
> >         Acked-by: Ian Campbell <ian.campbell@citrix.com>
> >         
> > What I don't want is for an extra xen.efi to show up in the
> > regular /boot directory. I think this patch doesn't do that though.
> > 
> > Jan, slight aside: what do you think about setting EFI_VENDOR to e.g.
> > XenProject by default (i.e. installing into the ESP by default)?
> 
> The respective directory on the EFI partition ought to exist (and
> I don't think we should be creating it). This part of the installation
> being only an aid for developers anyway, I'd prefer keeping
> EFI_VENDOR undefined (and hence skipping that installation step)
> by default.

Makes sense to me, thanks.

Ian.
Roy Franz Oct. 2, 2014, 4:56 p.m. UTC | #4
On Thu, Oct 2, 2014 at 7:08 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Thu, 2014-10-02 at 14:09 +0100, Jan Beulich wrote:
>> >>> On 02.10.14 at 15:03, <Ian.Campbell@citrix.com> wrote:
>> > On Wed, 2014-10-01 at 18:11 -0700, Roy Franz wrote:
>> >> The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
>> >> copy it to xen.efi so that the 'make install' processing is shared with
>> >> x86. Prior to this 'make install' was broken on arm64.
>> >>
>> >> Signed-off-by: Roy Franz <roy.franz@linaro.org>
>> >
>> > If the affect of this is only to install Xen (and some symlinks)
>> > into /usr/lib64/efi and optionally into the ESP then:
>> >         Acked-by: Ian Campbell <ian.campbell@citrix.com>
>> >
>> > What I don't want is for an extra xen.efi to show up in the
>> > regular /boot directory. I think this patch doesn't do that though.
>> >
>> > Jan, slight aside: what do you think about setting EFI_VENDOR to e.g.
>> > XenProject by default (i.e. installing into the ESP by default)?
>>
>> The respective directory on the EFI partition ought to exist (and
>> I don't think we should be creating it). This part of the installation
>> being only an aid for developers anyway, I'd prefer keeping
>> EFI_VENDOR undefined (and hence skipping that installation step)
>> by default.
>
> Makes sense to me, thanks.
>
> Ian.
>
Thanks.  I wasn't sure how important this was, and wanted a conscious
decision made
regarding it rather than being left out for ARM due to an oversight.

Roy
diff mbox

Patch

diff --git a/config/arm64.mk b/config/arm64.mk
index 4e57b3a..6eafda2 100644
--- a/config/arm64.mk
+++ b/config/arm64.mk
@@ -15,3 +15,5 @@  LDFLAGS_DIRECT += -EL
 CONFIG_LOAD_ADDRESS ?= 0x80000000
 
 IOEMU_CPU_ARCH ?= aarch64
+
+EFI_DIR ?= /usr/lib64/efi
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index f330302..9a25290 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -49,6 +49,9 @@  ALL_OBJS := $(TARGET_SUBARCH)/head.o $(ALL_OBJS)
 
 $(TARGET): $(TARGET)-syms $(TARGET).axf
 	$(OBJCOPY) -O binary -S $< $@
+ifeq (arm64,$(XEN_TARGET_ARCH))
+	ln -sf $(notdir $@)  ../../$(notdir $@).efi
+endif
 
 $(TARGET).axf: $(TARGET)-syms
 	# XXX: VE model loads by VMA so instead of
@@ -100,3 +103,4 @@  clean::
 	rm -f asm-offsets.s xen.lds
 	rm -f $(BASEDIR)/.xen-syms.[0-9]*
 	rm -f $(TARGET).axf
+	rm -f $(TARGET).efi