[U-Boot] imx6 devices failing to build with 2016.05

Peter Robinson pbrobinson at gmail.com
Wed Apr 27 18:41:01 CEST 2016


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 at 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 at gmail.com>
>     Signed-off-by: Sandor Yu <sandor.yu at nxp.com>
>     Cc: Anatolij Gustschin <agust at denx.de>
>     Cc: Stefano Babic <sbabic at denx.de>
>     Cc: Fabio Estevam <fabio.estevam at 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
> =====================================================================


More information about the U-Boot mailing list