All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] imx6 devices failing to build with 2016.05
@ 2016-04-27 10:15 Peter Robinson
  2016-04-27 15:50 ` Stefano Babic
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Robinson @ 2016-04-27 10:15 UTC (permalink / raw)
  To: u-boot

Hi All,

I didn't look closely when it happened with rc1 because I saw a pull
req from Stefano shortly afterwards and I decided to try again after
that landed. With rc3 I'm still seeing the same issue.

Basically all the i.MX6 devices
(cm_fx6,mx6cuboxi,novena,riotboard,udoo,wandboard,warp) we currently
build for Fedora are failing to build. It looks very similar to some
64 bit math issues [1] [2] a search gives me although from the linker
command I'm failing to see what code is at fault so any assistance in
debugging this would be great. I've checked it failed on < gcc6 too
and 2016.03 builds so it appears a regression in 05rcX.

The (for cuboxi example) basic error is:
  ld.bfd   -pie  --gc-sections -Bstatic -Ttext 0x17800000 -o u-boot -T
u-boot.lds arch/arm/cpu/armv7/start.o --start-group
arch/arm/cpu/built-in.o  arch/arm/cpu/armv7/built-in.o
arch/arm/imx-common/built-in.o  arch/arm/lib/built-in.o
board/solidrun/mx6cuboxi/built-in.o  cmd/built-in.o  common/built-in.o
 disk/built-in.o  drivers/built-in.o  drivers/dma/built-in.o
drivers/gpio/built-in.o  drivers/i2c/built-in.o
drivers/mmc/built-in.o  drivers/mtd/built-in.o
drivers/mtd/onenand/built-in.o  drivers/mtd/spi/built-in.o
drivers/net/built-in.o  drivers/net/phy/built-in.o
drivers/pci/built-in.o  drivers/power/built-in.o
drivers/power/battery/built-in.o  drivers/power/fuel_gauge/built-in.o
drivers/power/mfd/built-in.o  drivers/power/pmic/built-in.o
drivers/power/regulator/built-in.o  drivers/serial/built-in.o
drivers/spi/built-in.o  drivers/usb/common/built-in.o
drivers/usb/dwc3/built-in.o  drivers/usb/emul/built-in.o
drivers/usb/eth/built-in.o  drivers/usb/gadget/built-in.o
drivers/usb/gadget/udc/built-in.o  drivers/usb/host/built-in.o
drivers/usb/musb-new/built-in.o  drivers/usb/musb/built-in.o
drivers/usb/phy/built-in.o  drivers/usb/ulpi/built-in.o  fs/built-in.o
 lib/built-in.o  net/built-in.o  test/built-in.o  test/dm/built-in.o
--end-group arch/arm/lib/eabi_compat.o  -L
/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0 -lgcc -Map u-boot.map
ld.bfd: error: /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)
uses VFP register arguments, u-boot does not
ld.bfd: failed to merge target specific data of file
/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)

Full log@https://pbrobinson.fedorapeople.org/u-boot-mx6cuboxi-fail.txt

Peter

[1] http://u-boot.10912.n7.nabble.com/Cannot-compile-arm-u-boot-with-hardfloat-toolchain-td200647.html
[2] http://lists.denx.de/pipermail/u-boot/2015-June/216480.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] imx6 devices failing to build with 2016.05
  2016-04-27 10:15 [U-Boot] imx6 devices failing to build with 2016.05 Peter Robinson
@ 2016-04-27 15:50 ` Stefano Babic
  2016-04-27 16:28   ` Sergey Kubushyn
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stefano Babic @ 2016-04-27 15:50 UTC (permalink / raw)
  To: u-boot

Hi Peter,

On 27/04/2016 12:15, Peter Robinson wrote:
> Hi All,
> 
> I didn't look closely when it happened with rc1 because I saw a pull
> req from Stefano shortly afterwards and I decided to try again after
> that landed. With rc3 I'm still seeing the same issue.
> 
> Basically all the i.MX6 devices
> (cm_fx6,mx6cuboxi,novena,riotboard,udoo,wandboard,warp) we currently
> build for Fedora are failing to build. It looks very similar to some
> 64 bit math issues [1] [2] a search gives me although from the linker
> command I'm failing to see what code is at fault so any assistance in
> debugging this would be great. I've checked it failed on < gcc6 too
> and 2016.03 builds so it appears a regression in 05rcX.
> 
> The (for cuboxi example) basic error is:
>   ld.bfd   -pie  --gc-sections -Bstatic -Ttext 0x17800000 -o u-boot -T
> u-boot.lds arch/arm/cpu/armv7/start.o --start-group
> arch/arm/cpu/built-in.o  arch/arm/cpu/armv7/built-in.o
> arch/arm/imx-common/built-in.o  arch/arm/lib/built-in.o
> board/solidrun/mx6cuboxi/built-in.o  cmd/built-in.o  common/built-in.o
>  disk/built-in.o  drivers/built-in.o  drivers/dma/built-in.o
> drivers/gpio/built-in.o  drivers/i2c/built-in.o
> drivers/mmc/built-in.o  drivers/mtd/built-in.o
> drivers/mtd/onenand/built-in.o  drivers/mtd/spi/built-in.o
> drivers/net/built-in.o  drivers/net/phy/built-in.o
> drivers/pci/built-in.o  drivers/power/built-in.o
> drivers/power/battery/built-in.o  drivers/power/fuel_gauge/built-in.o
> drivers/power/mfd/built-in.o  drivers/power/pmic/built-in.o
> drivers/power/regulator/built-in.o  drivers/serial/built-in.o
> drivers/spi/built-in.o  drivers/usb/common/built-in.o
> drivers/usb/dwc3/built-in.o  drivers/usb/emul/built-in.o
> drivers/usb/eth/built-in.o  drivers/usb/gadget/built-in.o
> drivers/usb/gadget/udc/built-in.o  drivers/usb/host/built-in.o
> drivers/usb/musb-new/built-in.o  drivers/usb/musb/built-in.o
> drivers/usb/phy/built-in.o  drivers/usb/ulpi/built-in.o  fs/built-in.o
>  lib/built-in.o  net/built-in.o  test/built-in.o  test/dm/built-in.o
> --end-group arch/arm/lib/eabi_compat.o  -L
> /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0 -lgcc -Map u-boot.map
> ld.bfd: error: /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)
> uses VFP register arguments, u-boot does not
> ld.bfd: failed to merge target specific data of file
> /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)
> 
> Full log at https://pbrobinson.fedorapeople.org/u-boot-mx6cuboxi-fail.txt
> 

I can confirm this - I started bisect and I have found this one:

commit 3cb4f25cc702db17455583599d0940c81337a17a
Author: Peng Fan <van.freenix@gmail.com>
Date:   Wed Mar 9 16:07:21 2016 +0800

    video: ipu: avoid overflow issue

    Multiplication, as "clk->parent->rate * 16" may overflow. So use
    do_div to avoid such issue.

    Signed-off-by: Peng Fan <van.freenix@gmail.com>
    Signed-off-by: Sandor Yu <sandor.yu@nxp.com>
    Cc: Anatolij Gustschin <agust@denx.de>
    Cc: Stefano Babic <sbabic@denx.de>
    Cc: Fabio Estevam <fabio.estevam@nxp.com>

:040000 040000 9672cb921a1051b5357931e8835884e2cccf8ec6
3cbbeea448780bb4855f5458dd98d017239b729a M	drivers


Checking the patch, I have found:

clk->rate = (u64)(clk->parent->rate * 16) / div;


This seems the cause for the failing build.

This confirms an issue. IMHO we can replace it with:

clk->rate = (u64)lldiv(clk->parent->rate * 16, div);

Peng, what do you mind ?

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] imx6 devices failing to build with 2016.05
  2016-04-27 15:50 ` Stefano Babic
