X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fbuild-sdk-meson.txt;h=fc7fe37b54bb3b64e0bb68dc2ec54548464de8ef;hb=6da6a83ee0f512d5eff0cce8725651cd407e81da;hp=b5573f7a7df94cf785d799fa76882fcd363fee42;hpb=9c3adc289c5e3c0ebf448230a8e2bd1dc1b193bf;p=dpdk.git diff --git a/doc/build-sdk-meson.txt b/doc/build-sdk-meson.txt index b5573f7a7d..fc7fe37b54 100644 --- a/doc/build-sdk-meson.txt +++ b/doc/build-sdk-meson.txt @@ -1,11 +1,6 @@ INSTALLING DPDK USING THE MESON BUILD SYSTEM --------------------------------------------- -NOTE: Compiling and installing DPDK using ``meson`` and ``ninja``, rather -than using ``make`` (GNU make) is EXPERIMENTAL. Official builds of DPDK -should always be done using ``make``, as described in the ``Getting Started -Guide`` documentation, and at "http://dpdk.org/doc/quick-start". - Summary -------- For many platforms, compiling and installing DPDK should work using the @@ -37,8 +32,8 @@ The ``meson`` tool is used to configure a DPDK build. On most Linux distributions this can be got using the local package management system, e.g. ``dnf install meson`` or ``apt-get install meson``. If meson is not available as a suitable package, it can also be installed using the Python -3 ``pip`` tool, e.g. ``pip3 install meson``. Version 0.42 of meson is -recommended - if the version packaged is too old, the latest version is +3 ``pip`` tool, e.g. ``pip3 install meson``. Version 0.47.1 of meson is +required - if the version packaged is too old, the latest version is generally available from "pip". The other dependency for building is the ``ninja`` tool, which acts similar @@ -85,6 +80,10 @@ Project-specific options are passed used -Doption=value:: meson -Dmax_lcores=8 smallbuild # scale build for smaller systems + meson -Denable_docs=true fullbuild # build and install docs + + meson -Dmachine=default # use builder-independent baseline -march + Examples of setting the same options using meson configure:: meson configure -Dwerror=true @@ -101,6 +100,9 @@ should be used to change the build settings within the directory, and when ``ninja`` is called to do the build itself, it will trigger the necessary re-scan from meson. +NOTE: machine=default uses a config that works on all supported architectures +regardless of the capabilities of the machine where the build is happening. + As well as those settings taken from ``meson configure``, other options such as the compiler to use can be passed via environment variables. For example:: @@ -130,7 +132,7 @@ Installing the Compiled Files Use ``ninja install`` to install the required DPDK files onto the system. The install prefix defaults to ``/usr/local`` but can be used as with other -options above. The environment variable ``DEST_DIR`` can be used to adjust +options above. The environment variable ``DESTDIR`` can be used to adjust the root directory for the install, for example when packaging. With the base install directory, the individual directories for libraries @@ -150,6 +152,22 @@ driver install path, so dynamically-linked applications can be run without having to pass in ``-d /path/to/driver`` options for standard drivers. +Cross Compiling DPDK +-------------------- + +To cross-compile DPDK on a desired target machine we can use the following +command:: + + meson cross-build --cross-file + +For example if the target machine is arm64 we can use the following +command:: + meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc + +where config/arm/arm64_armv8_linux_gcc contains settings for the compilers +and other build tools to be used, as well as characteristics of the target +machine. + Using the DPDK within an Application -------------------------------------