[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v8 27/47] build: grab common EFI source files in arch specific dir


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 21 Dec 2021 14:53:49 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Qkjjh9kRi2Eganfg66W6tiCiZCvz3HlNuzjxCpX64cg=; b=HK2M++D6INaN4RXFi+rWKKlRxM5z136nzW7DyQEOz8wzqE+7PvUshNpiLqvOYbGHnhj5zQa2j4DO65HfEYnfwxIxXV6gZZDXQpOLd60r5Rj+E4q5sXX5Dy7lsREi12PkDIgr2dgS2oAdofpVrgJwMayw1NgnugQgQ61uxE+ymvsztJam/0MEiPNB+boOqYZw6hcUPmYTrBpoka7iokdezYT41Lo7nn1SZuDU5lRjjFuCfwVHdOTRtekAqHoGyUGPc5OXch9ftICToR+5evxV0u8pRhhXhlCsD4M/hvDyeOF1WyHMgKDHLiPuZCE8kbp1pCIbnjRtoBtvIrqr+JqVfQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b4190y3sv+s5BjmA6EkG74B73zQkxBCHU9A2dSj/NMm0wPeJNAR9Fbc4F6dCs4bbROxn6+QWgqVW7pIQAdy8QWein1VhNTaxFmFftyH5NULEodFiS23wNqWiXuTMybQJ+4ojDHubPIrGeoA2J+KWZ28aJDkPe6nNNoxD3EwZQMfovFr2ZJHBFAIyFUXk5fzpeV4Rr464B31aQJCWrA+wEZZ2MBDZbsZ+7P3wLRK7iw3BxZm2mbGp9tdSALUHKPVeKxuIbROp1epKXhvsjmKNCIEeMXAq/T5pfBHNxVhFsKFeNM5EfDLT5mAOQWth7YKXZsD5KC8qjigLZxXETZ15wQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 21 Dec 2021 13:54:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.11.2021 14:39, Anthony PERARD wrote:
> Rather than preparing the efi source file, we will make the symbolic
> link as needed from the build location.
> 
> The `ln` command is run every time to allow to update the link in case
> the source tree change location.

Btw, since symlinks aren't being liked, would there be a way to make
things work using vpath?

> This patch also introduce "efi_common.mk" which allow to reuse the
> common make instructions without having to duplicate them into each
> arch.
> 
> And now that we have a list of common source file, we can start to
> remove the links to the source files on clean.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
> 
> Notes:
>     v8:
>     - use symbolic link instead of making a copy of the source
>     - introduce efi_common.mk
>     - remove links to source file on clean
>     - use -iquote for "efi.h" headers in common/efi
> 
>  xen/Makefile                 |  5 -----
>  xen/arch/arm/efi/Makefile    |  4 ++--
>  xen/arch/x86/Makefile        |  1 +
>  xen/arch/x86/efi/Makefile    |  5 +----
>  xen/common/efi/efi_common.mk | 12 ++++++++++++

Could I talk you into avoiding _ when - is suitable, which is the case not
only for (non-exported) make variables, but also file names?

> --- a/xen/arch/arm/efi/Makefile
> +++ b/xen/arch/arm/efi/Makefile
> @@ -1,4 +1,4 @@
> -CFLAGS-y += -fshort-wchar
> +include $(srctree)/common/efi/efi_common.mk
>  
> -obj-y += boot.init.o pe.init.o ebmalloc.o runtime.o
> +obj-y += $(EFIOBJ-y)
>  obj-$(CONFIG_ACPI) +=  efi-dom0.init.o
> diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
> index e8151bf4b111..eabd8d3919a4 100644
> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -79,6 +79,7 @@ endif
>  
>  # Allows "clean" to descend into boot/
>  subdir- += boot
> +subdir- += efi

This renders the comment stale - please generalize it.

Also, any reason a similar adjustment isn't needed for Arm? Perhaps
this could even move into xen/Makefile:

subdir- += $(wildcard efi/)

> --- /dev/null
> +++ b/xen/common/efi/efi_common.mk
> @@ -0,0 +1,12 @@
> +EFIOBJ-y := boot.init.o pe.init.o ebmalloc.o runtime.o
> +EFIOBJ-$(CONFIG_COMPAT) += compat.o
> +
> +CFLAGS-y += -fshort-wchar
> +CFLAGS-y += -iquote $(srctree)/common/efi
> +
> +$(obj)/%.c: $(abs_srctree)/common/efi/%.c FORCE
> +     $(Q)ln -nfs $< $@

Like was the case before, I think it would be better if the links were
relative ones, at least when srctree == objtree (but ideally always).

> +clean-files += $(patsubst %.o,%.c, $(EFIOBJ-y:.init.o=.o) $(EFIOBJ-))

Nit: Please be consistent (at least within a single line) about blanks
following commas.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.