[U-Boot] [PATCH 0/2] fix little endian build

From: Xiangfu Liu xiangfu@openmobilefree.net
those two patches fix the little endian build. done by Shinya Kuribayashi.
Makefile | 1 + arch/mips/config.mk | 27 +++++++++++++++++++++++++-- arch/mips/cpu/config.mk | 8 -------- board/dbau1x00/u-boot.lds | 2 +- board/gth2/u-boot.lds | 2 +- board/incaip/u-boot.lds | 2 +- board/pb1x00/u-boot.lds | 2 +- board/purple/u-boot.lds | 2 +- board/qemu-mips/u-boot.lds | 2 +- examples/standalone/mips.lds | 2 +- include/configs/pb1x00.h | 2 ++ 11 files changed, 35 insertions(+), 17 deletions(-)

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Skuribay, Woflgang
can we apply those patch to MIPS-branch first??
On 08/09/2010 11:13 PM, xiangfu@openmobilefree.net wrote:
From: Xiangfu Liu xiangfu@openmobilefree.net
those two patches fix the little endian build. done by Shinya Kuribayashi.
Makefile | 1 + arch/mips/config.mk | 27 +++++++++++++++++++++++++-- arch/mips/cpu/config.mk | 8 -------- board/dbau1x00/u-boot.lds | 2 +- board/gth2/u-boot.lds | 2 +- board/incaip/u-boot.lds | 2 +- board/pb1x00/u-boot.lds | 2 +- board/purple/u-boot.lds | 2 +- board/qemu-mips/u-boot.lds | 2 +- examples/standalone/mips.lds | 2 +- include/configs/pb1x00.h | 2 ++ 11 files changed, 35 insertions(+), 17 deletions(-)
- -- Best Regards Xiangfu Liu http://www.openmobilefree.net

On 8/30/10 6:53 PM, Xiangfu Liu wrote:
can we apply those patch to MIPS-branch first??
[PATCH 1/2] update the MIPS u-boot.lds
I'll push 1/2 to u-boot-mips and request pull later.
[PATCH 2/2] change the way of build little endian board
but this 2/2 looks problematic.
As said in the previous mail the patch is tentative and won't work with ELDK, and as fas as I could see nothing has been changed since my version. Let me make sure, have you confirmed it builds with ELDK?

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/30/2010 09:23 PM, Shinya Kuribayashi wrote:
On 8/30/10 6:53 PM, Xiangfu Liu wrote:
can we apply those patch to MIPS-branch first??
[PATCH 1/2] update the MIPS u-boot.lds
I'll push 1/2 to u-boot-mips and request pull later.
[PATCH 2/2] change the way of build little endian board
but this 2/2 looks problematic.
As said in the previous mail the patch is tentative and won't work with ELDK, and as fas as I could see nothing has been changed since my version. Let me make sure, have you confirmed it builds with ELDK?
Hi Shinya
yes, I think it not break the ELDK build.
I have test with BUILD_DIR=../u-boot-build \ MAKEALL_LOGDIR=../u-boot-log \ ./MAKEALL mips_el mips
all boards compile fine.
- -- Best Regards Xiangfu Liu http://www.openmobilefree.net

On 8/30/10 10:43 PM, Xiangfu Liu wrote:
[PATCH 2/2] change the way of build little endian board
but this 2/2 looks problematic.
As said in the previous mail the patch is tentative and won't work with ELDK, and as fas as I could see nothing has been changed since my version. Let me make sure, have you confirmed it builds with ELDK?
Hi Shinya
yes, I think it not break the ELDK build.
I have test with BUILD_DIR=../u-boot-build \ MAKEALL_LOGDIR=../u-boot-log \ ./MAKEALL mips_el mips
all boards compile fine.
What about the endianness of generated u-boot ELF image then?
$ CROSS_COMPILE=mips_4KCle- ./MAKEALL dbau1550_el_config $ file u-boot
And could you also provide the version info, please?
$ mips_4KCle-gcc --version

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/30/2010 11:12 PM, Shinya Kuribayashi wrote:
What about the endianness of generated u-boot ELF image then?
$ CROSS_COMPILE=mips_4KCle- ./MAKEALL dbau1550_el_config $ file u-boot
Hi Shinya here is the info: xiangfu@openmobilefree:~/u-boot/u-boot.git$ CROSS_COMPILE=~/u-boot/mips/usr/bin/mips_4KCle- ./MAKEALL dbau1550_el Configuring for dbau1x00 board... board.c: In function 'board_init_r': board.c:331: warning: assignment from incompatible pointer type text data bss dec hex filename 121863 4976 18924 145763 23963 ./u-boot
- --------------------- SUMMARY ---------------------------- Boards compiled: 1 Boards with warnings or errors: 1 ( dbau1550_el ) - ---------------------------------------------------------- xiangfu@openmobilefree:~/u-boot/u-boot.git$ file u-boot u-boot: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, not stripped
And could you also provide the version info, please?
$ mips_4KCle-gcc --version
xiangfu@openmobilefree:~/u-boot/u-boot.git$ ~/u-boot/mips/usr/bin/mips_4KCle-gcc --version mips_4KCle-gcc (GCC) 4.0.0 (DENX ELDK 4.1 4.0.0) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- -- Best Regards Xiangfu Liu http://www.openmobilefree.net

