xref: /OK3568_Linux_fs/buildroot/board/ci20/patches/uboot/0001-mips-Remove-default-endiannes.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom b3a1e97498e7987073775d49a703932c20f2df1d Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Ezequiel Garcia <ezequiel@collabora.com>
3*4882a593SmuzhiyunDate: Mon, 12 Nov 2018 14:04:46 -0300
4*4882a593SmuzhiyunSubject: [PATCH] mips: Remove default endiannes
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunCurrently, trying to build ci20_mmc fails on little-endian
7*4882a593Smuzhiyuntoolchains. The problem seems to be that some targets don't
8*4882a593Smuzhiyunhave CONFIG_SYS_LITTLE_ENDIAN properly set, and therefore
9*4882a593Smuzhiyunthe default -EB switch is selected.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunLet's get rid of the default switch entirely, and fix this problem.
12*4882a593SmuzhiyunWhile this may be a hack, it is a quick solution until
13*4882a593SmuzhiyunU-Boot gets CI20 proper support.
14*4882a593Smuzhiyun
15*4882a593Smuzhiyunmake ARCH=mips CROSS_COMPILE=mips-linux-gnu- ci20_mmc
16*4882a593SmuzhiyunConfiguring for ci20_mmc - Board: ci20, Options: SPL_MMC_SUPPORT,ENV_IS_IN_MMC
17*4882a593Smuzhiyunmake
18*4882a593Smuzhiyunmake[1]: Entering directory '/home/zeta/repos/u-boot-ci20'
19*4882a593SmuzhiyunGenerating include/autoconf.mk
20*4882a593SmuzhiyunGenerating include/autoconf.mk.dep
21*4882a593Smuzhiyunmips-linux-gnu-gcc: error: may not use both -EB and -EL
22*4882a593Smuzhiyunmips-linux-gnu-gcc: error: may not use both -EB and -EL
23*4882a593SmuzhiyunGenerating include/spl-autoconf.mk
24*4882a593Smuzhiyunmips-linux-gnu-gcc: error: may not use both -EB and -EL
25*4882a593SmuzhiyunGenerating include/tpl-autoconf.mk
26*4882a593Smuzhiyunmips-linux-gnu-gcc: error: may not use both -EB and -EL
27*4882a593Smuzhiyunmips-linux-gnu-gcc -DDO_DEPS_ONLY \
28*4882a593Smuzhiyun	-g  -Os   -ffunction-sections -fdata-sections -D__KERNEL__ -I/home/zeta/repos/u-boot-ci20/include -fno-builtin -ffreestanding -nostdinc -isystem /home/zeta/repos/buildroot/mips/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -EB -msoft-float -fpic -mabicalls -march=mips32 -mabi=32 -DCONFIG_32BIT -mno-branch-likely -Wall -Wstrict-prototypes       \
29*4882a593Smuzhiyun	-o lib/asm-offsets.s lib/asm-offsets.c -c -S
30*4882a593Smuzhiyunif [ -f arch/mips/cpu/xburst/jz4780/asm-offsets.c ];then \
31*4882a593Smuzhiyun	mips-linux-gnu-gcc -DDO_DEPS_ONLY \
32*4882a593Smuzhiyun	-g  -Os   -ffunction-sections -fdata-sections -D__KERNEL__ -I/home/zeta/repos/u-boot-ci20/include -fno-builtin -ffreestanding -nostdinc -isystem /home/zeta/repos/buildroot/mips/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -EB -msoft-float -fpic -mabicalls -march=mips32 -mabi=32 -DCONFIG_32BIT -mno-branch-likely -Wall -Wstrict-prototypes       \
33*4882a593Smuzhiyun		-o arch/mips/cpu/xburst/jz4780/asm-offsets.s arch/mips/cpu/xburst/jz4780/asm-offsets.c -c -S; \
34*4882a593Smuzhiyunelse \
35*4882a593Smuzhiyun	touch arch/mips/cpu/xburst/jz4780/asm-offsets.s; \
36*4882a593Smuzhiyunfi
37*4882a593Smuzhiyunmips-linux-gnu-gcc: error: may not use both -EB and -EL
38*4882a593Smuzhiyunmake[1]: *** [Makefile:747: lib/asm-offsets.s] Error 1
39*4882a593Smuzhiyunmake[1]: *** Waiting for unfinished jobs....
40*4882a593Smuzhiyunmake[1]: Leaving directory '/home/zeta/repos/u-boot-ci20'
41*4882a593Smuzhiyunmake: *** [.boards.depend:463: ci20_mmc] Error 2
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunSigned-off-by: Ezequiel Garcia <ezequiel@collabora.com>
44*4882a593Smuzhiyun---
45*4882a593Smuzhiyunhttps://github.com/MIPS/CI20_u-boot/pull/19
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun arch/mips/config.mk | 3 ---
48*4882a593Smuzhiyun 1 file changed, 3 deletions(-)
49*4882a593Smuzhiyun
50*4882a593Smuzhiyundiff --git a/arch/mips/config.mk b/arch/mips/config.mk
51*4882a593Smuzhiyunindex c89279025507..43560abbc0e1 100644
52*4882a593Smuzhiyun--- a/arch/mips/config.mk
53*4882a593Smuzhiyun+++ b/arch/mips/config.mk
54*4882a593Smuzhiyun@@ -20,9 +20,6 @@ ifdef CONFIG_SYS_BIG_ENDIAN
55*4882a593Smuzhiyun ENDIANNESS := -EB
56*4882a593Smuzhiyun endif
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun-# Default to EB if no endianess is configured
59*4882a593Smuzhiyun-ENDIANNESS ?= -EB
60*4882a593Smuzhiyun-
61*4882a593Smuzhiyun PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun #
64*4882a593Smuzhiyun--
65*4882a593Smuzhiyun2.19.1
66*4882a593Smuzhiyun
67