From patchwork Fri Aug 14 10:31:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 75557 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B1849A04B0; Fri, 14 Aug 2020 12:32:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C6231C12C; Fri, 14 Aug 2020 12:31:54 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 2AEAE1C0DA for ; Fri, 14 Aug 2020 12:31:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 57622970A4; Fri, 14 Aug 2020 12:31:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vwfy_mS4HHNh; Fri, 14 Aug 2020 12:31:44 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id C17D5970A6; Fri, 14 Aug 2020 12:31:41 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Phil Yang Date: Fri, 14 Aug 2020 12:31:32 +0200 Message-Id: <1597401092-13713-6-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597310476-11293-1-git-send-email-juraj.linkes@pantheon.tech> <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v7 5/5] doc: add aarch32 build guidance X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Phil Yang Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host. Signed-off-by: Phil Yang --- .../linux_gsg/cross_build_dpdk_for_arm64.rst | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst index c5875a6d5..07085e3ea 100644 --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst @@ -1,15 +1,16 @@ .. SPDX-License-Identifier: BSD-3-Clause Copyright(c) 2018 ARM Corporation. -Cross compile DPDK for ARM64 -============================ -This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts. +Cross compile DPDK for aarch64 and aarch32 +========================================== +This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile +32-bit aarch32 DPDK from aarch64 build hosts. .. note:: - Whilst it is recommended to natively build DPDK on ARM64 (just - like with x86), it is also possible to cross-build DPDK for ARM64. An - ARM64 cross compile GNU toolchain is used for this. + Whilst it is recommended to natively build DPDK on aarch64 (just + like with x86), it is also possible to cross-build DPDK for aarch64. + An aarch64 cross compile GNU toolchain is used for this. Obtain the cross tool chain --------------------------- @@ -88,18 +89,33 @@ To install it in Ubuntu:: sudo apt-get install pkg-config-aarch64-linux-gnu +.. note:: + + Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications + can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required + for aarch32 on aarch64. To install it in Ubuntu:: + + sudo dpkg --add-architecture armhf + sudo apt-get update + sudo apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make binutils + To cross-compile DPDK on a desired target machine we can use the following command:: meson cross-build --cross-file ninja -C cross-build -For example if the target machine is arm64 we can use the following +For example if the target machine is aarch64 we can use the following command:: meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc ninja -C arm64-build +If the target machine is aarch32 we can use the following command:: + + meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc + ninja -C arm32-build + Configure and Cross Compile DPDK using Make ------------------------------------------- To configure a build, choose one of the target configurations, like arm64-dpaa-linux-gcc and arm64-thunderx-linux-gcc.