Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/5] Add ILP32 support in aarch64
@ 2015-03-16 10:00 Zhang Jian
  2015-03-16 10:00 ` [Buildroot] [PATCH 1/5] aarch64: add big endian(aarch64_be) support Zhang Jian
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Zhang Jian @ 2015-03-16 10:00 UTC (permalink / raw)
  To: buildroot

ILP32 is very useful when the user want to migrate from arm 32bit to 64bit
with minimal risk. There is no code changes and almost no footprint changes
after migration. ILP32 could get the better performance compare with arm 32bit
(use 64bit register and instruction instead of 32bit one) and aarch64 LP64
(aarch64 default ABI).

Our test show that the performance of ILP32 is roughly 10% better than arm64
LP64 while the footprint is 86% of LP64. Because of these, It is useful for
both embedded and enterprise system.

Here is the details definition of ILP32:
ILP32 is elf32 with aarch64 assembly and is compiled by 64bit compiler.
Refer the following table:

  \-            |  arm 32bit  | arm64 ILP32 | arm64 LP64
----------------|-------------|-------------|-------------
instruction set |   armv7-a   |   armv8-a   |   armv8-a
int             |   32bit     |   32bit     |   32bit
long            |   32bit     | **32bit**   |   64bit
pointer         |   32bit     | **32bit**   |   64bit

LP64 is the default ABI on arm64(Implies -mabi=lp64 while compiling), and the
kernel remains in LP64 no matter ILP32 enables or not.

These series patches introduce the big endian support in aarch64 and then add
ILP32 special filename and menuconfig step by step.

The test of build is based on linaro kernel [1] and toolchain built by linaro
ABE environment[2].

This is my first time I try to contribute the buildroot, feedback is very
appreciated. Sorry if there are some coding style issues.

regards

bamvor

[1] https://git.linaro.org/kernel/linux-linaro-tracking.git
[2] https://wiki.linaro.org/ABE


Zhang Jian(Bamvor) (5):
  aarch64: add big endian(aarch64_be) support
  aarch64: ilp32: handle special file name
  aarch64: ilp32: add ilp32 compiler and linker flags
  aarch64: ilp32: add ilp32 menuconfig
  aarch64: ilp32 defconfig examples

 Makefile                                           |  9 +++++
 arch/Config.in                                     | 12 +++++--
 arch/Config.in.aarch64                             | 40 ++++++++++++++++++++-
 configs/aarch64_be_defconfig                       | 10 ++++++
 configs/aarch64_be_ilp32_defconfig                 | 12 +++++++
 configs/aarch64_ilp32_defconfig                    | 12 +++++++
 package/Makefile.in                                | 10 +++++-
 toolchain/helpers.mk                               |  4 +--
 toolchain/toolchain-external/toolchain-external.mk | 41 ++++++++++++++++++++--
 9 files changed, 142 insertions(+), 8 deletions(-)
 create mode 100644 configs/aarch64_be_defconfig
 create mode 100644 configs/aarch64_be_ilp32_defconfig
 create mode 100644 configs/aarch64_ilp32_defconfig

-- 
1.8.4.5

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 0/5] Add ILP32 support in aarch64
@ 2015-07-20 11:25 Zhang Jian
  0 siblings, 0 replies; 12+ messages in thread
From: Zhang Jian @ 2015-07-20 11:25 UTC (permalink / raw)
  To: buildroot

This is third version of my patches. This previous version is
here[1][2]. The previous discussion, Gustavo agree that only external
toolchain is in consideration at this time. I will try to work on the
buildroot toolchain after current series patch is upstreamed.

ILP32 is very useful when the user want to migrate from arm 32bit to
64bit with minimal risk. There is almost no code changes after
migration. ILP32 could get the better performance compare with arm
32bit (use 64bit register and instruction instead of 32bit one) and
aarch64 LP64 (aarch64 default ABI).

Our test show that the performance of ILP32 is roughly 10% better than
arm64 LP64 while the footprint is 86% of LP64. Because of these, It is
useful for both embedded and enterprise system.

Here is the details definition of ILP32:
ILP32 is elf32 with aarch64 assembly and is compiled by 64bit compiler.
Refer the following table:

  \-            |  arm 32bit  | arm64 ILP32 | arm64 LP64
----------------|-------------|-------------|-------------
instruction set |   armv7-a   |   armv8-a   |   armv8-a
int             |   32bit     |   32bit     |   32bit
long            |   32bit     | **32bit**   |   64bit
pointer         |   32bit     | **32bit**   |   64bit

LP64 is the default ABI on arm64(Implies -mabi=lp64 while compiling),
and the kernel remains in LP64 no matter ILP32 enables or not.

These series patches introduce the big endian support in aarch64 and
then add ILP32 special filename and menuconfig step by step.

The test of build is based on linaro kernel[3] and toolchain built by
linaro ABE environment[4], anyone could built this toolchain through
the simpile abe script.

This is my first time I try to contribute the buildroot, feedback is
very appreciated. Sorry if there are some coding style issues.

changes since v2
1.  Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to
    the suggestion from Thomas.
2.  Improve the ifeq in patch 2/5 according to Gustavo.
3.  Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1
1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE


Zhang Jian(Bamvor) (5):
  aarch64: add big endian(aarch64_be) support
  aarch64: ilp32: handle special file name
  aarch64: ilp32: add ilp32 compiler and linker flags
  aarch64: ilp32: add ilp32 build config
  aarch64: ilp32 defconfig examples

 Makefile                                           |  8 +++-
 arch/Config.in                                     | 13 ++++++-
 arch/Config.in.aarch64                             | 40 ++++++++++++++++++-
 configs/aarch64_be_defconfig                       |  2 +
 configs/aarch64_be_ilp32_defconfig                 |  8 ++++
 configs/aarch64_ilp32_defconfig                    |  8 ++++
 package/Makefile.in                                | 12 +++++-
 package/binutils/Config.in                         |  4 +-
 package/binutils/Config.in.host                    | 10 +++--
 package/dropwatch/Config.in                        |  5 ++-
 package/gcc/Config.in.host                         | 11 +++---
 package/gdb/Config.in.host                         |  2 +-
 package/gpsd/Config.in                             |  2 +-
 package/lightning/Config.in                        |  5 ++-
 package/nginx/Config.in                            |  3 +-
 package/oprofile/Config.in                         |  6 ++-
 toolchain/Config.in                                |  2 +
 toolchain/helpers.mk                               |  4 +-
 toolchain/toolchain-buildroot/Config.in            | 27 ++++++-------
 toolchain/toolchain-external/Config.in             | 22 +++++++++++
 toolchain/toolchain-external/toolchain-external.mk | 45 +++++++++++++++++++++-
 21 files changed, 196 insertions(+), 43 deletions(-)
 create mode 100644 configs/aarch64_be_defconfig
 create mode 100644 configs/aarch64_be_ilp32_defconfig
 create mode 100644 configs/aarch64_ilp32_defconfig

-- 
1.8.4.5

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-07-20 11:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-16 10:00 [Buildroot] [PATCH 0/5] Add ILP32 support in aarch64 Zhang Jian
2015-03-16 10:00 ` [Buildroot] [PATCH 1/5] aarch64: add big endian(aarch64_be) support Zhang Jian
2015-03-16 10:00 ` [Buildroot] [PATCH 2/5] aarch64: ilp32: handle special file name Zhang Jian
2015-03-17 10:27   ` Steven Noonan
2015-03-17 14:31     ` Bamvor Zhang
2015-03-16 10:00 ` [Buildroot] [PATCH 3/5] aarch64: ilp32: add ilp32 compiler and linker flags Zhang Jian
2015-03-16 10:00 ` [Buildroot] [PATCH 4/5] aarch64: ilp32: add ilp32 menuconfig Zhang Jian
2015-03-16 10:00 ` [Buildroot] [PATCH 5/5] aarch64: ilp32 defconfig examples Zhang Jian
2015-03-17 13:30 ` [Buildroot] [PATCH 0/5] Add ILP32 support in aarch64 Gustavo Zacarias
2015-03-17 14:44   ` Bamvor Zhang
2015-03-17 17:49     ` Gustavo Zacarias
  -- strict thread matches above, loose matches on Subject: below --
2015-07-20 11:25 Zhang Jian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox