[U-Boot] Problems with latest U-boot on Mini2440

Gerhard Sittig gsi at denx.de
Thu Jan 9 13:30:59 CET 2014


On Thu, Jan 09, 2014 at 11:08 +0300, Peter Germer wrote:
> 
> Dear List,
> 
> I have been trying to get a working binary of latest U-boot from git
> repo (git://git.denx.de/u-boot.git) for my Mini2440 (Samsung S3C2440,
> ARM926T) for weeks, without any success.

First I thought "arm926" would translate into "armv5te", but then
I learned that there is "arm920t" which is "armv4t" (was misled
by former work on "arm926ejs").

So the armv4t toolchain appears to be the correct one for
S3C2440.

> I tried to use 3 different CodeBench toolchains and DENX ELDK for
> armv4t as well, but no joy so far. Compilation finishes successfully,
> but the resulting code does not print anything on the serial line.
> I have the original Supervivi in the NOR and updating the NAND
> bootloader from it in two different ways:
> 
> Tried to load the U-boot image to RAM and start it by jumping to the
> correct memory address, but I always get the followings on the serial
> console:
> 
>   argument 0 = 0x00000000
>   argument 1 = 0x00000000
>   argument 2 = 0x00000000
>   argument 3 = 0x00000000
> And nothing else.
> 
> If I try to download U-boot directly to the NAND and reset the board,
> nothing is displayed.

According to `git log` and `git show b77026225a31` ("ARM : Add
support for MINI2440 (s3c2440)." as of 2012-05-02) only boot from
NOR is supported.  Later commit 79a6fcf2573e (2013-06-15) fixed
GPIO register access, and commit 2108f4c4a302 (2013-10-04)
adjusted CONFIG_SYS_HZ.

Later I2C and USB got adjusted, but those changes should only
have an affect after a banner was shown (that's an assumption of
mine, I2C _may_ be involved in detecting the board before showing
a banner).  Correct clocks OTOH are a prerequisite for serial
communication.

You may want to check those exact revisions identified above
which changed "mini" related code, or their direct predecessors
in case a change broke a feature for you.  If one of those works
for you, you may 'git bisect' from there, to help diagnose what
needs to get improved or added to re-gain support for your board
in mainline U-Boot.

And check the `git log` output for more keywords than I did,
there may have been more commits of interest in the area of
serial communication that I might have missed.

> Both method works well with the image provided by the manufacturer's
> website, but I need to enable netconsole option on my board, which is
> not configured on their binary.
> 
> A fork is available which provides the source tree of their version
> (at git://repo.or.cz/u-boot-openmoko/mini2440.git), but it is version
> 1.3.2, and if I enable netconsole, it fails to compile. Without the
> netconsole settings this source compiles and runs fine on the board,
> which I believe confirms that my toolchain is fine.
> 
> I tried to disable optimization of the compiler (-O0) as suggested on
> U-boot FAQ, but also did not help with any of the compilers.
> 
> Do you have any experience with this board, or can you suggest me how
> to locate the issue? Unfortunately I don't have a JTAG debugger, which
> might make debugging a bit harder.

I understand that you want to keep the current bootloader in NOR,
which means that lack of support to boot from NAND only leaves
you with boot from RAM, which the software may not support either
(it's not as trivial as it may sound, and requires explicit
support).  So when the software only supports booting from NOR,
and you don't have the software in NOR, this may be a reason why
it doesn't work for you.

In the absence of a JTAG _debugger_, can you somehow get a quick
or cheap JTAG _programmer_?  There are several of them which you
can build yourself, or get for some EUR 50,- if you can live with
USB attached tools (FTDI based).  But keep away from the parport
"wigglers", and pick a model that adjusts its pin levels to the
target voltage.  This way you can do more involved experiments,
and still won't lose your currently working although limited
status.  For "stupid" JTAG adaptors, the difference between
programming and debugging only lies in PC side software, and for
"old" CPUs like ARM9 you may get debugging for free with
OpenSource PC software.  It's certainly worth looking into
getting a JTAG adaptor ...


virtually yours
Gerhard Sittig
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


More information about the U-Boot mailing list