2008-08-18 05:26:44     Booting U-boot with U-boot

Document created by Aaronwu Employee on Sep 18, 2013
Version 1Show Document
  • View in full screen mode

2008-08-18 05:26:44     Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60563   

 

Hi All. I have the following problem, maybe someone had something similar or can help with debugging it. So far I have a binary .ldr compiled for my SRV1 blackfin board written into flash. It boots perfectly and I get u-boot prompt on UART0. I have compiled my own version of U-boot (no code changes to begin with) using the latest toolchain 2008R1.5 and am trying to upload/run it using the already installed version. So I use "loadb" to upload the image and then "go 0x01000000", after that I see Autoboot message of my currently installed U-boot and a line saying "Loading .text @ 0x01fc0000 (63852 bytes)" and it stays like this forever. Any idea what may be wrong? Or at least any suggestion on how to debug the problem? Previous build was 2007R1 based, but I was not able to reproduce the working version.

QuoteReplyEditDelete

 

 

2008-08-18 14:34:01     Re: Booting U-boot with U-boot

Robin Getz (UNITED STATES)

Message: 60589   

 

Veider:

 

try with icache off & dcache off. might also be better to load lower in memory (like 0x1000)

 

-Robin

QuoteReplyEditDelete

 

 

2008-08-18 15:28:15     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60594   

 

Robin, thank you for reply. loading with icache and dcache off results in hand just after "Starting application at ...". The same happens if we keep those two options off and load to lower memory, if we just load to lower memory we have the first variant with "Loading .text @ 0x01fc0000 (64388 bytes)". There is an opinion that this issue may be toolchain related since 2006 toolchain seems to create binaries that are normally loaded.. Are there any specific options that should be taken into account?

QuoteReplyEditDelete

 

 

2008-08-18 15:48:48     Re: Booting U-boot with U-boot

Robin Getz (UNITED STATES)

Message: 60595   

 

Veider:

 

Are you doing a "go" or "boote"? boote is unlikely to work (at least I have never tried). (and you should never get a "Loading .text" with go).

 

-Robin

QuoteReplyEditDelete

 

 

2008-08-18 16:01:48     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60596   

 

Em.. I am using "go" and getting "load text ..." message in case of a working one I get "freeing bss etc. messages. This is a failed run:

 

## Total Size      = 0x00060952 = 395602 Bytes

## Start Addr      = 0x01000000

srv1> go 0x01000000

 

## Starting application at 0x01000000 ...

U-Boot 1.1.6-svn (ADI-2007R1-pre) (Aug 31 2007 - 12:41:06)

 

CPU:   ADSP BF537 Rev.: 0.2

Board: ADI BF537 stamp board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 442 MHz, Core: 442 MHz, System: 88 MHz

SDRAM: 32 MB

FLASH:   4 MB

In:    serial

Out:   serial

Err:   serial

Net:    ADI BF537 EMAC

I2C:   ready

Hit any key to stop autoboot:  0

*** ERROR: `ethaddr' not set

Loading .text @ 0x01fc0000 (64388 bytes)

 

<and hanging here forever>

In another varian I get:

 

## Starting application at 0x01000000 ...

U-Boot 1.1.6-svn (ADI-2007R1-pre) (Aug 31 2007 - 12:41:06)

 

CPU:   ADSP BF537 Rev.: 0.2

Board: ADI BF537 stamp board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 442 MHz, Core: 442 MHz, System: 88 MHz

SDRAM: 32 MB

FLASH:   4 MB

In:    serial

Out:   serial

Err:   serial

Net:    ADI BF537 EMAC

I2C:   ready

Hit any key to stop autoboot:  0

*** ERROR: `ethaddr' not set

Loading .text @ 0x01fc0000 (84596 bytes)

Loading .rodata @ 0x01fd4a74 (21876 bytes)

Loading .data @ 0x01fd9fe8 (3276 bytes)

Loading .u_boot_cmd @ 0x01fdacb4 (1368 bytes)

Clearing .bss @ 0x01fdb20c (23812 bytes)

 

 

 

QuoteReplyEditDelete

 

 

2008-08-18 20:05:54     Re: Booting U-boot with U-boot

Mike Frysinger (UNITED STATES)

Message: 60604   

 

well, your u-boot is attempting to run the bootcmd ... what it attempts to do is out of our hands: that is up to your configuration

 

what file exactly are you loading ?  the LDR ?

QuoteReplyEditDelete

 

 

2008-08-19 03:02:09     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60631   

 

kermit/u-boot.bin: ELF 32-bit LSB executable, Analog Devices Blackfin, version 1 (SYSV), statically linked, not stripped

QuoteReplyEditDelete

 

 

2008-08-19 04:27:44     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60634   

 

When booting a .LDR file via UART boot it just hangs without any output

QuoteReplyEditDelete

 

 

2008-08-19 09:25:20     Re: Booting U-boot with U-boot

Robin Getz (UNITED STATES)

Message: 60641   

 

Veirder:

 

What Mike means - is that the "go 0x1000000" is working - your U-Boot which is in memory location 0x1000000 properly boots. That U-Boot has a bootcmd which tells it to boot something else. (does it count down to zero, or do this automatically? Can you press any key to interrupt ?) If you compiled this from source - you need to change the bootcmd in your source.

 

-Robin

QuoteReplyEditDelete

 

 