@ 2016-04-27 16:28   ` Sergey Kubushyn
  2016-04-27 17:29     ` Tom Rini
  2016-04-27 16:41   ` Peter Robinson
  2016-04-27 18:06   ` Tom Rini
  2 siblings, 1 reply; 6+ messages in thread
From: Sergey Kubushyn @ 2016-04-27 16:28 UTC (permalink / raw)
  To: u-boot

On Wed, 27 Apr 2016, Stefano Babic wrote:

Guys, it looks like it is already time to finally get that series of ARM lib
patches in. This will occur again and again until it is done.

Face the reality -- not everybody uses a special softfloat toolchain just
for building U-Boot. And it is simply pathetic to expect this when there is
well proven solution which is in Linux kernel since the dawn of times.

Get those patches in please.

> Hi Peter,
>
> On 27/04/2016 12:15, Peter Robinson wrote:
>> Hi All,
>>
>> I didn't look closely when it happened with rc1 because I saw a pull
>> req from Stefano shortly afterwards and I decided to try again after
>> that landed. With rc3 I'm still seeing the same issue.
>>
>> Basically all the i.MX6 devices
>> (cm_fx6,mx6cuboxi,novena,riotboard,udoo,wandboard,warp) we currently
>> build for Fedora are failing to build. It looks very similar to some
>> 64 bit math issues [1] [2] a search gives me although from the linker
>> command I'm failing to see what code is at fault so any assistance in
>> debugging this would be great. I've checked it failed on < gcc6 too
>> and 2016.03 builds so it appears a regression in 05rcX.
>>
>> The (for cuboxi example) basic error is:
>>   ld.bfd   -pie  --gc-sections -Bstatic -Ttext 0x17800000 -o u-boot -T
>> u-boot.lds arch/arm/cpu/armv7/start.o --start-group
>> arch/arm/cpu/built-in.o  arch/arm/cpu/armv7/built-in.o
>> arch/arm/imx-common/built-in.o  arch/arm/lib/built-in.o
>> board/solidrun/mx6cuboxi/built-in.o  cmd/built-in.o  common/built-in.o
>>  disk/built-in.o  drivers/built-in.o  drivers/dma/built-in.o
>> drivers/gpio/built-in.o  drivers/i2c/built-in.o
>> drivers/mmc/built-in.o  drivers/mtd/built-in.o
>> drivers/mtd/onenand/built-in.o  drivers/mtd/spi/built-in.o
>> drivers/net/built-in.o  drivers/net/phy/built-in.o
>> drivers/pci/built-in.o  drivers/power/built-in.o
>> drivers/power/battery/built-in.o  drivers/power/fuel_gauge/built-in.o
>> drivers/power/mfd/built-in.o  drivers/power/pmic/built-in.o
>> drivers/power/regulator/built-in.o  drivers/serial/built-in.o
>> drivers/spi/built-in.o  drivers/usb/common/built-in.o
>> drivers/usb/dwc3/built-in.o  drivers/usb/emul/built-in.o
>> drivers/usb/eth/built-in.o  drivers/usb/gadget/built-in.o
>> drivers/usb/gadget/udc/built-in.o  drivers/usb/host/built-in.o
>> drivers/usb/musb-new/built-in.o  drivers/usb/musb/built-in.o
>> drivers/usb/phy/built-in.o  drivers/usb/ulpi/built-in.o  fs/built-in.o
>>  lib/built-in.o  net/built-in.o  test/built-in.o  test/dm/built-in.o
>> --end-group arch/arm/lib/eabi_compat.o  -L
>> /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0 -lgcc -Map u-boot.map
>> ld.bfd: error: /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)
>> uses VFP register arguments, u-boot does not
>> ld.bfd: failed to merge target specific data of file
>> /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)
>>
>> Full log at https://pbrobinson.fedorapeople.org/u-boot-mx6cuboxi-fail.txt
>>
>
> I can confirm this - I started bisect and I have found this one:
>
> commit 3cb4f25cc702db17455583599d0940c81337a17a
> Author: Peng Fan <van.freenix@gmail.com>
> Date:   Wed Mar 9 16:07:21 2016 +0800
>
>    video: ipu: avoid overflow issue
>
>    Multiplication, as "clk->parent->rate * 16" may overflow. So use
>    do_div to avoid such issue.
>
>    Signed-off-by: Peng Fan <van.freenix@gmail.com>
>    Signed-off-by: Sandor Yu <sandor.yu@nxp.com>
>    Cc: Anatolij Gustschin <agust@denx.de>
>    Cc: Stefano Babic <sbabic@denx.de>
>    Cc: Fabio Estevam <fabio.estevam@nxp.com>
>
> :040000 040000 9672cb921a1051b5357931e8835884e2cccf8ec6
> 3cbbeea448780bb4855f5458dd98d017239b729a M	drivers
>
>
> Checking the patch, I have found:
>
> clk->rate = (u64)(clk->parent->rate * 16) / div;
>
>
> This seems the cause for the failing build.
>
> This confirms an issue. IMHO we can replace it with:
>
> clk->rate = (u64)lldiv(clk->parent->rate * 16, div);
>
> Peng, what do you mind ?
>
> Best regards,
> Stefano Babic
>
> -- 
> =====================================================================
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
> =====================================================================
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

