mbox series

[v4,0/6] Arm build options rework

Message ID 1603464488-25493-1-git-send-email-juraj.linkes@pantheon.tech (mailing list archive)
Headers
Series Arm build options rework |

Message

Juraj Linkeš Oct. 23, 2020, 2:48 p.m. UTC
  The current way of specifying Arm configuration options is insufficient
since we can't identify the SoC we're building for from the MIDR
information. For example, we can't distinguish between N1SDP, Graviton2
or Ampere Altra.

Add a way to specify the cpu count and numa node count for cross builds.

We also want to be able to disable which drivers (and possibly
libraries) are built without user input. This is useful when building:
1. on an SoC that is slow and we want to build only what is necessary
  without the user having to check which libraries they have installed
2. a cross build on a fast aarch64 machine but with target SoC which
  differs in capabilities or libraries.
This is achieved by specifying the drivers in cross files.

Among libraries, only libnuma can be now disabled.

Also add an optional way to discover cpu count a numa node count. Fix
-Dmax_lcores and -Dmax_numa_nodes for arm builds.

v2:
Major rework of the whole series.

v3:
Added numa and core count defaults for x86 default build.
Removed numa and core count defaults. Now requiring defaults to be
specified in a cross file or on the cmdline.
Added FreeBDS support for numa count discovery.

v4:
Make automatic numa and cpu counts discovery optional.

Juraj Linkeš (6):
  build: alias default build as generic
  build: refactor Arm build
  build: optional NUMA and cpu counts detection
  build: add core and NUMA counts to cross files
  build: disable Arm drivers
  build: update Arm builds with makefile flags

 buildtools/get_cpu_count.py          |   7 +
 buildtools/get_numa_count.py         |  22 +++
 buildtools/meson.build               |   2 +
 config/arm/arm64_armada_linux_gcc    |   6 +-
 config/arm/arm64_armv8_linux_gcc     |  18 +-
 config/arm/arm64_bluefield_linux_gcc |   7 +-
 config/arm/arm64_dpaa_linux_gcc      |   5 +-
 config/arm/arm64_emag_linux_gcc      |   4 +-
 config/arm/arm64_n1sdp_linux_gcc     |   7 +-
 config/arm/arm64_octeontx2_linux_gcc |   7 +-
 config/arm/arm64_stingray_linux_gcc  |   7 +-
 config/arm/arm64_thunderx2_linux_gcc |   6 +-
 config/arm/arm64_thunderx_linux_gcc  |   4 +-
 config/arm/meson.build               | 278 ++++++++++++++++-----------
 config/meson.build                   |  54 +++++-
 drivers/meson.build                  |   6 +-
 meson.build                          |   1 +
 meson_options.txt                    |   8 +-
 18 files changed, 306 insertions(+), 143 deletions(-)
 create mode 100644 buildtools/get_cpu_count.py
 create mode 100644 buildtools/get_numa_count.py
  

Comments

Honnappa Nagarahalli Oct. 27, 2020, 3:53 a.m. UTC | #1
<snip>

> 
> The current way of specifying Arm configuration options is insufficient since
> we can't identify the SoC we're building for from the MIDR information. For
> example, we can't distinguish between N1SDP, Graviton2 or Ampere Altra.
> 
> Add a way to specify the cpu count and numa node count for cross builds.
> 
> We also want to be able to disable which drivers (and possibly
> libraries) are built without user input. This is useful when building:
> 1. on an SoC that is slow and we want to build only what is necessary
>   without the user having to check which libraries they have installed 2. a
> cross build on a fast aarch64 machine but with target SoC which
I assume cross building on x86 for a Arm target SoC does not need any additional changes.

>   differs in capabilities or libraries.
> This is achieved by specifying the drivers in cross files.
> 
> Among libraries, only libnuma can be now disabled.
> 
> Also add an optional way to discover cpu count a numa node count. Fix -
> Dmax_lcores and -Dmax_numa_nodes for arm builds.
> 
> v2:
> Major rework of the whole series.
> 
> v3:
> Added numa and core count defaults for x86 default build.
> Removed numa and core count defaults. Now requiring defaults to be
> specified in a cross file or on the cmdline.
> Added FreeBDS support for numa count discovery.
> 
> v4:
> Make automatic numa and cpu counts discovery optional.
> 
> Juraj Linkeš (6):
>   build: alias default build as generic
>   build: refactor Arm build
>   build: optional NUMA and cpu counts detection
>   build: add core and NUMA counts to cross files
>   build: disable Arm drivers
>   build: update Arm builds with makefile flags
> 
>  buildtools/get_cpu_count.py          |   7 +
>  buildtools/get_numa_count.py         |  22 +++
>  buildtools/meson.build               |   2 +
>  config/arm/arm64_armada_linux_gcc    |   6 +-
>  config/arm/arm64_armv8_linux_gcc     |  18 +-
>  config/arm/arm64_bluefield_linux_gcc |   7 +-
>  config/arm/arm64_dpaa_linux_gcc      |   5 +-
>  config/arm/arm64_emag_linux_gcc      |   4 +-
>  config/arm/arm64_n1sdp_linux_gcc     |   7 +-
>  config/arm/arm64_octeontx2_linux_gcc |   7 +-
>  config/arm/arm64_stingray_linux_gcc  |   7 +-
>  config/arm/arm64_thunderx2_linux_gcc |   6 +-
>  config/arm/arm64_thunderx_linux_gcc  |   4 +-
>  config/arm/meson.build               | 278 ++++++++++++++++-----------
>  config/meson.build                   |  54 +++++-
>  drivers/meson.build                  |   6 +-
>  meson.build                          |   1 +
>  meson_options.txt                    |   8 +-
>  18 files changed, 306 insertions(+), 143 deletions(-)  create mode 100644
> buildtools/get_cpu_count.py  create mode 100644
> buildtools/get_numa_count.py
> 
> --
> 2.20.1
  
