Skip to contentSkip to conversation

Please pull u-boot-sunxi master

U-Boot Hans de Goede 4 participants 9 messages Jun 10, 2015 – Jun 12, 2015

lore
Share & tools
lore
#0 lore raw

Hi Tom,

Please pull u-boot-sunxi/master into master for 2 small bug-fixes:

The following changes since commit 3d0158ae18bef2ac89979f4c90419d3add436c71:

Prepare v2015.07-rc2 (2015-06-08 17:48:33 -0400)

are available in the git repository at:

http://git.denx.de/u-boot-sunxi.git master

for you to fetch changes up to 0751b138064db28f0866f0c2439afb8b3975180c:

sunxi: Enable CONFIG_SYS_64BIT_LBA when AHCI is used (2015-06-10 16:52:12 +0200)

----------------------------------------------------------------
Bernhard Nortmann (1):
sunxi: Enable CONFIG_SYS_64BIT_LBA when AHCI is used

Hans de Goede (1):
sunxi: Request macpwr gpio before using it

  arch/arm/cpu/armv7/sunxi/board.c | 1 +
  include/configs/sunxi-common.h   | 1 +
  2 files changed, 2 insertions(+)

Regards,

Hans

#1 lore raw
Quoted 8 lines · Hans de Goede

Hi Tom,

Please pull u-boot-sunxi/master into master for 2 small bug-fixes:

The following changes since commit 3d0158ae18bef2ac89979f4c90419d3add436c71:

Prepare v2015.07-rc2 (2015-06-08 17:48:33 -0400)

Quoted 8 lines

are available in the git repository at:

http://git.denx.de/u-boot-sunxi.git master

for you to fetch changes up to 0751b138064db28f0866f0c2439afb8b3975180c:

sunxi: Enable CONFIG_SYS_64BIT_LBA when AHCI is used (2015-06-10 16:52:12 +0200)

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150610/dd82ea60/attachment.sig>
#2 lore raw

Hi,

Quoted 12 lines · Tom Rini
Quoted 10 lines · Hans de Goede

Hi Tom,

Please pull u-boot-sunxi/master into master for 2 small bug-fixes:

The following changes since commit 3d0158ae18bef2ac89979f4c90419d3add436c71:

Prepare v2015.07-rc2 (2015-06-08 17:48:33 -0400)

are available in the git repository at:

Quoted 8 lines
Quoted 6 lines

http://git.denx.de/u-boot-sunxi.git master

for you to fetch changes up to 0751b138064db28f0866f0c2439afb8b3975180c:

sunxi: Enable CONFIG_SYS_64BIT_LBA when AHCI is used (2015-06-10 16:52:12 +0200)

Applied to u-boot/master, thanks!

I don't see this patch on the mailing list or I would reply there.

But for my toolchain I get errors:

crosfw -b Orangepi_mini -w
#

# configuration written to .config
#
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
make[1]: *** [u-boot] Error 1
make[1]: *** Waiting for unfinished jobs....

Regards,
Simon

#3 lore raw

Hi,

Quoted 17 lines · Simon Glass

Hi,

Quoted 14 lines · Tom Rini
Quoted 12 lines · Hans de Goede

Hi Tom,

Please pull u-boot-sunxi/master into master for 2 small bug-fixes:

The following changes since commit 3d0158ae18bef2ac89979f4c90419d3add436c71:

   Prepare v2015.07-rc2 (2015-06-08 17:48:33 -0400)

are available in the git repository at:

http://git.denx.de/u-boot-sunxi.git master

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

for you to fetch changes up to 0751b138064db28f0866f0c2439afb8b3975180c:

sunxi: Enable CONFIG_SYS_64BIT_LBA when AHCI is used (2015-06-10 16:52:12 +0200)

Applied to u-boot/master, thanks!

I don't see this patch on the mailing list or I would reply there.

Hmm, I asked the submitter to Cc the list when he suggested this patch on irc, I guess he only send it to me and I did not notice.

Quoted 18 lines

But for my toolchain I get errors:

crosfw -b Orangepi_mini -w
#

