[U-Boot] printf("%d") breaks u-boot 2015.01+

Pavel Machek
2015-04-08T14:06:34Z

On Wed 2015-04-08 09:49:53, Tom Rini wrote:
> On Wed, Apr 08, 2015 at 02:09:57PM +0200, Pavel Machek wrote:
> > Hi!
> >
> > > >>maybe this helps? I just stepped into same problem on an am335x,
> > > >>but had not yet time to look deeper in it ...
> > > >
> > > >I did not try the cleanup_before_linux(), but "dcache off" should have
> > > >same effect, right?
> > >
> > > Hmm.. not exactly... cleanup_before_linux() does also disable the mmu.
> >
> > Seems like I found the reason. CONFIG_THUMB_BUILD was set, and
> > that causes problems in put_dec_trunc() function (and elsewhere).
> >
> > commit 1602a502985d42bafb58cc6862b469ac03a7d634
> > Author: Pavel <pavel@ucw.cz>
> > Date: Wed Apr 8 14:08:18 2015 +0200
> >
> > Disable thumb build; it breaks put_dec_trunc() function on toolchain
> > from eldk-5.6 and eldk-5.4, and some other place, too.
> >
> > Signed-off-by: Pavel Machek <pavel@denx.de>
> >
> > diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
> > index 6d93472..6608d7d 100644
> > --- a/include/configs/socfpga_common.h
> > +++ b/include/configs/socfpga_common.h
> > @@ -11,7 +11,7 @@
> > /* Virtual target or real hardware */
> > #undef CONFIG_SOCFPGA_VIRTUAL_TARGET
> >
> > -#define CONFIG_SYS_THUMB_BUILD
> > +#undef CONFIG_SYS_THUMB_BUILD
> >
> > #define CONFIG_SOCFPGA
>
> OK, this is kind of scary. What is wrong with those toolchains OR how
> we're telling them to build things as no, we should be able to use thumb
> mode just fine and need to for size reasons in various cases.

Well.. it is scary, as put_dec_trunc() is very straightforward
function. It works in 2014.10, even with thumb on.

> If this
> is a generic problem then for example, omap4_panda + ELDK 5.4/5.6 just
> shouldn't work either and we _must_ use thumb there for at least SPL.

I don't know enough about thumb in u-boot. And yes, I'd like people to
confirm if u-boot works for them on socfpga...

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html