Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41982/?format=api
http://patchwork.dpdk.org/api/patches/41982/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180629172738.2121-3-gavin.hu@arm.com/", "project": { "id": 1, "url": "http://patchwork.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", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20180629172738.2121-3-gavin.hu@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180629172738.2121-3-gavin.hu@arm.com", "date": "2018-06-29T17:27:34", "name": "[v14,2/6] doc: add a guide doc for cross compiling from x86", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "3d4b1d88ec53e062b6ca174ac545220beac7e095", "submitter": { "id": 1018, "url": "http://patchwork.dpdk.org/api/people/1018/?format=api", "name": "Gavin Hu", "email": "gavin.hu@arm.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180629172738.2121-3-gavin.hu@arm.com/mbox/", "series": [ { "id": 330, "url": "http://patchwork.dpdk.org/api/series/330/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=330", "date": "2018-06-29T17:27:32", "name": "Fix the cross compiling errors", "version": 14, "mbox": "http://patchwork.dpdk.org/series/330/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/41982/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/41982/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DA0C61B75D;\n\tFri, 29 Jun 2018 19:27:59 +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 31F1C1B05F\n\tfor <dev@dpdk.org>; Fri, 29 Jun 2018 19:27:54 +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 95B121529;\n\tFri, 29 Jun 2018 10:27:53 -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\t055EF3F5AD; Fri, 29 Jun 2018 10:27:52 -0700 (PDT)" ], "From": "Gavin Hu <gavin.hu@arm.com>", "To": "dev@dpdk.org", "Cc": "nd@arm.com,\n\tgavin.hu@arm.com", "Date": "Sat, 30 Jun 2018 01:27:34 +0800", "Message-Id": "<20180629172738.2121-3-gavin.hu@arm.com>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20180629172738.2121-1-gavin.hu@arm.com>", "References": "<20180625024913.17219-1-gavin.hu@arm.com>\n\t<20180629172738.2121-1-gavin.hu@arm.com>", "Subject": "[dpdk-dev] [PATCH v14 2/6] doc: add a guide doc for cross compiling\n\tfrom x86", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@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..9d1f0fa00\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=aarch64-linux-gnu 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": [ "v14", "2/6" ] }{ "id": 41982, "url": "