DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: john.mcnamara@intel.com
Cc: dev@dpdk.org, anatoly.burakov@intel.com,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH v2 6/8] doc: add meson install instructions for FreeBSD
Date: Mon, 25 Nov 2019 14:55:57 +0000	[thread overview]
Message-ID: <20191125145559.29251-7-bruce.richardson@intel.com> (raw)
In-Reply-To: <20191125145559.29251-1-bruce.richardson@intel.com>

Update the FreeBSD GSG doc with instructions for installing using meson and
ninja rather than make.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/freebsd_gsg/build_dpdk.rst | 164 +++++++-------------------
 1 file changed, 40 insertions(+), 124 deletions(-)

diff --git a/doc/guides/freebsd_gsg/build_dpdk.rst b/doc/guides/freebsd_gsg/build_dpdk.rst
index 7abd85aa5..c5d5379f6 100644
--- a/doc/guides/freebsd_gsg/build_dpdk.rst
+++ b/doc/guides/freebsd_gsg/build_dpdk.rst
@@ -6,147 +6,63 @@
 Compiling the DPDK Target from Source
 =====================================
 
-System Requirements
--------------------
+Prerequisites
+-------------
 
-The DPDK and its applications require the GNU make system (gmake)
-to build on FreeBSD. Optionally, gcc may also be used in place of clang
-to build the DPDK, in which case it too must be installed prior to
-compiling the DPDK. The installation of these tools is covered in this
-section.
+The following FreeBSD packages are required to build DPDK:
 
-Compiling the DPDK requires the FreeBSD kernel sources, which should be
-included during the installation of FreeBSD on the development platform.
-The DPDK also requires the use of FreeBSD ports to compile and function.
+* meson
+* ninja
+* pkgconf
 
-To use the FreeBSD ports system, it is required to update and extract the FreeBSD
-ports tree by issuing the following commands:
+These can be installed using (as root)::
 
-.. code-block:: console
-
-    portsnap fetch
-    portsnap extract
-
-If the environment requires proxies for external communication, these can be set
-using:
-
-.. code-block:: console
-
-    setenv http_proxy <my_proxy_host>:<port>
-    setenv ftp_proxy <my_proxy_host>:<port>
-
-The FreeBSD ports below need to be installed prior to building the DPDK.
-In general these can be installed using the following set of commands::
-
-   cd /usr/ports/<port_location>
-
-   make config-recursive
-
-   make install
-
-   make clean
-
-Each port location can be found using::
-
-   whereis <port_name>
-
-The ports required and their locations are as follows:
-
-* dialog4ports: ``/usr/ports/ports-mgmt/dialog4ports``
-
-* GNU make(gmake): ``/usr/ports/devel/gmake``
-
-* coreutils: ``/usr/ports/sysutils/coreutils``
-
-For compiling and using the DPDK with gcc, the compiler must be installed
-from the ports collection:
-
-* gcc: version 4.9 is recommended ``/usr/ports/lang/gcc49``.
-  Ensure that ``CPU_OPTS`` is selected (default is OFF).
-
-When running the make config-recursive command, a dialog may be presented to the
-user. For the installation of the DPDK, the default options were used.
-
-.. note::
+  pkg install meson pkgconf
 
-    To avoid multiple dialogs being presented to the user during make install,
-    it is advisable before running the make install command to re-run the
-    make config-recursive command until no more dialogs are seen.
+To compile the required kernel modules for memory management and working
+with physical NIC devices, the kernel sources for FreeBSD also
+need to be installed. If not already present on the system, these can be
+installed via commands like the following, for FreeBSD 12.1 on x86_64::
 
+  fetch http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.1-RELEASE/src.txz
+  tar -C / -xJvf src.txz
 
-Install the DPDK and Browse Sources
------------------------------------
+To enable the telemetry library in DPDK, the jansson library also needs to
+be installed, and can be installed via::
 
-First, uncompress the archive and move to the DPDK source directory:
+  pkg install jansson
 
