Bug 9057

Summary: u-boot on Edison BSP fails due to "binutils: Upgrade to 2.26"
Product: [Runtime] General Runtime Reporter: Jussi Laako <jussi.laako>
Component: General RuntimeAssignee: Saul Wold <sgw>
Status: RESOLVED FIXED QA Contact: Francisco Pedraza <francisco.j.pedraza.gonzalez>
Severity: critical    
Priority: Medium+ CC: alexandru.c.georgescu, disabled.steve.sakoman, raj.khem, randy.macleod, ulf.hofemeier
Version: unspecified   
Target Milestone: 2.1 M3   
Hardware: Other   
OS: x86   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Jussi Laako 2016-02-04 12:58:43 UTC
Recent commit to upgrade binutils to version 2.26 makes u-boot on Intel Edison BSP to be miscompiled and thus causing boot failure.

Reverting commit id 86ade2cc2553c942d9526c5323a11ae151653505 fixes the problem.

May have side effects on other platforms too...
Comment 1 Saul Wold 2016-02-04 16:32:28 UTC
Can you provide more details on what it means to be "miscompiled"?  Can you narrow down what part of u-boot is being miscompiled?
Comment 2 Steve Sakoman 2016-02-04 16:53:21 UTC
You might try building v2015.10 u-boot.

There is a recipe for it in the jethro branch of the bap:

http://sandbox.sakoman.com/git/?p=meta-edison-bsp.git;a=tree;f=recipes-bsp/u-boot;h=f28ac38ee4b89970801e534b880de890d1fab65c;hb=refs/heads/jethro
Comment 3 Jussi Laako 2016-02-05 08:41:27 UTC
(In reply to comment #1)
> Can you provide more details on what it means to be "miscompiled"?

That u-boot doesn't work as expected. It gets stuck right after printing out it's version string and amount of RAM.

> Can you
> narrow down what part of u-boot is being miscompiled?

Without hardware debugger it is quite hard to see where it gets stuck.
Comment 4 Jussi Laako 2016-02-05 13:33:45 UTC
(In reply to comment #2)
> You might try building v2015.10 u-boot.
> 
> There is a recipe for it in the jethro branch of the bap:
> 
> http://sandbox.sakoman.com/git/?p=meta-edison-bsp.git;a=tree;f=recipes-bsp/u-
> boot;h=f28ac38ee4b89970801e534b880de890d1fab65c;hb=refs/heads/jethro

Result didn't change much:

******************************
PSH KERNEL VERSION: b0182b2b
                WR: 20104000
******************************

SCU IPC: 0x800000d0  0xfffce92c

PSH miaHOB version: TNG.B0.VVBD.0000000c

microkernel built 11:24:08 Feb  5 2015

******* PSH loader *******
PCM page cache size = 192 KB 
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size)          = 0x00080000

*** Ready to receive application ***


U-Boot 2015.10 (Feb 05 2016 - 14:48:25 +0200)
                                             
CPU: x86_64, vendor Intel, device 406a8h
       Watchdog enabled                 
DRAM:  980.6 MiB       
No relocation data
resetting ...
Comment 5 Jussi Laako 2016-02-05 13:42:06 UTC
Two last lines are the difference to the earlier 2014 version.
Comment 6 Jussi Laako 2016-02-05 15:02:27 UTC
Verified that the newer u-boot also starts working by reverting the binutils upgrade.
Comment 7 Saul Wold 2016-02-10 18:10:55 UTC
This could be related to the upstream binutils issue: https://sourceware.org/bugzilla/show_bug.cgi?id=19538
Comment 8 Saul Wold 2016-02-11 21:34:16 UTC
Filed a new upstream bug: https://sourceware.org/bugzilla/show_bug.cgi?id=19616 

And HJ responded with a patch in that bug that fixes the problem.  It is based 
on the HEAD of the 2.26 branch and there will be a 2.26.1 release coming soon, 
not sure the exact date.

Marking this wait for upstream until that release comes.
Comment 9 Khem Raj 2016-02-15 17:09:06 UTC
this should be fixed by

http://lists.openembedded.org/pipermail/openembedded-core/2016-February/117529.html

once it lands in master.
Comment 10 Saul Wold 2016-02-16 16:06:06 UTC
Thanks to Khem!

Binutils is updated to include this patch in master now.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=138778501367d3cd0036fc31afbbedce0016f478