Juraj Linkeš Oct. 27, 2020, 7:50 a.m. UTC | #2
> -----Original Message-----
> From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> Sent: Tuesday, October 27, 2020 4:54 AM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; bruce.richardson@intel.com;
> Ruifeng Wang <Ruifeng.Wang@arm.com>; Phil Yang <Phil.Yang@arm.com>;
> vcchunga@amazon.com; Dharmik Thakkar <Dharmik.Thakkar@arm.com>;
> jerinjacobk@gmail.com; hemant.agrawal@nxp.com
> Cc: dev@dpdk.org; nd <nd@arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> Subject: RE: [PATCH v4 0/6] Arm build options rework
> 
> <snip>
> 
> >
> > The current way of specifying Arm configuration options is
> > insufficient since we can't identify the SoC we're building for from
> > the MIDR information. For example, we can't distinguish between N1SDP,
> Graviton2 or Ampere Altra.
> >
> > Add a way to specify the cpu count and numa node count for cross builds.
> >
> > We also want to be able to disable which drivers (and possibly
> > libraries) are built without user input. This is useful when building:
> > 1. on an SoC that is slow and we want to build only what is necessary
> >   without the user having to check which libraries they have installed
> > 2. a cross build on a fast aarch64 machine but with target SoC which
> I assume cross building on x86 for a Arm target SoC does not need any
> additional changes.
> 

Here I mean cross build to mean using a cross-file, so in this respect the cross build would be the same on x86 and Arm.

> >   differs in capabilities or libraries.
> > This is achieved by specifying the drivers in cross files.
> >
> > Among libraries, only libnuma can be now disabled.
> >
> > Also add an optional way to discover cpu count a numa node count. Fix
> > - Dmax_lcores and -Dmax_numa_nodes for arm builds.
> >
> > v2:
> > Major rework of the whole series.
> >
> > v3:
> > Added numa and core count defaults for x86 default build.
> > Removed numa and core count defaults. Now requiring defaults to be
> > specified in a cross file or on the cmdline.
> > Added FreeBDS support for numa count discovery.
> >
> > v4:
> > Make automatic numa and cpu counts discovery optional.
> >
> > Juraj Linkeš (6):
> >   build: alias default build as generic
> >   build: refactor Arm build
> >   build: optional NUMA and cpu counts detection
> >   build: add core and NUMA counts to cross files
> >   build: disable Arm drivers
> >   build: update Arm builds with makefile flags
> >
> >  buildtools/get_cpu_count.py          |   7 +
> >  buildtools/get_numa_count.py         |  22 +++
> >  buildtools/meson.build               |   2 +
> >  config/arm/arm64_armada_linux_gcc    |   6 +-
> >  config/arm/arm64_armv8_linux_gcc     |  18 +-
> >  config/arm/arm64_bluefield_linux_gcc |   7 +-
> >  config/arm/arm64_dpaa_linux_gcc      |   5 +-
> >  config/arm/arm64_emag_linux_gcc      |   4 +-
> >  config/arm/arm64_n1sdp_linux_gcc     |   7 +-
> >  config/arm/arm64_octeontx2_linux_gcc |   7 +-
> >  config/arm/arm64_stingray_linux_gcc  |   7 +-
> >  config/arm/arm64_thunderx2_linux_gcc |   6 +-
> >  config/arm/arm64_thunderx_linux_gcc  |   4 +-
> >  config/arm/meson.build               | 278 ++++++++++++++++-----------
> >  config/meson.build                   |  54 +++++-
> >  drivers/meson.build                  |   6 +-
> >  meson.build                          |   1 +
> >  meson_options.txt                    |   8 +-
> >  18 files changed, 306 insertions(+), 143 deletions(-)  create mode
> > 100644 buildtools/get_cpu_count.py  create mode 100644
> > buildtools/get_numa_count.py
> >
> > --
> > 2.20.1