[2/2] doc: add aarch32 build guidance
Checks
Commit Message
Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Tested-by: Joyce Kong <joyce.kong@arm.com>
---
.../linux_gsg/cross_build_dpdk_for_arm64.rst | 36 ++++++++++++++++++----
1 file changed, 30 insertions(+), 6 deletions(-)
Comments
11/11/2019 11:34, Phil Yang:
> Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Tested-by: Joyce Kong <joyce.kong@arm.com>
>
> ---
> .../linux_gsg/cross_build_dpdk_for_arm64.rst | 36 ++++++++++++++++++----
> 1 file changed, 30 insertions(+), 6 deletions(-)
What is the status of this patch?
The patch 1/2 was rejected.
There are new works around aarch32.
Is it still relevant?
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, May 25, 2020 5:21 AM
> To: Phil Yang <Phil.Yang@arm.com>
> Cc: dev@dpdk.org; david.marchand@redhat.com; jerinj@marvell.com;
> Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; Gavin Hu
> <Gavin.Hu@arm.com>; Joyce Kong <Joyce.Kong@arm.com>; nd
> <nd@arm.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
>
> 11/11/2019 11:34, Phil Yang:
> > Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > Tested-by: Joyce Kong <joyce.kong@arm.com>
> >
> > ---
> > .../linux_gsg/cross_build_dpdk_for_arm64.rst | 36
> ++++++++++++++++++----
> > 1 file changed, 30 insertions(+), 6 deletions(-)
>
> What is the status of this patch?
> The patch 1/2 was rejected.
> There are new works around aarch32.
> Is it still relevant?
Thank you for your kindly reminder.
Yes. It is relevant.
This document is intended to guide the user to cross-compile aarch32 DPDK.
Usually the cross-compile host is x86, but cross-compiling on aarch64 is convenient as well, but not everyone knows how to do it.
So it is helpful to provide relevant reference documents.
Thanks,
Phil
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Phil Yang
> Sent: Monday, November 11, 2019 6:34 PM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; david.marchand@redhat.com;
> jerinj@marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
>
> Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Tested-by: Joyce Kong <joyce.kong@arm.com>
>
> ---
> .../linux_gsg/cross_build_dpdk_for_arm64.rst | 36
> ++++++++++++++++++----
> 1 file changed, 30 insertions(+), 6 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 e799b0b..409d444 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,15 @@
> .. 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 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
> ---------------------------
> @@ -133,3 +133,27 @@ command::
>
> meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
> ninja -C arm64-build
> +
> +Compiling DPDK for aarch32/armv7 on aarch64 host
> +------------------------------------------
> +
> +Some aarch64 platforms support EL0 aarch32 mode, so the 32-bit aarch32
> +applications and the legacy 32-bit armv7 applications can run in this mode.
> +With the GNU C compiler for the armhf architecture toolchain
> +gcc-arm-linux-gnueabihf, it can generate aarch32 binary on aarch64 natively.
> +
> +For Example, in 64-bit Debian, we can use the following command to build
> 32-bit armv7 DPDK on aarch64 natively:
> +
> +Install cross compile toolchain for the armhf architecure.
> +command::
> +
> + dpkg --add-architecture armhf
> + apt-get update
> + apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make
> +binutils
> +
> +Build DPDK arm-armv7a-linuxapp-gcc executables.
> +command::
> +
> + cd <dpdk_folder>
> + make config CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-
> gcc
> + make -j CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
> +RTE_DEVEL_BUILD=n
> --
> 2.7.4
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Hi Jerin,
Your insight would be much appreciated.
Thanks,
Phil
> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Wednesday, May 27, 2020 4:29 PM
> To: Phil Yang <Phil.Yang@arm.com>; dev@dpdk.org
> Cc: thomas@monjalon.net; david.marchand@redhat.com;
> jerinj@marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Joyce Kong <Joyce.Kong@arm.com>; nd
> <nd@arm.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
>
>
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Phil Yang
> > Sent: Monday, November 11, 2019 6:34 PM
> > To: dev@dpdk.org
> > Cc: thomas@monjalon.net; david.marchand@redhat.com;
> > jerinj@marvell.com; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
> >
> > Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > Tested-by: Joyce Kong <joyce.kong@arm.com>
> >
> > ---
> > .../linux_gsg/cross_build_dpdk_for_arm64.rst | 36
> > ++++++++++++++++++----
> > 1 file changed, 30 insertions(+), 6 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 e799b0b..409d444 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,15 @@
> > .. 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
> 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
> > ---------------------------
> > @@ -133,3 +133,27 @@ command::
> >
> > meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
> > ninja -C arm64-build
> > +
> > +Compiling DPDK for aarch32/armv7 on aarch64 host
> > +------------------------------------------
> > +
> > +Some aarch64 platforms support EL0 aarch32 mode, so the 32-bit aarch32
> > +applications and the legacy 32-bit armv7 applications can run in this mode.
> > +With the GNU C compiler for the armhf architecture toolchain
> > +gcc-arm-linux-gnueabihf, it can generate aarch32 binary on aarch64
> natively.
> > +
> > +For Example, in 64-bit Debian, we can use the following command to build
> > 32-bit armv7 DPDK on aarch64 natively:
> > +
> > +Install cross compile toolchain for the armhf architecure.
> > +command::
> > +
> > + dpkg --add-architecture armhf
> > + apt-get update
> > + apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make
> > +binutils
> > +
> > +Build DPDK arm-armv7a-linuxapp-gcc executables.
> > +command::
> > +
> > + cd <dpdk_folder>
> > + make config CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-
> > gcc
> > + make -j CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
> > +RTE_DEVEL_BUILD=n
> > --
> > 2.7.4
>
> Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
On Thu, Jul 2, 2020 at 11:07 AM Phil Yang <Phil.Yang@arm.com> wrote:
>
> Hi Jerin,
>
> Your insight would be much appreciated.
>
> Thanks,
> Phil
>
> > -----Original Message-----
> > From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > Sent: Wednesday, May 27, 2020 4:29 PM
> > To: Phil Yang <Phil.Yang@arm.com>; dev@dpdk.org
> > Cc: thomas@monjalon.net; david.marchand@redhat.com;
> > jerinj@marvell.com; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; Joyce Kong <Joyce.Kong@arm.com>; nd
> > <nd@arm.com>; stable@dpdk.org
> > Subject: RE: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
> >
> >
> > > -----Original Message-----
> > > From: dev <dev-bounces@dpdk.org> On Behalf Of Phil Yang
> > > Sent: Monday, November 11, 2019 6:34 PM
> > > To: dev@dpdk.org
> > > Cc: thomas@monjalon.net; david.marchand@redhat.com;
> > > jerinj@marvell.com; Honnappa Nagarahalli
> > > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > > Subject: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
> > >
> > > Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
> > >
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > > Tested-by: Joyce Kong <joyce.kong@arm.com>
> > >
> > > ---
> > > .../linux_gsg/cross_build_dpdk_for_arm64.rst | 36
> > > ++++++++++++++++++----
> > > 1 file changed, 30 insertions(+), 6 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 e799b0b..409d444 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,15 @@
> > > .. 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
> > 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
> > > ---------------------------
> > > @@ -133,3 +133,27 @@ command::
> > >
> > > meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
> > > ninja -C arm64-build
> > > +
> > > +Compiling DPDK for aarch32/armv7 on aarch64 host
> > > +------------------------------------------
> > > +
> > > +Some aarch64 platforms support EL0 aarch32 mode, so the 32-bit aarch32
> > > +applications and the legacy 32-bit armv7 applications can run in this mode.
> > > +With the GNU C compiler for the armhf architecture toolchain
> > > +gcc-arm-linux-gnueabihf, it can generate aarch32 binary on aarch64
> > natively.
> > > +
> > > +For Example, in 64-bit Debian, we can use the following command to build
I think, "we" usage should be removed from the doc.
> > > 32-bit armv7 DPDK on aarch64 natively:
> > > +
> > > +Install cross compile toolchain for the armhf architecure.
> > > +command::
> > > +
> > > + dpkg --add-architecture armhf
> > > + apt-get update
> > > + apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make
> > > +binutils
> > > +
> > > +Build DPDK arm-armv7a-linuxapp-gcc executables.
> > > +command::
> > > +
> > > + cd <dpdk_folder>
> > > + make config CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-
> > > gcc
> > > + make -j CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
> > > +RTE_DEVEL_BUILD=n
make based build is deprecated, Please change this to meson.
The rest looks good to me.
> > > --
> > > 2.7.4
> >
> > Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -1,15 +1,15 @@
.. 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 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
---------------------------
@@ -133,3 +133,27 @@ command::
meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
ninja -C arm64-build
+
+Compiling DPDK for aarch32/armv7 on aarch64 host
+------------------------------------------
+
+Some aarch64 platforms support EL0 aarch32 mode, so the 32-bit aarch32
+applications and the legacy 32-bit armv7 applications can run in this mode.
+With the GNU C compiler for the armhf architecture toolchain
+gcc-arm-linux-gnueabihf, it can generate aarch32 binary on aarch64 natively.
+
+For Example, in 64-bit Debian, we can use the following command to build 32-bit armv7 DPDK on aarch64 natively:
+
+Install cross compile toolchain for the armhf architecure.
+command::
+
+ dpkg --add-architecture armhf
+ apt-get update
+ apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make binutils
+
+Build DPDK arm-armv7a-linuxapp-gcc executables.
+command::
+
+ cd <dpdk_folder>
+ make config CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
+ make -j CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc RTE_DEVEL_BUILD=n