mbox series

[XEN,v2,00/12] xen: Build system improvements

Message ID 20200117105358.607910-1-anthony.perard@citrix.com (mailing list archive)
Headers show
Series xen: Build system improvements | expand

Message

Anthony PERARD Jan. 17, 2020, 10:53 a.m. UTC
Patch series available in this git branch:
https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.build-system-xen-v2

series is based on "[XEN PATCH v3 0/6] xen: Kconfig update with few extra"

v2:
Rather than taking Kbuild and making it work with Xen, the v2 takes the opposite
approach of slowly transforming our current build system into Kbuild. That have
the advantage of keeping all the feature we have and making the patches much
easier to review. Kconfig update is done in an other patch series.

v1:
https://lists.xenproject.org/archives/html/xen-devel/2019-10/msg01609.html

Hi,

I have work toward building Xen (the hypervisor) with Linux's build system,
Kbuild.

The main reason for that is to be able to have out-of-tree build. It's annoying
when a build fail because of the pvshim. Other benefit is a much faster
rebuild, and `make clean` doesn't take ages, and better dependencies to figure
out what needs to be rebuild.

So, we are not there yet, but the series already contain quite a few
improvement and cleanup. More patches are going to be added to the series.

XXX Known issue
- make dist-tests is broken. I'll fix that latter.
- efi build maybe broken (xen doesn't boot on albana which looks like to be one
  of the uefi host)

Cheers,

Anthony PERARD (12):
  xen/build: Remove left over -DMAX_PHYS_IRQS
  xen/build: Use obj-y += subdir/ instead of subdir-y
  xen/build: use $(clean) shorthand for clean targets
  xen/build: extract clean target from Rules.mk
  xen/include: remove include of Config.mk
  xen/test/livepatch: remove include of Config.mk
  xen/build: run targets csopes,tags,.. without Rules.mk
  xen/build: make tests in test/ directly
  xen/build: include include/config/auto.conf in main Makefile
  xen/build: use new $(c_flags) and $(a_flags) instead of $(CFLAGS)
  xen/build: introduce ccflags-y and CFLAGS_$@
  xen/build: have the root Makefile generates the CFLAGS

 xen/Makefile                         | 211 +++++++++++++++++++++------
 xen/Rules.mk                         | 135 +++++------------
 xen/arch/arm/Makefile                |  28 ++--
 xen/arch/arm/Rules.mk                |  93 ------------
 xen/arch/arm/arch.mk                 |  88 +++++++++++
 xen/arch/arm/arm32/Makefile          |   2 +-
 xen/arch/arm/arm64/Makefile          |   2 +-
 xen/arch/arm/efi/Makefile            |   2 +-
 xen/arch/x86/Makefile                |  46 +++---
 xen/arch/x86/Rules.mk                |  91 +-----------
 xen/arch/x86/acpi/Makefile           |   2 +-
 xen/arch/x86/arch.mk                 |  87 +++++++++++
 xen/arch/x86/cpu/Makefile            |   4 +-
 xen/arch/x86/efi/Makefile            |   2 +-
 xen/arch/x86/guest/Makefile          |   4 +-
 xen/arch/x86/hvm/Makefile            |   6 +-
 xen/arch/x86/mm/Makefile             |  10 +-
 xen/arch/x86/mm/hap/Makefile         |   6 +-
 xen/arch/x86/mm/shadow/Makefile      |   6 +-
 xen/arch/x86/x86_64/Makefile         |   2 +-
 xen/common/Makefile                  |   8 +-
 xen/common/libelf/Makefile           |   4 +-
 xen/common/libfdt/Makefile           |   4 +-
 xen/drivers/Makefile                 |  14 +-
 xen/drivers/acpi/Makefile            |   6 +-
 xen/drivers/passthrough/Makefile     |   8 +-
 xen/drivers/passthrough/vtd/Makefile |   2 +-
 xen/include/Makefile                 |   4 +-
 xen/lib/Makefile                     |   2 +-
 xen/scripts/Kbuild.include           |  10 ++
 xen/scripts/Makefile.clean           |  33 +++++
 xen/test/livepatch/Makefile          |   2 -
 xen/xsm/Makefile                     |   2 +-
 xen/xsm/flask/Makefile               |   4 +-
 xen/xsm/flask/ss/Makefile            |   2 +-
 35 files changed, 519 insertions(+), 413 deletions(-)
 create mode 100644 xen/arch/arm/arch.mk
 create mode 100644 xen/arch/x86/arch.mk
 create mode 100644 xen/scripts/Makefile.clean

Comments

Anthony PERARD Jan. 21, 2020, 2:08 p.m. UTC | #1
(Actually CCing all that are CCed on patches)

On Fri, Jan 17, 2020 at 10:53:46AM +0000, Anthony PERARD wrote:
> Patch series available in this git branch:
> https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.build-system-xen-v2
> 
> series is based on "[XEN PATCH v3 0/6] xen: Kconfig update with few extra"
> 
> v2:
> Rather than taking Kbuild and making it work with Xen, the v2 takes the opposite
> approach of slowly transforming our current build system into Kbuild. That have
> the advantage of keeping all the feature we have and making the patches much
> easier to review. Kconfig update is done in an other patch series.
> 
> v1:
> https://lists.xenproject.org/archives/html/xen-devel/2019-10/msg01609.html
> 
> Hi,
> 
> I have work toward building Xen (the hypervisor) with Linux's build system,
> Kbuild.
> 
> The main reason for that is to be able to have out-of-tree build. It's annoying
> when a build fail because of the pvshim. Other benefit is a much faster
> rebuild, and `make clean` doesn't take ages, and better dependencies to figure
> out what needs to be rebuild.
> 
> So, we are not there yet, but the series already contain quite a few
> improvement and cleanup. More patches are going to be added to the series.
> 
> XXX Known issue
> - make dist-tests is broken. I'll fix that latter.
> - efi build maybe broken (xen doesn't boot on albana which looks like to be one
>   of the uefi host)

With the new patch, and both squash! of v2.1, those two issues are fixed.
    Makefile: Fix install-tests
    squash! xen/build: introduce ccflags-y and CFLAGS_$@
    squash! xen/build: have the root Makefile generates the CFLAGS

I've created a new branch:
https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.build-system-xen-v2.1

And a link to an osstest run:
http://logs.test-lab.xenproject.org/osstest/logs/146338/

Cheers,