Show a patch.

GET /api/patches/41436/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 41436,
    "url": "http://patches.dpdk.org/api/patches/41436/?format=api",
    "web_url": "http://patches.dpdk.org/patch/41436/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk"
    },
    "msgid": "<20180625024913.17219-3-gavin.hu@arm.com>",
    "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": "http://patches.dpdk.org/api/people/1018/?format=api",
        "name": "Gavin Hu",
        "email": "gavin.hu@arm.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/patch/41436/mbox/",
    "series": [
        {
            "id": 217,
            "url": "http://patches.dpdk.org/api/series/217/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=217",
            "date": "2018-06-25T02:49:07",
            "name": "Fix the cross compiling errors",
            "version": 13,
            "mbox": "http://patches.dpdk.org/series/217/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41436/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41436/checks/",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.11.0",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "From": "Gavin Hu <gavin.hu@arm.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Date": "Mon, 25 Jun 2018 10:49:09 +0800",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Cc": "nd@arm.com,\n\tgavin.hu@arm.com",
        "To": "dev@dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "References": "<20180619103657.19186-1-gavin.hu@arm.com>\n\t<20180625024913.17219-1-gavin.hu@arm.com>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 17EB85F2E;\n\tMon, 25 Jun 2018 04:49:32 +0200 (CEST)",
            "from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70])\n\tby dpdk.org (Postfix) with ESMTP id B3C6A5F0D\n\tfor <dev@dpdk.org>; Mon, 25 Jun 2018 04:49:26 +0200 (CEST)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0624D15AD;\n\tSun, 24 Jun 2018 19:49:26 -0700 (PDT)",
            "from net-debian.shanghai.arm.com (net-debian.shanghai.arm.com\n\t[10.169.36.53])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\t658E63F59C; Sun, 24 Jun 2018 19:49:25 -0700 (PDT)"
        ],
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v13 2/6] doc: add a guide doc for cross compiling\n\tfrom x86",
        "In-Reply-To": "<20180625024913.17219-1-gavin.hu@arm.com>",
        "Message-Id": "<20180625024913.17219-3-gavin.hu@arm.com>",
        "Precedence": "list",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-Original-To": "patchwork@dpdk.org"
    },
    "content": "From: gavin hu <gavin.hu@arm.com>\n\nThis is the guide for cross compiling ARM64 DPDK from X86 hosts.\n\nSigned-off-by: Gavin Hu <gavin.hu@arm.com>\nReviewed-by: Steve Capper <Steve.Capper@arm.com>\nReviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>\nAcked-by: Marko Kovacevic <marko.kovacevic@intel.com>\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+https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/.\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 https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz\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: https://releases.linaro.org/components/toolchain/binaries/latest/\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 https://github.com/numactl/numactl.git\n+   cd numactl\n+   git checkout v2.0.11 -b v2.0.11\n+   ./autogen.sh\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": [
        "v13",
        "2/6"
    ]
}