---
******************************************************************
*  KSI at home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] imx6 devices failing to build with 2016.05
  2016-04-27 15:50 ` Stefano Babic
  2016-04-27 16:28   ` Sergey Kubushyn
@ 2016-04-27 16:41   ` Peter Robinson
  2016-04-27 18:06   ` Tom Rini
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Robinson @ 2016-04-27 16:41 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

>> I didn't look closely when it happened with rc1 because I saw a pull
>> req from Stefano shortly afterwards and I decided to try again after
>> that landed. With rc3 I'm still seeing the same issue.
>>
>> Basically all the i.MX6 devices
>> (cm_fx6,mx6cuboxi,novena,riotboard,udoo,wandboard,warp) we currently
>> build for Fedora are failing to build. It looks very similar to some
>> 64 bit math issues [1] [2] a search gives me although from the linker
>> command I'm failing to see what code is at fault so any assistance in
>> debugging this would be great. I've checked it failed on < gcc6 too
>> and 2016.03 builds so it appears a regression in 05rcX.
>>
>> The (for cuboxi example) basic error is:
>>   ld.bfd   -pie  --gc-sections -Bstatic -Ttext 0x17800000 -o u-boot -T
>> u-boot.lds arch/arm/cpu/armv7/start.o --start-group
>> arch/arm/cpu/built-in.o  arch/arm/cpu/armv7/built-in.o
>> arch/arm/imx-common/built-in.o  arch/arm/lib/built-in.o
>> board/solidrun/mx6cuboxi/built-in.o  cmd/built-in.o  common/built-in.o
>>  disk/built-in.o  drivers/built-in.o  drivers/dma/built-in.o
>> drivers/gpio/built-in.o  drivers/i2c/built-in.o
>> drivers/mmc/built-in.o  drivers/mtd/built-in.o
>> drivers/mtd/onenand/built-in.o  drivers/mtd/spi/built-in.o
>> drivers/net/built-in.o  drivers/net/phy/built-in.o
>> drivers/pci/built-in.o  drivers/power/built-in.o
>> drivers/power/battery/built-in.o  drivers/power/fuel_gauge/built-in.o
>> drivers/power/mfd/built-in.o  drivers/power/pmic/built-in.o
>> drivers/power/regulator/built-in.o  drivers/serial/built-in.o
>> drivers/spi/built-in.o  drivers/usb/common/built-in.o
>> drivers/usb/dwc3/built-in.o  drivers/usb/emul/built-in.o
>> drivers/usb/eth/built-in.o  drivers/usb/gadget/built-in.o
>> drivers/usb/gadget/udc/built-in.o  drivers/usb/host/built-in.o
>> drivers/usb/musb-new/built-in.o  drivers/usb/musb/built-in.o
>> drivers/usb/phy/built-in.o  drivers/usb/ulpi/built-in.o  fs/built-in.o
>>  lib/built-in.o  net/built-in.o  test/built-in.o  test/dm/built-in.o
>> --end-group arch/arm/lib/eabi_compat.o  -L
>> /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0 -lgcc -Map u-boot.map
>> ld.bfd: error: /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)
>> uses VFP register arguments, u-boot does not
>> ld.bfd: failed to merge target specific data of file
>> /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)
>>
>> Full log at https://pbrobinson.fedorapeople.org/u-boot-mx6cuboxi-fail.txt
>>
>
> I can confirm this - I started bisect and I have found this one:

