Show a patch.

GET /api/patches/41436/?format=api
Content-Type: application/json
Vary: Accept

    "id": 41436,
    "url": "",
    "web_url": "",
    "project": {
        "id": 1,
        "url": "",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "",
        "list_email": "",
        "web_url": "",
        "scm_url": "git://",
        "webscm_url": ""
    "msgid": "<>",
    "date": "2018-06-25T02:49:09",
    "name": "[v13,2/6] doc: add a guide doc for cross compiling from x86",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b875466675249232fc8376b7897a3d13ae024781",
    "submitter": {
        "id": 1018,
        "url": "",
        "name": "Gavin Hu",
        "email": ""
    "delegate": {
        "id": 1,
        "url": "",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": ""
    "mbox": "",
    "series": [
            "id": 217,
            "url": "",
            "web_url": "",
            "date": "2018-06-25T02:49:07",
            "name": "Fix the cross compiling errors",
            "version": 13,
            "mbox": ""
    "comments": "",
    "check": "success",
    "checks": "",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.11.0",
        "List-Id": "DPDK patches and discussions <>",
        "From": "Gavin Hu <>",
        "List-Help": "<>",
        "Date": "Mon, 25 Jun 2018 10:49:09 +0800",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "",
        "List-Subscribe": "<>,\n\t<>",
        "Cc": ",\n\",
        "To": "",
        "Errors-To": "",
        "References": "<>\n\t<>",
        "Sender": "\"dev\" <>",
        "Return-Path": "<>",
        "X-BeenThere": "",
        "List-Post": "<>",
        "Received": [
            "from [] (localhost [])\n\tby (Postfix) with ESMTP id 17EB85F2E;\n\tMon, 25 Jun 2018 04:49:32 +0200 (CEST)",
            "from ( [])\n\tby (Postfix) with ESMTP id B3C6A5F0D\n\tfor <>; Mon, 25 Jun 2018 04:49:26 +0200 (CEST)",
            "from (unknown [])\n\tby (Postfix) with ESMTP id 0624D15AD;\n\tSun, 24 Jun 2018 19:49:26 -0700 (PDT)",
            "from (\n\t[])\n\tby (Postfix) with ESMTPA id\n\t658E63F59C; Sun, 24 Jun 2018 19:49:25 -0700 (PDT)"
        "List-Archive": "<>",
        "Subject": "[dpdk-dev] [PATCH v13 2/6] doc: add a guide doc for cross compiling\n\tfrom x86",
        "In-Reply-To": "<>",
        "Message-Id": "<>",
        "Precedence": "list",
        "List-Unsubscribe": "<>,\n\t<>",
        "X-Original-To": ""
    "content": "From: gavin hu <>\n\nThis is the guide for cross compiling ARM64 DPDK from X86 hosts.\n\nSigned-off-by: Gavin Hu <>\nReviewed-by: Steve Capper <>\nReviewed-by: Honnappa Nagarahalli <>\nAcked-by: Marko Kovacevic <>\n---\n .../linux_gsg/cross_build_dpdk_for_arm64.rst       | 132 +++++++++++++++++++++\n doc/guides/linux_gsg/index.rst                     |   1 +\n 2 files changed, 133 insertions(+)\n create mode 100644 doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst",
    "diff": "diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst\nnew file mode 100644\nindex 000000000..bad3d0288\n--- /dev/null\n+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst\n@@ -0,0 +1,132 @@\n+..  SPDX-License-Identifier: BSD-3-Clause\n+    Copyright(c) 2018 ARM Corporation.\n+\n+Cross compile DPDK for ARM64\n+============================\n+This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.\n+\n+.. note::\n+\n+   Whilst it is recommended to natively build DPDK on ARM64 (just\n+   like with x86), it is also possible to cross-build DPDK for ARM64. An\n+   ARM64 cross compile GNU toolchain is used for this.\n+\n+Obtain the cross tool chain\n+---------------------------\n+The latest cross compile tool chain can be downloaded from:\n+\n+\n+Following is the step to get the version 7.2.1, latest one at the time of this writing.\n+\n+.. code-block:: console\n+\n+   wget\n+\n+Unzip and add into the PATH\n+---------------------------\n+\n+.. code-block:: console\n+\n+   tar -xvf gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz\n+   export PATH=$PATH:<cross_install_dir>/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin\n+\n+.. note::\n+\n+   For the host requirements and other info, refer to the release note section:\n+\n+Getting the prerequisite library\n+--------------------------------\n+\n+NUMA is required by most modern machines, not needed for non-NUMA architectures.\n+\n+.. note::\n+\n+   For compiling the NUMA lib, run libtool --version to ensure the libtool version >= 2.2,\n+   otherwise the compilation will fail with errors.\n+\n+.. code-block:: console\n+\n+   git clone\n+   cd numactl\n+   git checkout v2.0.11 -b v2.0.11\n+   ./\n+   autoconf -i\n+   ./configure --host=x86_64 CC=aarch64-linux-gnu-gcc prefix=<numa install dir>\n+   make install\n+\n+The numa header files and lib file is generated in the include and lib folder respectively under <numa install dir>.\n+\n+.. _augment_the_cross_toolchain_with_numa_support:\n+\n+Augment the cross toolchain with NUMA support\n+---------------------------------------------\n+\n+.. note::\n+\n+   This way is optional, an alternative is to use extra CFLAGS and LDFLAGS, depicted in :ref:`configure_and_cross_compile_dpdk_build` below.\n+\n+Copy the NUMA header files and lib to the cross compiler's directories:\n+\n+.. code-block:: console\n+\n+   cp <numa_install_dir>/include/numa*.h <cross_install_dir>/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/usr/include/\n+   cp <numa_install_dir>/lib/libnuma.a <cross_install_dir>/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.2.1/\n+\n+.. _configure_and_cross_compile_dpdk_build:\n+\n+Configure and cross compile DPDK Build\n+--------------------------------------\n+To configure a build, choose one of the target configurations, like arm64-dpaa2-linuxapp-gcc and arm64-thunderx-linuxapp-gcc.\n+\n+.. code-block:: console\n+\n+   make config T=arm64-armv8a-linuxapp-gcc\n+\n+To cross-compile, without compiling the kernel modules, use the following command:\n+\n+.. code-block:: console\n+\n+   make -j CROSS=aarch64-linux-gnu- CONFIG_RTE_KNI_KMOD=n CONFIG_RTE_EAL_IGB_UIO=n\n+\n+To cross-compile, including the kernel modules, the kernel source tree needs to be specified by setting\n+RTE_KERNELDIR:\n+\n+.. code-block:: console\n+\n+   make -j CROSS=aarch64-linux-gnu- RTE_KERNELDIR=<kernel_src_rootdir> CROSS_COMPILE=aarch64-linux-gnu-\n+\n+To compile for non-NUMA targets, without compiling the kernel modules, use the following command:\n+\n+.. code-block:: console\n+\n+   make -j CROSS=aarch64-linux-gnu- CONFIG_RTE_KNI_KMOD=n CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_LIBRTE_VHOST_NUMA=n CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n\n+\n+.. note::\n+\n+   1. EXTRA_CFLAGS and EXTRA_LDFLAGS should be added to include the NUMA headers and link the library respectively,\n+   if the above step :ref:`augment_the_cross_toolchain_with_numa_support` was skipped therefore the toolchain was not\n+   augmented with NUMA support.\n+\n+   2. \"-isystem <numa_install_dir>/include\" should be add to EXTRA_CFLAGS, otherwise the numa.h file will get a lot of compiling\n+   errors of Werror=cast-qual, Werror=strict-prototypes and Werror=old-style-definition.\n+\n+   An example is given below:\n+\n+   .. code-block:: console\n+\n+      make -j CROSS=aarch64-linux-gnu- CONFIG_RTE_KNI_KMOD=n CONFIG_RTE_EAL_IGB_UIO=n EXTRA_CFLAGS=\"-isystem <numa_install_dir>/include\" EXTRA_LDFLAGS=\"-L<numa_install_dir>/lib -lnuma\"\n+\n+Meson Cross Compiling DPDK\n+--------------------------\n+\n+To cross-compile DPDK on a desired target machine we can use the following\n+command::\n+\n+\tmeson cross-build --cross-file <target_machine_configuration>\n+\tninja -C cross-build\n+\n+For example if the target machine is arm64 we can use the following\n+command::\n+\n+\tmeson arm64-build --cross-file config/arm/arm64_armv8_linuxapp_gcc\n+\tninja -C arm64-build\ndiff --git a/doc/guides/linux_gsg/index.rst b/doc/guides/linux_gsg/index.rst\nindex 2a7bdfe92..077f93023 100644\n--- a/doc/guides/linux_gsg/index.rst\n+++ b/doc/guides/linux_gsg/index.rst\n@@ -13,6 +13,7 @@ Getting Started Guide for Linux\n     intro\n     sys_reqs\n     build_dpdk\n+    cross_build_dpdk_for_arm64\n     linux_drivers\n     build_sample_apps\n     enable_func\n",
    "prefixes": [