-.. code-block:: console
-
-    unzip DPDK-<version>.zip
-    cd DPDK-<version>
-
-The DPDK is composed of several directories:
-
-*   lib: Source code of DPDK libraries
-
-*   app: Source code of DPDK applications (automatic tests)
-
-*   examples: Source code of DPDK applications
-
-*   config, buildtools, mk: Framework-related makefiles, scripts and configuration
-
-Installation of the DPDK Target Environments
---------------------------------------------
-
-The format of a DPDK target is::
-
-   ARCH-MACHINE-EXECENV-TOOLCHAIN
-
-Where:
+Individual drivers may have additional requirements. Consult the relevant
+driver guide for any driver-specific requirements of interest.
 
-* ``ARCH`` is: ``x86_64``
+Building DPDK
+-------------
 
-* ``MACHINE`` is: ``native``
+The following commands can be used to build and install DPDK on a system.
+The final, install, step generally needs to be run as root::
 
-* ``EXECENV`` is: ``freebsd``
+  meson build
+  cd build
+  ninja
+  ninja install
 
-* ``TOOLCHAIN`` is: ``gcc`` | ``clang``
-
-The configuration files for the DPDK targets can be found in the DPDK/config
-directory in the form of::
-
-    defconfig_ARCH-MACHINE-EXECENV-TOOLCHAIN
+This will install the DPDK libraries and drivers to `/usr/local/lib` with a
+pkg-config file `libdpdk.pc` installed to `/usr/local/lib/pkgconfig`. The
+DPDK test applications, such as `dpdk-testpmd` are installed to
+`/usr/local/bin`. To use these applications, it is recommended that the
+`contigmem` and `nic_uio` kernel modules be loaded first, as described in
+the next section.
 
 .. note::
 
-   Configuration files are provided with the ``RTE_MACHINE`` optimization level set.
-   Within the configuration files, the ``RTE_MACHINE`` configuration value is set
-   to native, which means that the compiled software is tuned for the platform
-   on which it is built.  For more information on this setting, and its
-   possible values, see the *DPDK Programmers Guide*.
-
-To make the target, use ``gmake install T=<target>``.
-
-For example to compile for FreeBSD use:
-
-.. code-block:: console
-
-    gmake install T=x86_64-native-freebsd-clang
-
-.. note::
-
-   If the compiler binary to be used does not correspond to that given in the
-   TOOLCHAIN part of the target, the compiler command may need to be explicitly
-   specified. For example, if compiling for gcc, where the gcc binary is called
-   gcc4.9, the command would need to be ``gmake install T=<target> CC=gcc4.9``.
-
-Browsing the Installed DPDK Environment Target
-----------------------------------------------
+        It is recommended that pkg-config be used to query information
+        about the compiler and linker flags needed to build applications
+        against DPDK.  In some cases, the path `/usr/local/lib/pkgconfig`
+        may not be in the default search paths for `.pc` files, which means
+        that queries for DPDK information may fail. This can be fixed by
+        setting the appropriate path in `PKG_CONFIG_PATH` environment
+        variable.
 
-Once a target is created, it contains all the libraries and header files for the
-DPDK environment that are required to build customer applications.
-In addition, the test and testpmd applications are built under the build/app
-directory, which may be used for testing.  A kmod directory is also present that
-contains the kernel modules to install.
 
 .. _loading_contigmem:
 
