From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] imx6 devices failing to build with 2016.05
Date: Wed, 27 Apr 2016 14:06:57 -0400 [thread overview]
Message-ID: <20160427180657.GI29322@bill-the-cat> (raw)
In-Reply-To: <5720DFCB.2030302@denx.de>
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>
prev parent reply other threads:[~2016-04-27 18:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160427180657.GI29322@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.