I can confirm reverting that allows them to build again. Will test
further once the build completes.

Peter

> commit 3cb4f25cc702db17455583599d0940c81337a17a
> Author: Peng Fan <van.freenix@gmail.com>
> Date:   Wed Mar 9 16:07:21 2016 +0800
>
>     video: ipu: avoid overflow issue
>
>     Multiplication, as "clk->parent->rate * 16" may overflow. So use
>     do_div to avoid such issue.
>
>     Signed-off-by: Peng Fan <van.freenix@gmail.com>
>     Signed-off-by: Sandor Yu <sandor.yu@nxp.com>
>     Cc: Anatolij Gustschin <agust@denx.de>
>     Cc: Stefano Babic <sbabic@denx.de>
>     Cc: Fabio Estevam <fabio.estevam@nxp.com>
>
> :040000 040000 9672cb921a1051b5357931e8835884e2cccf8ec6
> 3cbbeea448780bb4855f5458dd98d017239b729a M      drivers
>
>
> Checking the patch, I have found:
>
> clk->rate = (u64)(clk->parent->rate * 16) / div;
>
>
> This seems the cause for the failing build.
>
> This confirms an issue. IMHO we can replace it with:
>
> clk->rate = (u64)lldiv(clk->parent->rate * 16, div);
>
> Peng, what do you mind ?
>
> Best regards,
> Stefano Babic
>
> --
> =====================================================================
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
> =====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] imx6 devices failing to build with 2016.05
  2016-04-27 16:28   ` Sergey Kubushyn
@ 2016-04-27 17:29     ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-04-27 17:29 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 27, 2016 at 09:28:51AM -0700, Sergey Kubushyn wrote:

> Guys, it looks like it is already time to finally get that series of ARM lib
> patches in. This will occur again and again until it is done.
> 
> Face the reality -- not everybody uses a special softfloat toolchain just
> for building U-Boot. And it is simply pathetic to expect this when there is
> well proven solution which is in Linux kernel since the dawn of times.
> 
> Get those patches in please.

So, here's the problem, and partially why I didn't bring in Marek's last
series.  Even for just ARM it's not enough today and some combinations
of THUMB1 or ARMv8 targets were then starting to fail to build.  My hope
is that Marek can find the time to fix those up for v2016.07.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160427/177183b6/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] imx6 devices failing to build with 2016.05
  2016-04-27 15:50 ` Stefano Babic
  2016-04-27 16:28   ` Sergey Kubushyn
  2016-04-27 16:41   ` Peter Robinson
