From patchwork Thu Apr 22 12:49:09 2021 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: 92028 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14B36A09E4; Thu, 22 Apr 2021 14:50:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06EB941D88; Thu, 22 Apr 2021 14:49:32 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id CF06841D6F for ; Thu, 22 Apr 2021 14:49:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id B3672C5F63; Thu, 22 Apr 2021 14:49:25 +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 R8ueYY6YQBhZ; Thu, 22 Apr 2021 14:49:24 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 1AD60C5F64; Thu, 22 Apr 2021 14:49:20 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Phil Yang Date: Thu, 22 Apr 2021 14:49:09 +0200 Message-Id: <1619095749-7948-9-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v17 8/8] doc: add aarch32 build guidance X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Acked-by: Ruifeng Wang Acked-by: Aaron Conole --- .../linux_gsg/cross_build_dpdk_for_arm64.rst | 38 +++++++++++++++---- 1 file changed, 31 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 3857cdefe9..df10383aa8 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) 2020 ARM Corporation. + Copyright(c) 2021 ARM Corporation. -Cross compiling 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 on x86 build +machines and compile 32-bit aarch32 DPDK on aarch64 build machines. .. note:: - Whilst it is recommended to natively build DPDK on ARM64 (just - like with x86), it is also possible to cross compile DPDK for ARM64. - An ARM64 cross compiler GNU toolchain or an LLVM/clang toolchain + Whilst it is recommended to natively build DPDK on aarch64 (just + like with x86), it is also possible to cross compile DPDK for aarch64. + An aarch64 cross compiler GNU toolchain or an LLVM/clang toolchain may be used for cross-compilation. @@ -54,6 +55,11 @@ To install it in Ubuntu:: sudo apt install pkg-config-aarch64-linux-gnu +For aarch32, install ``pkg-config-arm-linux-gnueabihf``:: + + sudo apt install pkg-config-arm-linux-gnueabihf + + GNU toolchain ------------- @@ -72,16 +78,30 @@ the following description is an example of this version. .. code-block:: console + # aarch64 binaries wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz +.. code-block:: console + + # aarch32 binaries + wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz + + Unzip and add into the PATH ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console + # aarch64 tar -xvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz export PATH=$PATH:/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin +.. code-block:: console + + # aarch32 + tar -xvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz + export PATH=$PATH:/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin + .. note:: For the host requirements and other info, refer to the release note section: https://releases.linaro.org/components/toolchain/binaries/ @@ -118,6 +138,10 @@ command:: meson aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc ninja -C aarch64-build-gcc +If the target machine is aarch32 we can use the following command:: + + meson aarch32-build --cross-file config/arm/arm32_armv8a_linux_gcc + ninja -C aarch32-build LLVM/Clang toolchain --------------------