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

Heiko Schocher hs at denx.de
Tue Apr 7 07:13:02 CEST 2015


Hello Pavel,

Am 06.04.2015 16:40, schrieb Pavel Machek:
> Hi!
>
> In u-boot 2015.04-rc, as soon as execution hits printf("%d"), it
> hangs. (Usually, that's after "DRAM: " message).
>
> Now, I have to admit I'm chainloading u-boot from
>
> U-Boot 2013.01.01 (Mar 25 2015 - 15:57:21)
>
> tftp 0x01000040 .../u-boot.bin
> Waiting for PHY auto negotiation to complete.. done
> ENET Speed is 100 Mbps - FULL duplex connection
> Using mii0 device
> TFTP from server 10.0.0.6; our IP address is 10.0.0.99
> ...
>   Bytes transferred = 325004 (4f58c hex)
> # go 0x01000040
>
> ...but that worked well for 2014.10, (and is nearly mandatory in my
> config).
>
> I'm using cross-compiler from eldk-5.6, but eldk-5.4 crosscompiler
> produces same behaviour, and both seem to work for 2014.10.
>
> Any ideas?

Do you have caches on?
Try to disable "dcache off" before "go ..." ...

or ...

diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index 8f2e070..01825e6 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -19,6 +19,7 @@ __attribute__((weak))
  unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
                                  char * const argv[])
  {
+       cleanup_before_linux();
         return entry (argc, argv);
  }


maybe this helps? I just stepped into same problem on an am335x,
but had not yet time to look deeper in it ...

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list