-- 
2.21.0


  parent reply	other threads:[~2019-11-25 14:57 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 16:03 [dpdk-dev] [PATCH 0/8] GSG Documentation updates Bruce Richardson
2019-11-22 16:03 ` [dpdk-dev] [PATCH 1/8] doc: update Linux GSG system requirements section Bruce Richardson
2019-11-28 11:51   ` Thomas Monjalon
2019-11-28 14:11     ` Bruce Richardson
2019-11-28 14:22       ` Thomas Monjalon
2019-11-28 14:30         ` Bruce Richardson
2019-11-28 14:34           ` Thomas Monjalon
2019-11-28 14:59             ` Bruce Richardson
2019-11-22 16:03 ` [dpdk-dev] [PATCH 2/8] doc: add building with meson to linux GSG Bruce Richardson
2019-11-25 13:19   ` Burakov, Anatoly
2019-11-25 13:27     ` Bruce Richardson
2019-11-25 13:54       ` Burakov, Anatoly
2019-11-25 14:40         ` Richardson, Bruce
2019-11-25 13:22   ` Burakov, Anatoly
2019-11-25 14:38     ` Richardson, Bruce
2019-11-22 16:03 ` [dpdk-dev] [PATCH 3/8] doc: reorder meson and make build instructions for arm Bruce Richardson
2019-11-24 11:25   ` Gavin Hu (Arm Technology China)
2019-11-22 16:03 ` [dpdk-dev] [PATCH 4/8] doc: remove reference to old versions of FreeBSD Bruce Richardson
2019-11-22 16:03 ` [dpdk-dev] [PATCH 5/8] doc: update examples output in FreeBSD GSG Bruce Richardson
2019-11-22 16:03 ` [dpdk-dev] [PATCH 6/8] doc: add meson install instructions for FreeBSD Bruce Richardson
2019-11-22 16:03 ` [dpdk-dev] [PATCH 7/8] doc: update documentation on build and running FreeBSD apps Bruce Richardson
2019-11-22 16:03 ` [dpdk-dev] [PATCH 8/8] doc: drop EAL command-line reference from FreeBSD GSG Bruce Richardson
2019-11-25 14:55 ` [dpdk-dev] [PATCH v2 0/8] GSG Documentation updates Bruce Richardson
2019-11-25 14:55   ` [dpdk-dev] [PATCH v2 1/8] doc: update Linux GSG system requirements section Bruce Richardson
2019-11-25 14:55   ` [dpdk-dev] [PATCH v2 2/8] doc: add building with meson to linux GSG Bruce Richardson
2019-11-25 15:11     ` Burakov, Anatoly
2019-11-25 14:55   ` [dpdk-dev] [PATCH v2 3/8] doc: reorder meson and make build instructions for arm Bruce Richardson
2019-11-25 14:55   ` [dpdk-dev] [PATCH v2 4/8] doc: remove reference to old versions of FreeBSD Bruce Richardson
2019-11-27 12:10     ` Burakov, Anatoly
2019-11-25 14:55   ` [dpdk-dev] [PATCH v2 5/8] doc: update examples output in FreeBSD GSG Bruce Richardson
2019-11-27 12:11     ` Burakov, Anatoly
2019-11-27 12:23       ` Bruce Richardson
2019-11-25 14:55   ` Bruce Richardson [this message]
2019-11-27 12:23     ` [dpdk-dev] [PATCH v2 6/8] doc: add meson install instructions for FreeBSD Burakov, Anatoly
2019-11-25 14:55   ` [dpdk-dev] [PATCH v2 7/8] doc: update documentation on build and running FreeBSD apps Bruce Richardson
2019-11-27 12:29     ` Burakov, Anatoly
2019-11-25 14:55   ` [dpdk-dev] [PATCH v2 8/8] doc: drop EAL command-line reference from FreeBSD GSG Bruce Richardson
2019-11-27 12:31     ` Burakov, Anatoly
2019-11-27 13:46       ` Bruce Richardson
2019-11-28 16:33 ` [dpdk-dev] [PATCH v3 0/5] GSG Documentation updates Bruce Richardson
2019-11-28 16:33   ` [dpdk-dev] [PATCH v3 1/5] doc: update Linux GSG system requirements section Bruce Richardson
2019-11-28 16:33   ` [dpdk-dev] [PATCH v3 2/5] doc: add building with meson to linux GSG Bruce Richardson
2019-11-28 16:33   ` [dpdk-dev] [PATCH v3 3/5] doc: reorder meson and make build instructions for arm Bruce Richardson
2019-11-28 16:33   ` [dpdk-dev] [PATCH v3 4/5] doc: remove reference to old versions of FreeBSD Bruce Richardson
2019-11-28 16:33   ` [dpdk-dev] [PATCH v3 5/5] doc: update examples output in FreeBSD GSG Bruce Richardson
2019-11-28 18:56   ` [dpdk-dev] [PATCH v3 0/5] GSG Documentation updates Thomas Monjalon
2020-01-03 15:37     ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191125145559.29251-7-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).