All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Young <dave@youngcopy.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Aaron Conole <aconole@redhat.com>,
	David Young <dave@youngcopy.com>
Subject: [PATCH v4 2/6] Section 2: Install and Build DPDK
Date: Wed, 22 Nov 2023 20:26:23 -0500	[thread overview]
Message-ID: <20231123012633.2005-3-dave@youngcopy.com> (raw)
In-Reply-To: <20231123012633.2005-1-dave@youngcopy.com>

-Common Tools for All Distributions: The common tools installation instructions for
all Linux distributions and FreeBSD have been removed. Instead,
the tools are now listed under each specific distribution.
-Linux Distributions: The Linux distributions have been restructured to include
Alpine, Debian, Ubuntu, Fedora, RedHat Enterprise Linux (RHEL), and openSUSE.
Each distribution now has its own section with specific installation commands.
-Windows: The Windows section remains largely unchanged, but the instructions for
navigating to the directory where the DPDK source code is located have been updated.
-Building DPDK: The commands for setting up and compiling with the Meson build system
have been updated for both Linux, FreeBSD, and Windows.
-Cross-Compilation Instructions: The cross-compilation instructions for
different architectures were left unchanged.
-Formatting Changes: There are several formatting changes throughout the document,
including the addition of notes and changes to the headers for better readability and organization.
---
 .../building_from_sources.rst                 | 180 ++++++++++++++++++
 .../install_and_build/index.rst               |  14 ++
 .../installing_prebuilt_packages.rst          |  54 ++++++
 3 files changed, 248 insertions(+)
 create mode 100644 doc/guides/getting_started_guide/install_and_build/building_from_sources.rst
 create mode 100644 doc/guides/getting_started_guide/install_and_build/index.rst
 create mode 100644 doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst

diff --git a/doc/guides/getting_started_guide/install_and_build/building_from_sources.rst b/doc/guides/getting_started_guide/install_and_build/building_from_sources.rst
new file mode 100644
index 0000000000..ab54521ac5
--- /dev/null
+++ b/doc/guides/getting_started_guide/install_and_build/building_from_sources.rst
@@ -0,0 +1,180 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2010-2025 Intel Corporation.
+
+.. _building_from_sources:
+
+Building and Installing DPDK from Sources
+=========================================
+
+This chapter provides a comprehensive guide for building DPDK from sources.
+It covers the necessary steps, prerequisites, and considerations for different architectures and compilers.
+
+Required Tools
+--------------
+
+To build DPDK, you'll need the following tools:
+
+- A C compiler like ``gcc`` (version 5+) or ``clang`` (version 3.6+)
+- ``pkg-config`` or ``pkgconf``
+- Python 3.6 or later
+- ``meson`` (version 0.57.0) and ``ninja``
+- ``pyelftools`` (version 0.22+)
+
+Platform-Specific Tool Installation
+-----------------------------------
+
+Linux
+^^^^^
+
+Alpine
+""""""
+
+.. code-block:: bash
+
+   sudo apk add alpine-sdk bsd-compat-headers gcc pkg-config python3 meson ninja pyelftools numactl-dev
+
+Debian, Ubuntu, and derivatives
+"""""""""""""""""""""""""""""""
+
+.. code-block:: bash
+
+   sudo apt install build-essential gcc pkg-config python3 meson ninja pyelftools libnuma-dev
+
+Fedora and RedHat Enterprise Linux (RHEL)
+"""""""""""""""""""""""""""""""""""""""""
+
+.. code-block:: bash
+
+   sudo dnf groupinstall "Development Tools"
+   sudo dnf install gcc pkg-config python3 meson ninja python3-pyelftools numactl-devel
+
+openSUSE
+""""""""
+
+.. code-block:: bash
+
+   sudo zypper install -t pattern devel_basis
+   sudo zypper install gcc pkg-config python3 meson ninja python3-pyelftools libnuma-devel
+
+FreeBSD
+^^^^^^^
+
+.. code-block:: bash
+
+   pkg install pkgconf python3 meson ninja pyelftools
+
+.. note::
+
+   If you're using FreeBSD, make sure kernel sources are included during the FreeBSD installation.
+
+Windows System Requirements
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Building the DPDK and its applications on Windows requires one of the following
+environments:
+
+- The Clang-LLVM C compiler and Microsoft MSVC linker.
+- The MinGW-w64 toolchain (either native or cross).
+
+The Meson Build system is used to prepare the sources for compilation with the Ninja backend.
+
+.. _clang_llvm:
+
+Option 1: Clang-LLVM C Compiler and Microsoft MSVC Linker
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+1. Install the Compiler: Download and install the Clang compiler from the 
+   `LLVM website <http://releases.llvm.org/>`_.
+
+2. Install the Linker: Download and install the Build Tools for Visual Studio from the
+   `Microsoft website <https://visualstudio.microsoft.com/downloads/>`_.
+   When installing build tools, select the “Visual C++ build tools” option and make sure
+   the Windows SDK is selected.
+
+.. _mingw_w64_toolchain:
+
+Option 2: MinGW-w64 Toolchain
+""""""""""""""""""""""""""""""
+
+1. On Linux (for cross-compilation): Install MinGW-w64 via a package manager. 
+   Version 4.0.4 for Ubuntu 16.04 cannot be used due to a MinGW-w64 bug.
+
+2. On Windows: Obtain the latest version installer from the
+   `MinGW-w64 repository <https://mingw-w64.org/doku.php>`_. 
+   Any thread model (POSIX or Win32) can be chosen, DPDK does not rely on it. 
+   Install to a folder without spaces in its name, like ``C:\MinGW``. 
+   This path is assumed for the rest of this guide.
+
+Install the Build System
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Download and install the build system from the
+`Meson website <http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer>`_.
+A good option to choose is the MSI installer for both meson and ninja together.
+Required version is Meson 0.57.x (baseline).
+
+Getting the DPDK Source
+-----------------------
+
+Linux and FreeBSD
+^^^^^^^^^^^^^^^^^
+
+.. code-block:: bash
+
+   wget https://fast.dpdk.org/rel/dpdk-20.11.tar.xz
+   tar -xJf dpdk-20.11.tar.xz
+   cd dpdk-20.11
+
+Windows
+^^^^^^^
+
+Download the DPDK source code from `DPDK's official website <https://www.dpdk.org/>`_ or clone the repository using a Git client. Extract the downloaded archive, if applicable, and navigate to the DPDK directory.
+
+Navigate to the directory where the DPDK source code is located:
+
+.. code-block:: bash
+
+   cd C:\path\to\dpdk-20.11
+
+Building DPDK
+-------------
+
+.. note::
+
+   In all examples below, "build" is used as the name of the build directory. It is not part of the command itself.
+
+Linux and FreeBSD
+^^^^^^^^^^^^^^^^^
+
+.. code-block:: bash
+
+   meson setup build
+   meson compile -C build
+
+Windows
+^^^^^^^
+
+**Option 1: Using Clang-LLVM**
+
+.. code-block:: bash
+
+   set CC=clang
+   meson setup -Dexamples=helloworld build
+   meson compile -C build
+
+**Option 2: Using MinGW-w64**
+
+.. code-block:: bash
+
+   set PATH=C:\MinGW\mingw64\bin;%PATH%
+   meson setup -Dexamples=helloworld build
+   meson compile -C build
+
+.. note::
+
+   For detailed information on Meson build configuration options specific to DPDK, see :ref:`DPDK Meson Build Configuration Options <dpdk_meson_build_options>`.
+
+Cross-Compilation Instructions for Different Architectures
+----------------------------------------------------------
+
+For instructions on building DPDK for ARM64, LoongArch, and RISC-V, refer to :ref:`cross_compile_dpdk`.
diff --git a/doc/guides/getting_started_guide/install_and_build/index.rst b/doc/guides/getting_started_guide/install_and_build/index.rst
new file mode 100644
index 0000000000..48e438282f
--- /dev/null
+++ b/doc/guides/getting_started_guide/install_and_build/index.rst
@@ -0,0 +1,14 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2010-2025 Intel Corporation.
+
+.. _install_and_build:
+
+Install and Build DPDK
+======================
+
+.. toctree::
+    :maxdepth: 2
+
+    
+    installing_prebuilt_packages
+    building_from_sources
\ No newline at end of file
diff --git a/doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst b/doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst
new file mode 100644
index 0000000000..3e395d65f1
--- /dev/null
+++ b/doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst
@@ -0,0 +1,54 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2010-2025 Intel Corporation.
+
+.. _installing_prebuilt_packages:
+
+Installing Pre-built Packages
+=============================
+
+Pre-built packages provide a convenient way to install DPDK without the need to compile
+the source code manually. These packages are created and maintained by the DPDK
+community or OS vendors and are available for various operating systems and
+distributions.
+
+Available Distributions
+-----------------------
+
+Linux
+^^^^^
+
+Pre-built DPDK packages are available for several popular Linux distributions,
+including but not limited to:
+
+Alpine
+
+.. code-block:: bash
+
+   sudo apk add dpdk
+
+Debian and Ubuntu and derivatives
+
+.. code-block:: bash
+
+   sudo apt-get install dpdk
+
+Fedora and RedHat Enterprise Linux RHEL
+
+.. code-block:: bash
+
+   sudo dnf install dpdk
+
+openSUSE
+
+.. code-block:: bash
+
+   sudo zypper install dpdk
+
+FreeBSD
+^^^^^^^
+
+To install DPDK on FreeBSD, use the following command:
+
+.. code-block:: bash
+
+   sudo pkg install dpdk
\ No newline at end of file
-- 
2.41.0.windows.1


  parent reply	other threads:[~2023-11-23  1:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03  4:01 [PATCH v3 0/7] docs: getting started guide consolidation David Young
2023-11-03  4:01 ` [PATCH v3 1/7] Section 1: Introduction David Young
2023-11-03 13:11   ` Bruce Richardson
2023-11-03  4:01 ` [PATCH v3 2/7] Section 2: Install and Build DPDK David Young
2023-11-03 13:55   ` Bruce Richardson
2023-11-03  4:01 ` [PATCH v3 3/7] Section 3: Setting up a System to Run DPDK Applications David Young
2023-11-03 14:17   ` Bruce Richardson
2023-11-03  4:01 ` [PATCH v3 4/7] Section 4: Running Applications David Young
2023-11-03 15:13   ` Bruce Richardson
2023-11-03  4:01 ` [PATCH v3 5/7] Section 5: Appendix David Young
2023-11-03 15:23   ` Bruce Richardson
2023-11-16  1:28     ` Dave Young
2023-11-17 13:04       ` Bruce Richardson
2023-11-03  4:01 ` [PATCH v3 6/7] Added link to Getting Started Guide in index.rst David Young
2023-11-03 13:32   ` Bruce Richardson
2023-11-03 14:22   ` Bruce Richardson
2023-11-08  1:47     ` Dave Young
2023-11-08  2:06       ` Dave Young
2023-11-03  4:01 ` [PATCH v3 7/7] Section 6: Glossary David Young
2023-11-03 15:26   ` Bruce Richardson
2023-11-23  1:26 ` [PATCH v4 0/6] docs: getting started guide consolidation David Young
2023-11-23  1:26   ` [PATCH v4 1/6] Section 1: Introduction David Young
2023-11-23  1:26   ` David Young [this message]
2023-11-23  1:26   ` [PATCH v4 3/6] Section 3: Setting up a System to Run DPDK Applications David Young
2023-11-23  1:26   ` [PATCH v4 4/6] Section 4: Running Applications David Young
2023-11-23  1:26   ` [PATCH v4 5/6] Section 5: Appendix David Young
2023-11-23  1:26   ` [PATCH v4 6/6] Section 6: Glossary David Young
2024-09-11 15:54     ` Stephen Hemminger
2024-09-11 15:55     ` Stephen Hemminger
2023-12-01 15:17   ` [PATCH v4 0/6] docs: getting started guide consolidation Thomas Monjalon
2024-10-04 16:29   ` Stephen Hemminger

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=20231123012633.2005-3-dave@youngcopy.com \
    --to=dave@youngcopy.com \
    --cc=aconole@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.