diff mbox

fix EFI part of "symbols: Generate an xen-sym.map"

Message ID 20161010184835.GA28607@char.us.oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Konrad Rzeszutek Wilk Oct. 10, 2016, 6:48 p.m. UTC
On Mon, Oct 10, 2016 at 01:28:16AM -0600, Jan Beulich wrote:
> >>> On 07.10.16 at 19:57, <sstabellini@kernel.org> wrote:
> > On Wed, 21 Sep 2016, Konrad Rzeszutek Wilk wrote:
> >> On Wed, Sep 21, 2016 at 10:04:21AM -0600, Jan Beulich wrote:
> >> > >>> On 21.09.16 at 17:59, <konrad.wilk@oracle.com> wrote:
> >> > > The fix can be done two ways:
> >> > >  a) See if xen.efi.map exists and then copy it
> >> > >  b) Or link xen.efi.map to xen-syms.map (similar to how xen.efi is linked
> >> > >     against xen).
> >> > > 
> >> > > The patch chooses the latter.
> >> > 
> >> > Well, if the ARM maintainers like that ... I don't really see a point in
> >> > installing the same file twice without its second incarnation having a
> >> > specific purpose.
> >> 
> >> I also have the a) part ready, which is simple:
> >> 
> >> 
> >> diff --git a/xen/Makefile b/xen/Makefile
> >> index e989a20..678f188 100644
> >> --- a/xen/Makefile
> >> +++ b/xen/Makefile
> >> @@ -67,7 +67,9 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
> >>  	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
> >>  		[ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \
> >>  		$(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
> >> -		$(INSTALL_DATA) $(TARGET).efi.map $(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
> >> +                if [ -e $(TARGET).efi.map ]; then \
> >> +		        $(INSTALL_DATA) $(TARGET).efi.map $(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
> >> +                fi; \
> >>  		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
> >>  		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \
> >>  		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \
> >> 
> >> Either fix works.
> > 
> > This is fine.
> > 
> > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> But I hope only with indentation properly cleaned up.

Like this:


From cc3edf6c2614fa69ab1d33c38a44a10c0f4a50e8 Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Wed, 21 Sep 2016 11:39:44 -0400
Subject: [PATCH v2] Makefile: fix (again) EFI part of "symbols: Generate an
 xen-sym.map

This is a follow-up to commit d14fffcc6a7c054db9e337026a3c850152244ac4
"fix EFI part of "symbols: Generate an xen-sym.map" which fixed most of
the issues.

However we still have an issue - The file being installed (xen.efi.map)
does not exist in an ARM64 build (the xen.efi is linked againts xen).

The fix can be done two ways:
 a) See if xen.efi.map exists and then copy it
 b) Or link xen.efi.map to xen-syms.map (similar to how xen.efi is linked
    against xen).

The patch chooses the first.

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reported-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
Cc: Julien Grall <julien.grall@arm.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>

v1: First submission
v2: Use the b) instead of a) option.
    Fix indentations.
---
 xen/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Stefano Stabellini Oct. 10, 2016, 6:57 p.m. UTC | #1
On Mon, 10 Oct 2016, Konrad Rzeszutek Wilk wrote:
> On Mon, Oct 10, 2016 at 01:28:16AM -0600, Jan Beulich wrote:
> > >>> On 07.10.16 at 19:57, <sstabellini@kernel.org> wrote:
> > > On Wed, 21 Sep 2016, Konrad Rzeszutek Wilk wrote:
> > >> On Wed, Sep 21, 2016 at 10:04:21AM -0600, Jan Beulich wrote:
> > >> > >>> On 21.09.16 at 17:59, <konrad.wilk@oracle.com> wrote:
> > >> > > The fix can be done two ways:
> > >> > >  a) See if xen.efi.map exists and then copy it
> > >> > >  b) Or link xen.efi.map to xen-syms.map (similar to how xen.efi is linked
> > >> > >     against xen).
> > >> > > 
> > >> > > The patch chooses the latter.
> > >> > 
> > >> > Well, if the ARM maintainers like that ... I don't really see a point in
> > >> > installing the same file twice without its second incarnation having a
> > >> > specific purpose.
> > >> 
> > >> I also have the a) part ready, which is simple:
> > >> 
> > >> 
> > >> diff --git a/xen/Makefile b/xen/Makefile
> > >> index e989a20..678f188 100644
> > >> --- a/xen/Makefile
> > >> +++ b/xen/Makefile
> > >> @@ -67,7 +67,9 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
> > >>  	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
> > >>  		[ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \
> > >>  		$(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
> > >> -		$(INSTALL_DATA) $(TARGET).efi.map $(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
> > >> +                if [ -e $(TARGET).efi.map ]; then \
> > >> +		        $(INSTALL_DATA) $(TARGET).efi.map $(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
> > >> +                fi; \
> > >>  		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
> > >>  		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \
> > >>  		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \
> > >> 
> > >> Either fix works.
> > > 
> > > This is fine.
> > > 
> > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> > 
> > But I hope only with indentation properly cleaned up.
> 
> Like this:
> 
> 
> >From cc3edf6c2614fa69ab1d33c38a44a10c0f4a50e8 Mon Sep 17 00:00:00 2001
> From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Date: Wed, 21 Sep 2016 11:39:44 -0400
> Subject: [PATCH v2] Makefile: fix (again) EFI part of "symbols: Generate an
>  xen-sym.map
> 
> This is a follow-up to commit d14fffcc6a7c054db9e337026a3c850152244ac4
> "fix EFI part of "symbols: Generate an xen-sym.map" which fixed most of
> the issues.
> 
> However we still have an issue - The file being installed (xen.efi.map)
> does not exist in an ARM64 build (the xen.efi is linked againts xen).
> 
> The fix can be done two ways:
>  a) See if xen.efi.map exists and then copy it
>  b) Or link xen.efi.map to xen-syms.map (similar to how xen.efi is linked
>     against xen).
> 
> The patch chooses the first.
> 
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> Reported-by: Jan Beulich <JBeulich@suse.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> 
> v1: First submission
> v2: Use the b) instead of a) option.
>     Fix indentations.

Thanks. I had already fixed up the patch and committed it.

Cheers,

Stefano


>  xen/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/Makefile b/xen/Makefile
> index c511330..54a3bc8 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -67,7 +67,9 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>  	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
>  		[ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \
>  		$(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
> -		$(INSTALL_DATA) $(TARGET).efi.map $(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
> +		if [ -e $(TARGET).efi.map ]; then \
> +                        $(INSTALL_DATA) $(TARGET).efi.map $(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
> +		fi; \
>  		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
>  		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \
>  		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \
diff mbox

Patch

diff --git a/xen/Makefile b/xen/Makefile
index c511330..54a3bc8 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -67,7 +67,9 @@  _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
 	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
 		[ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \
 		$(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
-		$(INSTALL_DATA) $(TARGET).efi.map $(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
+		if [ -e $(TARGET).efi.map ]; then \
+                        $(INSTALL_DATA) $(TARGET).efi.map $(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map; \
+		fi; \
 		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
 		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \
 		ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \