[U-Boot] Need help to get u-boot running on the taskit stamp9g20

Markus Hubig mhubig at imko.de
Fri Jul 20 16:26:55 CEST 2012


On Fri, Jul 20, 2012 at 03:08:51PM +0200, Markus Hubig wrote:
> On Wed, Jul 18, 2012 at 03:21:00PM +0200, Markus Hubig wrote:
> > Hmm OK I disabled the watchdog and enabled debugging and now this
> > is what I get at the first boot after flashing:
> > 
> > | RomBOOT
> > | 
> > | 
> > | U-Boot 2012.04.01-00003-gab465ef-dirty (Jul 18 2012 - 15:08:22)
> > | 
> > | U-Boot code: 23F00000 -> 23F30130  BSS: -> 23F71E28
> > | CPU: AT91SAM9G20
> > | Crystal frequency:   18.432 MHz
> > | CPU clock        :  396.288 MHz
> > | Master clock     :  132.096 MHz
> > | Starting dram_init!
> > | dram_init finished!
> > | monitor len: 00071E28
> > | ramsize: 04000000
> > | Top of RAM usable for U-Boot at: 24000000
> > | Reserving 455k for U-Boot at: 23f8e000
> > | Reserving 640k for malloc() at: 23eee000
> > | Reserving 36 Bytes for Board Info at: 23eedfdc
> > | Reserving 144 Bytes for Global Data at: 23eedf4c
> > | New Stack Pointer is: 23eedf40
> > | RAM Configuration:
> > | Bank #0: 20000000 64 MiB
> > | relocation Offset is: 0008e000
> > | WARNING: Caches not enabled
> > | monitor flash len: 00035750
> > | Starting board_init!
> > | Starting stamp9G20_nand_hw_init!
> > | stamp9G20_nand_hw_init finished!
> > | Starting stamp9G20_macb_hw_init!
> > | stamp9G20_macb_hw_init finished!
> > | board_init finished!
> > | Now running in RAM - U-Boot at: 23f8e000
> > 
> > The red LED is on and I can't input anything.
> 
> OK now I managed to plug a JTAG Adapter with OpenOCD to the
> PortuxG20. But what now? How can I find out where I stuck?

Hmm ok .. JTAG & GDB is kind of a future wappon for me, don't know
how to handle. But using the old'n'good "trace code" debugging, I
managed to find out where my u-boot stops. It's in

arch/arm/lib/board.c:
=====================

| debug("malloc stuff start\n");
| /* The Malloc area is immediately below the monitor copy in DRAM */
| malloc_start = dest_addr - TOTAL_MALLOC_LEN;
| mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN);
| debug("malloc stuff finished\n");

It never reaches the second debug output. Digin a bit deeper I found in

common/dlmalloc.c
=================

| void mem_malloc_init(ulong start, ulong size)
| {
| 	mem_malloc_start = start;
| 	mem_malloc_end = start + size;
| 	mem_malloc_brk = start;
|       debug("bevor memset");
| 	memset((void *)mem_malloc_start, 0, size);
| 	debug("after memset\n");
| }

here it also never reaches the second debug output.

And the only setting I found in my board support code (stamp9g20.h)
that is obviously realated to this "malloc-thing" is:

| #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE \
|                                              + 128*1024, 0x1000)
| #define CONFIG_SYS_GBL_DATA_SIZE	128
| #define CONFIG_STACKSIZE	        (32*1024)

but this values are all copied from the original (and once working)
patch from taskit ...

Any thoughts?

Cheers, Markus


More information about the U-Boot mailing list