# configuration written to .config
#
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
Quoted 8 lines
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
make[1]: *** [u-boot] Error 1
make[1]: *** Waiting for unfinished jobs....

I'm not sure what todo about this, it works for me, and supporting disks larger then 2TB seems like a desirable feature in this time and age.

Regards,

Hans

#4 lore raw
Quoted 59 lines · Hans de Goede

Hi,

Quoted 17 lines · Simon Glass

Hi,

Quoted 14 lines · Tom Rini
Quoted 12 lines · Hans de Goede

Hi Tom,

Please pull u-boot-sunxi/master into master for 2 small bug-fixes:

The following changes since commit 3d0158ae18bef2ac89979f4c90419d3add436c71:

Prepare v2015.07-rc2 (2015-06-08 17:48:33 -0400)

are available in the git repository at:

http://git.denx.de/u-boot-sunxi.git master

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

for you to fetch changes up to 0751b138064db28f0866f0c2439afb8b3975180c:

sunxi: Enable CONFIG_SYS_64BIT_LBA when AHCI is used (2015-06-10 16:52:12 +0200)

Applied to u-boot/master, thanks!

I don't see this patch on the mailing list or I would reply there.

Hmm, I asked the submitter to Cc the list when he suggested this patch on irc, I guess he only send it to me and I did not notice.

Quoted 18 lines

But for my toolchain I get errors:

crosfw -b Orangepi_mini -w
#

# configuration written to .config
#
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
Quoted 8 lines
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
make[1]: *** [u-boot] Error 1
make[1]: *** Waiting for unfinished jobs....
Quoted 2 lines

I'm not sure what todo about this, it works for me, and supporting disks larger then 2TB seems like a desirable feature in this time and age.

Ug. Yes, but you have to use do_div and friends and we've got another case where something snuck past not using those helpers. I forget the right incantation to use on either nm or objdump to figure out just which function/file is doing it wrong.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150611/84387037/attachment.sig>
#5 lore raw

Hi,

Quoted 60 lines · Tom Rini
Quoted 59 lines · Hans de Goede

Hi,

Quoted 17 lines · Simon Glass

Hi,

Quoted 14 lines · Tom Rini
Quoted 12 lines · Hans de Goede

Hi Tom,

Please pull u-boot-sunxi/master into master for 2 small bug-fixes:

The following changes since commit 3d0158ae18bef2ac89979f4c90419d3add436c71:

   Prepare v2015.07-rc2 (2015-06-08 17:48:33 -0400)

are available in the git repository at:

http://git.denx.de/u-boot-sunxi.git master

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

for you to fetch changes up to 0751b138064db28f0866f0c2439afb8b3975180c:

sunxi: Enable CONFIG_SYS_64BIT_LBA when AHCI is used (2015-06-10 16:52:12 +0200)

Applied to u-boot/master, thanks!

I don't see this patch on the mailing list or I would reply there.

Hmm, I asked the submitter to Cc the list when he suggested this patch on irc, I guess he only send it to me and I did not notice.

Quoted 26 lines

But for my toolchain I get errors:

crosfw -b Orangepi_mini -w
#

# configuration written to .config
#
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
make[1]: *** [u-boot] Error 1
make[1]: *** Waiting for unfinished jobs....
Quoted 7 lines
Quoted 2 lines

I'm not sure what todo about this, it works for me, and supporting disks larger then 2TB seems like a desirable feature in this time and age.

Ug. Yes, but you have to use do_div and friends and we've got another case where something snuck past not using those helpers. I forget the right incantation to use on either nm or objdump to figure out just which function/file is doing it wrong.

Ok, so hopefully someone reading the list remembers and can provide us with a list of culprits. I can probably make some time to fix this even if the problem is not in sunxi code (all the commit does is enable CONFIG_SYS_64BIT_LBA which AFAIK does not directly influence any sunxi code).

So for now lets keep this in master and try to get it fixed, if it is not fixed in say 2 rc-s from now then we should probably revert the sunxi commit (and break large disks again).

Regards,

Hans

#6 lore raw
Quoted 71 lines · Hans de Goede

Hi,

Quoted 60 lines · Tom Rini
Quoted 59 lines · Hans de Goede

Hi,

Quoted 17 lines · Simon Glass

Hi,

Quoted 14 lines · Tom Rini
Quoted 12 lines · Hans de Goede

Hi Tom,

Please pull u-boot-sunxi/master into master for 2 small bug-fixes:

The following changes since commit 3d0158ae18bef2ac89979f4c90419d3add436c71:

Prepare v2015.07-rc2 (2015-06-08 17:48:33 -0400)

are available in the git repository at:

http://git.denx.de/u-boot-sunxi.git master

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

for you to fetch changes up to 0751b138064db28f0866f0c2439afb8b3975180c:

sunxi: Enable CONFIG_SYS_64BIT_LBA when AHCI is used (2015-06-10 16:52:12 +0200)

Applied to u-boot/master, thanks!

I don't see this patch on the mailing list or I would reply there.

Hmm, I asked the submitter to Cc the list when he suggested this patch on irc, I guess he only send it to me and I did not notice.

Quoted 26 lines

But for my toolchain I get errors:

crosfw -b Orangepi_mini -w
#

# configuration written to .config
#
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
make[1]: *** [u-boot] Error 1
make[1]: *** Waiting for unfinished jobs....
Quoted 7 lines
Quoted 2 lines

I'm not sure what todo about this, it works for me, and supporting disks larger then 2TB seems like a desirable feature in this time and age.

Ug. Yes, but you have to use do_div and friends and we've got another case where something snuck past not using those helpers. I forget the right incantation to use on either nm or objdump to figure out just which function/file is doing it wrong.

Quoted 9 lines

Ok, so hopefully someone reading the list remembers and can provide us with a list of culprits. I can probably make some time to fix this even if the problem is not in sunxi code (all the commit does is enable CONFIG_SYS_64BIT_LBA which AFAIK does not directly influence any sunxi code).

So for now lets keep this in master and try to get it fixed, if it is not fixed in say 2 rc-s from now then we should probably revert the sunxi commit (and break large disks again).