@ 2016-04-27 18:06   ` Tom Rini
  2 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-04-27 18:06 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 27, 2016 at 05:50:35PM +0200, Stefano Babic wrote:
> Hi Peter,
> 
> On 27/04/2016 12:15, Peter Robinson wrote:
> > Hi All,
> > 
> > I didn't look closely when it happened with rc1 because I saw a pull
> > req from Stefano shortly afterwards and I decided to try again after
> > that landed. With rc3 I'm still seeing the same issue.
> > 
> > Basically all the i.MX6 devices
> > (cm_fx6,mx6cuboxi,novena,riotboard,udoo,wandboard,warp) we currently
> > build for Fedora are failing to build. It looks very similar to some
> > 64 bit math issues [1] [2] a search gives me although from the linker
> > command I'm failing to see what code is at fault so any assistance in
> > debugging this would be great. I've checked it failed on < gcc6 too
> > and 2016.03 builds so it appears a regression in 05rcX.
> > 
> > The (for cuboxi example) basic error is:
> >   ld.bfd   -pie  --gc-sections -Bstatic -Ttext 0x17800000 -o u-boot -T
> > u-boot.lds arch/arm/cpu/armv7/start.o --start-group
> > arch/arm/cpu/built-in.o  arch/arm/cpu/armv7/built-in.o
> > arch/arm/imx-common/built-in.o  arch/arm/lib/built-in.o
> > board/solidrun/mx6cuboxi/built-in.o  cmd/built-in.o  common/built-in.o
> >  disk/built-in.o  drivers/built-in.o  drivers/dma/built-in.o
> > drivers/gpio/built-in.o  drivers/i2c/built-in.o
> > drivers/mmc/built-in.o  drivers/mtd/built-in.o
> > drivers/mtd/onenand/built-in.o  drivers/mtd/spi/built-in.o
> > drivers/net/built-in.o  drivers/net/phy/built-in.o
> > drivers/pci/built-in.o  drivers/power/built-in.o
> > drivers/power/battery/built-in.o  drivers/power/fuel_gauge/built-in.o
> > drivers/power/mfd/built-in.o  drivers/power/pmic/built-in.o
> > drivers/power/regulator/built-in.o  drivers/serial/built-in.o
> > drivers/spi/built-in.o  drivers/usb/common/built-in.o
> > drivers/usb/dwc3/built-in.o  drivers/usb/emul/built-in.o
> > drivers/usb/eth/built-in.o  drivers/usb/gadget/built-in.o
> > drivers/usb/gadget/udc/built-in.o  drivers/usb/host/built-in.o
> > drivers/usb/musb-new/built-in.o  drivers/usb/musb/built-in.o
> > drivers/usb/phy/built-in.o  drivers/usb/ulpi/built-in.o  fs/built-in.o
> >  lib/built-in.o  net/built-in.o  test/built-in.o  test/dm/built-in.o
> > --end-group arch/arm/lib/eabi_compat.o  -L
> > /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0 -lgcc -Map u-boot.map
> > ld.bfd: error: /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)
> > uses VFP register arguments, u-boot does not
> > ld.bfd: failed to merge target specific data of file
> > /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/6.0.0/libgcc.a(_udivmoddi4.o)
> > 
> > Full log at https://pbrobinson.fedorapeople.org/u-boot-mx6cuboxi-fail.txt
> > 
> 
> I can confirm this - I started bisect and I have found this one:
> 
> commit 3cb4f25cc702db17455583599d0940c81337a17a
> Author: Peng Fan <van.freenix@gmail.com>
> Date:   Wed Mar 9 16:07:21 2016 +0800
> 
>     video: ipu: avoid overflow issue
> 
>     Multiplication, as "clk->parent->rate * 16" may overflow. So use
>     do_div to avoid such issue.
> 
>     Signed-off-by: Peng Fan <van.freenix@gmail.com>
>     Signed-off-by: Sandor Yu <sandor.yu@nxp.com>
>     Cc: Anatolij Gustschin <agust@denx.de>
>     Cc: Stefano Babic <sbabic@denx.de>
>     Cc: Fabio Estevam <fabio.estevam@nxp.com>
> 
> :040000 040000 9672cb921a1051b5357931e8835884e2cccf8ec6
> 3cbbeea448780bb4855f5458dd98d017239b729a M	drivers
> 
> 
> Checking the patch, I have found:
> 
> clk->rate = (u64)(clk->parent->rate * 16) / div;
> 
> 
> This seems the cause for the failing build.
> 
> This confirms an issue. IMHO we can replace it with:
> 
> clk->rate = (u64)lldiv(clk->parent->rate * 16, div);
> 
> Peng, what do you mind ?

I think other than the cast being in the wrong place for lldiv (rate is
ulong, but we want to treat clk->parent->rate * 16 as possibly u64) this
is right.  Can you send out a formal patch?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160427/0c05e9cc/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-27 18:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-27 10:15 [U-Boot] imx6 devices failing to build with 2016.05 Peter Robinson
2016-04-27 15:50 ` Stefano Babic
2016-04-27 16:28   ` Sergey Kubushyn
2016-04-27 17:29     ` Tom Rini
2016-04-27 16:41   ` Peter Robinson
2016-04-27 18:06   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.