[v13,7/7] doc: add aarch32 build guidance

Message ID 1615279005-30278-8-git-send-email-juraj.linkes@pantheon.tech (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series aarch64 -> aarch32 cross compilation support |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot fail travis build: failed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot fail github build: failed
ci/intel-Testing success Testing PASS

Commit Message

Juraj Linkeš March 9, 2021, 8:36 a.m. UTC
  From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 37 +++++++++++++++----
 1 file changed, 30 insertions(+), 7 deletions(-)
  

Comments

Aaron Conole March 9, 2021, 1:46 p.m. UTC | #1
Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> From: Phil Yang <phil.yang@arm.com>
>
> Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.
>
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>
  

Patch

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 faaf24b95b..8595150ace 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-aarch64-linux-gnu
+
+
 GNU toolchain
 -------------
 
@@ -72,16 +78,28 @@  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:<cross_install_dir>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin
 
+.. code-block:: console
+   tar -xvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
+   export PATH=$PATH:<cross_install_dir>/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 +136,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 arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+   ninja -C arm32-build
 
 LLVM/Clang toolchain
 --------------------
@@ -211,6 +233,7 @@  you may use various combinations of implementer/part number::
       '0xd0a':   cortex-a75
       '0xd0b':   cortex-a76
       '0xd0c':   neoverse-n1
+      'aarch32': armv8 aarch32 execution mode build
 
    Supported part_numbers for 0x43:
       '0xa1':    thunderxt88