aarch64: add big endian(aarch64_be) support
authorBamvor Jian Zhang <bamvor.zhangjian@huawei.com>
Wed, 18 Mar 2015 09:49:48 +0000 (17:49 +0800)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Jul 2015 16:32:37 +0000 (18:32 +0200)
Add aarch64_be support. Note that CONFIG_CPU_BIG_ENDIAN should be
defined in kernel config when building a big endian kernel.

Signed-off-by: Zhang Jian(Bamvor) <bamvor.zhangjian@huawei.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile
arch/Config.in
arch/Config.in.aarch64
toolchain/toolchain-buildroot/Config.in

index b1bcf78c2f1d2e182b914a98c326f9601fcc64f7..35818f08f2d71f3a92daf8d9fbdb019a91530f6e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -329,7 +329,7 @@ KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
        -e s/arcle/arc/ \
        -e s/arceb/arc/ \
        -e s/arm.*/arm/ -e s/sa110/arm/ \
-       -e s/aarch64/arm64/ \
+       -e s/aarch64.*/arm64/ \
        -e s/bfin/blackfin/ \
        -e s/parisc64/parisc/ \
        -e s/powerpc64.*/powerpc/ \
index 94397b34c69ed7821e82b79f7b2930a87d5ee90c..39ce0464df2796136a2864cf022aa1e25e0772fd 100644 (file)
@@ -59,7 +59,15 @@ config BR2_armeb
          http://en.wikipedia.org/wiki/ARM
 
 config BR2_aarch64
-       bool "AArch64"
+       bool "AArch64 (little endian)"
+       select BR2_ARCH_IS_64
+       help
+         Aarch64 is a 64-bit architecture developed by ARM Holdings.
+         http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php
+         http://en.wikipedia.org/wiki/ARM
+
+config BR2_aarch64_be
+       bool "AArch64 (big endian)"
        select BR2_ARCH_IS_64
        select BR2_ARCH_HAS_MMU_MANDATORY
        help
@@ -347,7 +355,7 @@ if BR2_arm || BR2_armeb
 source "arch/Config.in.arm"
 endif
 
-if BR2_aarch64
+if BR2_aarch64 || BR2_aarch64_be
 source "arch/Config.in.aarch64"
 endif
 
index 2e79870b34a59d3300db9599614ab16b100d3604..325bcccda26653e1c08d600fc540908499815b0a 100644 (file)
@@ -1,8 +1,10 @@
 config BR2_ARCH
        default "aarch64"       if BR2_aarch64
+       default "aarch64_be"    if BR2_aarch64_be
 
 config BR2_ENDIAN
-       default "LITTLE"
+       default "LITTLE" if BR2_aarch64
+       default "BIG"    if BR2_aarch64_be
 
 config BR2_ARCH_HAS_ATOMICS
        default y
index 77a197edc0a0dde682d395a3a32d64226c48c1f7..13e2b15748dca556e4ffe4fb1acf51ec21eae5e9 100644 (file)
@@ -23,8 +23,8 @@ source "package/linux-headers/Config.in.host"
 choice
        prompt "C library"
        default BR2_TOOLCHAIN_UCLIBC
-       default BR2_TOOLCHAIN_BUILDROOT_GLIBC if BR2_aarch64 || BR2_microblaze \
-               || BR2_mips64 || BR2_mips64el || BR2_powerpc64
+       default BR2_TOOLCHAIN_BUILDROOT_GLIBC if BR2_aarch64 || BR2_aarch64_be \
+               || BR2_microblaze || BR2_mips64 || BR2_mips64el || BR2_powerpc64
 
 config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
        bool "uClibc"
@@ -42,11 +42,12 @@ config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
 
 config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
        bool "eglibc"
-       depends on BR2_arm    || BR2_armeb    || BR2_aarch64 || \
-                  BR2_i386   || BR2_mips     || BR2_mipsel  || \
-                  BR2_mips64 || BR2_mips64el || BR2_powerpc || \
-                  BR2_sh     || BR2_sh64     || BR2_sparc   || \
-                  BR2_x86_64 || BR2_microblaze || BR2_powerpc64
+       depends on BR2_arm        || BR2_armeb    || BR2_aarch64    || \
+                  BR2_aarch64_be || BR2_i386     || BR2_mips       || \
+                  BR2_mipsel     || BR2_mips64   || BR2_mips64el   || \
+                  BR2_powerpc    || BR2_sh       || BR2_sh64       || \
+                  BR2_sparc      || BR2_x86_64   || BR2_microblaze || \
+                  BR2_powerpc64
        depends on BR2_USE_MMU
        depends on !BR2_STATIC_LIBS
        depends on BR2_DEPRECATED_SINCE_2015_08
@@ -61,12 +62,12 @@ config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
 
 config BR2_TOOLCHAIN_BUILDROOT_GLIBC
        bool "glibc"
-       depends on BR2_arm         || BR2_armeb    || BR2_aarch64 || \
-                  BR2_i386        || BR2_mips     || BR2_mipsel  || \
-                  BR2_mips64      || BR2_mips64el || BR2_powerpc || \
-                  BR2_powerpc64   || BR2_powerpc64le || BR2_sh   || \
-                  BR2_sh64        || BR2_sparc    || BR2_x86_64  || \
-                  BR2_microblaze  || BR2_nios2
+       depends on BR2_arm         || BR2_armeb      || BR2_aarch64 || \
+                  BR2_aarch64_be  || BR2_i386       || BR2_mips    || \
+                  BR2_mipsel      || BR2_mips64     || BR2_mips64el|| \
+                  BR2_powerpc     || BR2_powerpc64  || BR2_powerpc64le || \
+                  BR2_sh          || BR2_sh64       || BR2_sparc   || \
+                  BR2_x86_64      || BR2_microblaze || BR2_nios2
        depends on BR2_USE_MMU
        depends on !BR2_STATIC_LIBS
        depends on !BR2_powerpc_SPE