OK, so I dug out the magic again (since there's a few other boards that fail on different toolchain with the same type of problem but another place).
First:

$ arm-linux-gnueabihf-nm /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a | grep -A 4 _udivdi3.o
This will show you all of the functions provided there.
Second:
$ for F in `find output-dir -name *.o`;do arm-linux-gnueabihf-nm $F 2>&1
| grep -q THATSYMBOL && echo $F;done

This will show you what object files have the function in question. Third:
arm-linux-gnueabihf-objdump -d ONE/OBJ/FILE.o | $PAGER
And hunt around for what function(s) here are calling the incorrect math function.
Fourth: Examine the C in question until you spot the "bad" division, correct to use a helper from include/linux/math64.h (and yes we have some other helpers too that are home grown but I am in favor of using the kernel ones).

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150611/9c928190/attachment.sig>
#7 lore raw

(The post to the ML was here:
http://lists.denx.de/pipermail/u-boot/2015-June/216284.html)

I've been asking around a bit on the issue on IRC in #linux-sunxi and #u-boot (and originally contacted Hans on this). The user "Kasreyn" brought the subject up on #linux-sunxi, reporting that his Banana Pi (sun7i/A20) had trouble detecting the GPT partitioning of a 3TB SATA disk. Enabling CONFIG_SYS_64BIT_LBA solved that, but Kasreyn later confirmed that he experienced the same linking failure and had to use a softfloat toolchain to compile U-Boot (linaro bare metal - gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2).

As reported above, the U-Boot build fails when using an armhf toolchain:
http://pastebin.com/cwmyc2pE. The error messages involved indicate that changing lbaint_t to 64-bit introduces division functions (_divdi3 and _udivdi3) that the linker tries to satisfy from libgcc.a - which fails due to the incompatible ABI. For 32-bit _divsi3 and _udivsi3 seem to get satisfied by the corresponding assembler files in arch/arm/lib.

Unfortunately, in this case it's not a trival task to find and replace all the integer divisions that are affected by the change in lbaint_t size.

Regards, B. Nortmann

#8 lore raw
In reply to Tom Rini
Quoted 92 lines · Tom Rini
Quoted 71 lines · Hans de Goede

Hi,

Quoted 60 lines · Tom Rini
Quoted 59 lines · Hans de Goede

Hi,

Quoted 17 lines · Simon Glass

Hi,

Quoted 14 lines · Tom Rini
Quoted 12 lines · Hans de Goede

Hi Tom,

Please pull u-boot-sunxi/master into master for 2 small bug-fixes:

The following changes since commit 3d0158ae18bef2ac89979f4c90419d3add436c71:

Prepare v2015.07-rc2 (2015-06-08 17:48:33 -0400)

are available in the git repository at:

http://git.denx.de/u-boot-sunxi.git master

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

for you to fetch changes up to 0751b138064db28f0866f0c2439afb8b3975180c:

sunxi: Enable CONFIG_SYS_64BIT_LBA when AHCI is used (2015-06-10 16:52:12 +0200)

Applied to u-boot/master, thanks!

I don't see this patch on the mailing list or I would reply there.

Hmm, I asked the submitter to Cc the list when he suggested this patch on irc, I guess he only send it to me and I did not notice.

Quoted 26 lines

But for my toolchain I get errors:

crosfw -b Orangepi_mini -w
#

# configuration written to .config
#
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(bpabi.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_divdi3.o)
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
error: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
uses VFP register arguments, u-boot does not
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ld.bfd:
failed to merge target specific data of file
/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a(_udivdi3.o)
make[1]: *** [u-boot] Error 1
make[1]: *** Waiting for unfinished jobs....
Quoted 7 lines
Quoted 2 lines

I'm not sure what todo about this, it works for me, and supporting disks larger then 2TB seems like a desirable feature in this time and age.

Ug. Yes, but you have to use do_div and friends and we've got another case where something snuck past not using those helpers. I forget the right incantation to use on either nm or objdump to figure out just which function/file is doing it wrong.

Quoted 9 lines

Ok, so hopefully someone reading the list remembers and can provide us with a list of culprits. I can probably make some time to fix this even if the problem is not in sunxi code (all the commit does is enable CONFIG_SYS_64BIT_LBA which AFAIK does not directly influence any sunxi code).

So for now lets keep this in master and try to get it fixed, if it is not fixed in say 2 rc-s from now then we should probably revert the sunxi commit (and break large disks again).

OK, so I dug out the magic again (since there's a few other boards that fail on different toolchain with the same type of problem but another place).
First:

$ arm-linux-gnueabihf-nm /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/libgcc.a | grep -A 4 _udivdi3.o
This will show you all of the functions provided there.
Second:
$ for F in `find output-dir -name *.o`;do arm-linux-gnueabihf-nm $F 2>&1
| grep -q THATSYMBOL && echo $F;done
Quoted 9 lines

This will show you what object files have the function in question. Third:
arm-linux-gnueabihf-objdump -d ONE/OBJ/FILE.o | $PAGER
And hunt around for what function(s) here are calling the incorrect math function.
Fourth: Examine the C in question until you spot the "bad" division, correct to use a helper from include/linux/math64.h (and yes we have some other helpers too that are home grown but I am in favor of using the kernel ones).

OK, tracking down where is even easier than I recalled:

$ $PAGER temp/u-boot.map
...
/usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(_ashldi3.o)
                              drivers/mmc/built-in.o (__aeabi_llsl)
/usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(_aeabi_uldivmod.o)
                              drivers/mmc/built-in.o (__aeabi_uldivmod)
/usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(_dvmd_lnx.o)
                              /usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(_udivsi3.o) (__aeabi_idiv0)
/usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(bpabi.o)
                              /usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(_aeabi_uldivmod.o) (__gnu_uldivmod_helper)
/usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(_divdi3.o)
                              /usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(bpabi.o) (__divdi3)
/usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(_udivdi3.o)
                              /usr/lib/gcc/arm-linux-gnueabihf/4.7/libgcc.a(bpabi.o) (__udivdi3)

And patch coming shortly.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150611/41a569d0/attachment.sig>