X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fbuild-sdk-meson.txt;h=912cb3a8cc383baa07afb5a325a7541052b29146;hb=c185d42cb417bc4a51e9aa74f1d338fac2f1d1f0;hp=b5573f7a7df94cf785d799fa76882fcd363fee42;hpb=9c3adc289c5e3c0ebf448230a8e2bd1dc1b193bf;p=dpdk.git diff --git a/doc/build-sdk-meson.txt b/doc/build-sdk-meson.txt index b5573f7a7d..912cb3a8cc 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 @@ -85,6 +80,8 @@ 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 + Examples of setting the same options using meson configure:: meson configure -Dwerror=true @@ -130,7 +127,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 +147,33 @@ 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 the following +parameters:: + + [binaries] + c = 'aarch64-linux-gnu-gcc' + cpp = 'aarch64-linux-gnu-cpp' + ar = 'aarch64-linux-gnu-ar' + + [host_machine] + system = 'linux' + cpu_family = 'aarch64' + cpu = 'armv8-a' + endian = 'little' + + Using the DPDK within an Application ------------------------------------- @@ -174,3 +198,9 @@ From examples/helloworld/Makefile:: build: @mkdir -p $@ + +NOTE: for --static builds, DPDK needs to be built with Meson >= 0.46 in order to +fully generate the list of private dependencies. If DPDK is built with an older +version of Meson, it might be necessary to manually specify dependencies of DPDK +PMDs/libraries, for example -lmlx5 -lmnl for librte-pmd-mlx5, or the static link +step might fail.