summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-28 21:14:28 (GMT)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2017-08-25 22:38:39 (GMT)
commit90340c87e5eed344f6f947661ff170c8369635db (patch)
tree014630dff1072fbc2d9cf54ae76dbdd4aa25d4ca /arch
parent90ae53ce1ae665a1b43ecf5ccafc339839392427 (diff)
downloadu-boot-90340c87e5eed344f6f947661ff170c8369635db.tar.xz
arch/sh: allow building in big-endian mode
The SuperH architecture allows to be run in either little or big endian mode. Some SuperH SoCs get the little vs. big endian decision through mode pins sampled at reset, so if big endian has been choosen by HW designers, it cannot be easily changed. Therefore, it makes sense to allow building U-Boot for SuperH in big endian mode. To allow this, the only change needed is to adjust the OUTPUT_FORMAT() in the linker script. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/cpu/u-boot.lds5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sh/cpu/u-boot.lds b/arch/sh/cpu/u-boot.lds
index 7fc91bc..bd4fde9 100644
--- a/arch/sh/cpu/u-boot.lds
+++ b/arch/sh/cpu/u-boot.lds
@@ -9,7 +9,12 @@
#include "config.h"
+#ifdef CONFIG_SYS_BIG_ENDIAN
+OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-sh-linux")
+#else
OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
+#endif
+
OUTPUT_ARCH(sh)
MEMORY