On 8/31/2010 10:00 AM, Xiangfu Liu wrote:
xiangfu@openmobilefree:~/u-boot/u-boot.git$ file u-boot u-boot: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, not stripped
My bad sorry. Could you provide output from readelf?
$ readelf u-boot

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/31/2010 09:29 AM, Shinya Kuribayashi wrote:
On 8/31/2010 10:00 AM, Xiangfu Liu wrote:
xiangfu@openmobilefree:~/u-boot/u-boot.git$ file u-boot u-boot: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, not stripped
My bad sorry. Could you provide output from readelf?
$ readelf u-boot
xiangfu@openmobilefree:~/u-boot/u-boot.git$ readelf -h u-boot ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: MIPS R3000 Version: 0x1 Entry point address: 0xbfc00000 Start of program headers: 52 (bytes into file) Start of section headers: 374000 (bytes into file) Flags: 0x50001007, noreorder, pic, cpic, o32, mips32 Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 2 Size of section headers: 40 (bytes) Number of section headers: 26 Section header string table index: 23
- -- Best Regards Xiangfu Liu http://www.openmobilefree.net

On 8/31/2010 10:00 AM, Xiangfu Liu wrote:
xiangfu@openmobilefree:~/u-boot/u-boot.git$ file u-boot u-boot: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, not stripped
Ah, it's LSB, got it.
As said in the previous mail the patch is tentative and won't work with ELDK, and as fas as I could see nothing has been changed since my version.
So I'm overlooking something, will have to think about it.

On 8/31/2010 10:36 AM, Shinya Kuribayashi wrote:
As said in the previous mail the patch is tentative and won't work with ELDK, and as fas as I could see nothing has been changed since my version.
So I'm overlooking something, will have to think about it.
Oh, I remember now. The aim of the patch is to make it possible to generate elf images in both Big- and Little-endian, using only either mips_4KC- or mips_4KCle- toolchain:
# CROSS_COMPILE Target Expected endianness ------------------------------------------------------------------ 1 mips_4KC- dbau1550_config Big-Endian 2 mips_4KCle- dbau1550_config Big-Endian 3 mips_4KC- dbau1550_el_config Little-Endian 4 mips_4KCle- dbau1550_el_config Little-Endian
And option 2) and 3) may not work when using ELDK.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 09/01/2010 08:48 AM, Shinya Kuribayashi wrote:
On 8/31/2010 10:36 AM, Shinya Kuribayashi wrote:
As said in the previous mail the patch is tentative and won't work with ELDK, and as fas as I could see nothing has been changed since my version.
So I'm overlooking something, will have to think about it.
Oh, I remember now. The aim of the patch is to make it possible to generate elf images in both Big- and Little-endian, using only either mips_4KC- or mips_4KCle- toolchain:
# CROSS_COMPILE Target Expected endianness
1 mips_4KC- dbau1550_config Big-Endian 2 mips_4KCle- dbau1550_config Big-Endian 3 mips_4KC- dbau1550_el_config Little-Endian 4 mips_4KCle- dbau1550_el_config Little-Endian
And option 2) and 3) may not work when using ELDK.
Hi Shinya
I will try to look into this issue. thanks for the info.
- -- Best Regards Xiangfu Liu http://www.openmobilefree.net
participants (4)
-
Shinya Kuribayashi
-
Shinya Kuribayashi
-
Xiangfu Liu
-
xiangfuï¼ openmobilefree.net