2008-08-19 15:41:52     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60670   

 

Yes I can interrupt the count down with hitting enter for example, instead of booting U-boot I also tried bare metal firmware and that is loading correctly, my guess is that it still has to do something with compilation/toolchain, though I can't really understand what is wrong.

QuoteReplyEditDelete

 

 

2008-08-19 15:53:34     Re: Booting U-boot with U-boot

Mike Frysinger (UNITED STATES)

Message: 60673   

 

so what's the question exactly ?  you've flashed u-boot into your board and you've loaded another copy of u-boot into external memory and are able to properly execute it.

QuoteReplyEditDelete

 

 

2008-08-19 16:53:10     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60679   

 

Not like that. I can't compile a new version, but only use previously compiled ones. When I compile a new version of U-boot it hangs. There are two possible scenarios:

 

1) using go - hangs after "Loading text @"

 

2) loading .LDR file via UART boot - hangs just in boot process not sending anything to UART

QuoteReplyEditDelete

 

 

2008-08-20 11:11:11     Re: Booting U-boot with U-boot

Robin Getz (UNITED STATES)

Message: 60766   

 

Veider:

 

Like I said before - if you are getting the "Loading text @" that is because __your__ U-Boot is running a script __you__ compiled into it - just change the bootcmd, and you will be fine.

 

-Robin

QuoteReplyEditDelete

 

 

2008-08-20 12:08:31     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60770   

 

Hmm.. So my U-boot, compiled from u-boot-1.1.6-2008R1.5.tar.bz2 source is reporting the following version:

 

U-Boot 1.1.6-svn (ADI-2007R1-pre) (Aug 31 2007 - 12:41:06)

 

Is it really mine? Sorry if I am asking stupid questions, but if elf is ok, then why .LDR is causing blackfin to hang?

 

Sorry again.

QuoteReplyEditDelete

 

 

2008-08-20 22:29:55     Re: Booting U-boot with U-boot

Robin Getz (UNITED STATES)

Message: 60782   

 

Veider:

 

what is in the file localversion-adi in your source?

 

-Robin

 

 

 

QuoteReplyEditDelete

 

 

2008-08-21 03:47:37     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60790   

 

[veider@darkzone-mobile u-boot-1.1.6-2008R1.5]$ cat localversion-adi

(ADI-2008R1.5)

 

QuoteReplyEditDelete

 

 

2008-08-21 09:31:43     Re: Booting U-boot with U-boot

Robin Getz (UNITED STATES)

Message: 60837   

 

Veider:

 

Then that is what should print out...

 

Is the normal boot message (from power on) the same " U-Boot 1.1.6-svn (ADI-2007R1-pre) (Aug 31 2007 - 12:41:06)"?

 

-Robin

QuoteReplyEditDelete

 

 

2008-08-21 12:22:48     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60852   

 

yes it is the same

QuoteReplyEditDelete

 

 

2008-08-24 21:43:14     Re: Booting U-boot with U-boot

Robin Getz (UNITED STATES)

Message: 60963   

 

Veider:

 

Sorry for the misunderstanding - as far as I know - you should just be able to turn caches off (both i and d), tftp 0x1000 u-boot.bin; go 0x1000 - and things have worked for me.

 

Although I don't have a SRV to test on.

 

-Robin

QuoteReplyEditDelete

 

 

2008-08-25 02:48:08     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 60971   

 

Robin:

 

Thanks again for replying. I played a bit with svn version of u-boot and here is what I came up with (assuming that i have a working U-boot already flashed):

 

1) "loadb" 'bare metal' firmware (ELF) and "go" to it - I see banner of the old uboot, then these "Load text" messages, then firmware loads and works

 

2) "loadb" ELF of u-boot compiled with bf537-srv1_config - I again see the banner of old uboot, then first "Load text @" message and everything hangs

 

3) "loadb" ELF of u-boot compiled with bf537-stamp_config - again old u-boot banner, then a set of "Loading text" messages like in case (1) and then again OLD u-boot banner

 

So why in case 3 I see old banner? Can it be that new u-boot is using static data allocated and used by previous version?

 

Is there any way to modify/update startup code so that it would be more easily traced, or for case 2 is it possible to find out what makes the whole thing hang?

QuoteReplyEditDelete

 

 

2008-08-25 13:17:44     Re: Booting U-boot with U-boot

Mike Frysinger (UNITED STATES)

Message: 61036   

 

if you want to debug things, you should review the debugging document:

http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:debugging

QuoteReplyEditDelete

 

 

2008-08-26 23:00:46     Re: Booting U-boot with U-boot

Mike Frysinger (UNITED STATES)

Message: 61142   

 

i just tested 2008R1.5 for the bf537-srv1 board and it worked fine once i fixed the malloc region.  the default was too small for the eeprom/spi code to work.

 

i was also able to boot the u-boot.bin from the older version of u-boot -- just make sure to turn caches off with dcache/icache off.

 

the known working SPI boot LDR can be found on our release page.

QuoteReplyEditDelete

 

 

2008-08-27 15:50:21     Re: Booting U-boot with U-boot

Veider _ (RUSSIAN FEDERATION)

Message: 61187   

 

Mike:

 

 

 

Thank you for you answer, I was able to compile and load u-boot successfuly both UART and SPI versions

Attachments

    Outcomes