mbox

[U-Boot] Please pull u-boot-sunxi master

Message ID 55784FBA.5050100@redhat.com
State Accepted
Delegated to: Tom Rini
Headers show

Pull-request

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

Message

Hans de Goede June 10, 2015, 2:54 p.m. UTC
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

Comments

Tom Rini June 10, 2015, 2:56 p.m. UTC | #1
On Wed, Jun 10, 2015 at 04:54:50PM +0200, Hans de Goede wrote:

> 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)
> 

Applied to u-boot/master, thanks!
Simon Glass June 11, 2015, 2:49 a.m. UTC | #2
Hi,

On 10 June 2015 at 08:56, Tom Rini <trini@konsulko.com> wrote:
> On Wed, Jun 10, 2015 at 04:54:50PM +0200, Hans de Goede wrote:
>
>> 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)
>>
>
> 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
Hans de Goede June 11, 2015, 7:41 a.m. UTC | #3
Hi,

On 11-06-15 04:49, Simon Glass wrote:
> Hi,
>
> On 10 June 2015 at 08:56, Tom Rini <trini@konsulko.com> wrote:
>> On Wed, Jun 10, 2015 at 04:54:50PM +0200, Hans de Goede wrote:
>>
>>> 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)
>>>
>>
>> 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.

> 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....

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
Tom Rini June 11, 2015, 12:56 p.m. UTC | #4
On Thu, Jun 11, 2015 at 09:41:29AM +0200, Hans de Goede wrote:
> Hi,
> 
> On 11-06-15 04:49, Simon Glass wrote:
> >Hi,
> >
> >On 10 June 2015 at 08:56, Tom Rini <trini@konsulko.com> wrote:
> >>On Wed, Jun 10, 2015 at 04:54:50PM +0200, Hans de Goede wrote:
> >>
> >>>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)
> >>>
> >>
> >>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.
> 
> >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....
> 
> 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.
Hans de Goede June 11, 2015, 1:44 p.m. UTC | #5
Hi,

On 11-06-15 14:56, Tom Rini wrote:
> On Thu, Jun 11, 2015 at 09:41:29AM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 11-06-15 04:49, Simon Glass wrote:
>>> Hi,
>>>
>>> On 10 June 2015 at 08:56, Tom Rini <trini@konsulko.com> wrote:
>>>> On Wed, Jun 10, 2015 at 04:54:50PM +0200, Hans de Goede wrote:
>>>>
>>>>> 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)
>>>>>
>>>>
>>>> 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.
>>
>>> 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....
>>
>> 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
Tom Rini June 11, 2015, 3:08 p.m. UTC | #6
On Thu, Jun 11, 2015 at 03:44:10PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 11-06-15 14:56, Tom Rini wrote:
> >On Thu, Jun 11, 2015 at 09:41:29AM +0200, Hans de Goede wrote:
> >>Hi,
> >>
> >>On 11-06-15 04:49, Simon Glass wrote:
> >>>Hi,
> >>>
> >>>On 10 June 2015 at 08:56, Tom Rini <trini@konsulko.com> wrote:
> >>>>On Wed, Jun 10, 2015 at 04:54:50PM +0200, Hans de Goede wrote:
> >>>>
> >>>>>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)
> >>>>>
> >>>>
> >>>>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.
> >>
> >>>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....
> >>
> >>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).
> 

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).
Bernhard Nortmann June 11, 2015, 10:27 p.m. UTC | #7
(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
Tom Rini June 12, 2015, 12:48 a.m. UTC | #8
On Thu, Jun 11, 2015 at 11:08:44AM -0400, Tom Rini wrote:
> On Thu, Jun 11, 2015 at 03:44:10PM +0200, Hans de Goede wrote:
> > Hi,
> > 
> > On 11-06-15 14:56, Tom Rini wrote:
> > >On Thu, Jun 11, 2015 at 09:41:29AM +0200, Hans de Goede wrote:
> > >>Hi,
> > >>
> > >>On 11-06-15 04:49, Simon Glass wrote:
> > >>>Hi,
> > >>>
> > >>>On 10 June 2015 at 08:56, Tom Rini <trini@konsulko.com> wrote:
> > >>>>On Wed, Jun 10, 2015 at 04:54:50PM +0200, Hans de Goede wrote:
> > >>>>
> > >>>>>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)
> > >>>>>
> > >>>>
> > >>>>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.
> > >>
> > >>>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....
> > >>
> > >>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).
> > 
> 
> 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).

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.