public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
@ 2007-08-06  1:32 Robert S. Grimes
  2007-08-06 16:14 ` Aaron Sells
  0 siblings, 1 reply; 12+ messages in thread
From: Robert S. Grimes @ 2007-08-06  1:32 UTC (permalink / raw)
  To: u-boot

Hi,

I've successfully built, installed, and booted a recent (late July) 
u-boot configured for the Freescale M5329EVB - way cool!  I seem to be 
able to exercise all the commands, and they work great.  I've been able 
to download a test script in an image using mkimage, and execute it, so 
I think that is more or less working.  What I can't do is download and 
run a working uClinux image.

Here's what I've done:

On Linux host:

    $ mkimage -A m68k -O linux -T kernel -C none -a 40020000 -e 40020000 \
    -n "uClinux test" -d /tftpboot/image.bin test.kernel.img
    Image Name:   uClinux test
    Created:      Sun Aug  5 20:59:09 2007
    Image Type:   MC68000 Linux Kernel Image (uncompressed)
    Data Size:    3148804 Bytes = 3075.00 kB = 3.00 MB
    Load Address: 0x40020000
    Entry Point:  0x40020000

On target (in u-boot):

    U-Boot 1.2.0 (Jul 26 2007 - 22:20:01)

    CPU:   Freescale MCF5329 (Mask:54 Version:1)
           CPU CLK 240 Mhz BUS CLK 80 Mhz
    Board: Freescale FireEngine 5329 EVB
    DRAM:  16 MB
    FLASH:  2 MB
    In:    serial
    Out:   serial
    Err:   serial
    Net:   FEC0
    -> tftp 40020000 test.kernel.img
    Using FEC0 device
    TFTP from server 192.168.1.107; our IP address is 192.168.1.27
    Filename 'test.kernel.img'.
    Load address: 0x40020000
    Loading: TX timeout
    #####<snip>#####

    done
    Bytes transferred = 3148868 (300c44 hex)

But when I try to boot it, it fails:

    -> bootm 40020000
    ## Booting image at 40020000 ...
       Image Name:   uClinux test
       Created:      2007-08-06   0:59:09 UTC
       Image Type:   M68K Linux Kernel Image (uncompressed)
       Data Size:    3148804 Bytes =  3 MB
       Load Address: 40020000
       Entry Point:  40020000
       Verifying Checksum ... OK
       XIP Kernel Image ... OK

    Starting kernel ...



    *** Unexpected exception ***
    Vector Number: 4  Format: 04  Fault Status: 0

    PC: 40020006    SR: 00002700    SP: 40f2da10
    D0: 00000000    D1: 0000000a    D2: 40f2da90    D3: 40f77004
    D4: 40f77018    D5: 00000000    D6: 00000000    D7: 40f3df90
    A0: 40020000    A1: 40f69404    A2: 40f7b748    A3: 4002003c
    A4: 40f2dec0    A5: 40f77100    A6: 40f2da9c

    *** Please Reset Board! ***

I'm not sure where to turn now.  I know the uClinux image is okay, as I 
can download it to RAM (again, at 0x40020000) and run it (using "go 
0x40020000" command) using Freescale Dbug monitor.  So I also know the 
SDRAM (16 MB starting at 0x40000000) is okay.  I'm pretty sure the 
location is okay, as u-boot appears to set 0x40010000 as the beginning 
of "user" space.  Downloading over the network seems perfect (and 
fast!).  The image makes it to the target okay, as uboot recognizes it 
and the checksum passes.  One thing I'm not sure about is the vector 
table, which uClinux has configured for 0x40000000; is this okay?

I think I am missing something pretty fundamental, and am prepared to 
feel stupid, so please help!

Thanks!
-Bob

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-06  1:32 [U-Boot-Users] Can't boot uClinux image on mcf5329evb Robert S. Grimes
@ 2007-08-06 16:14 ` Aaron Sells
  2007-08-06 18:03   ` Robert S. Grimes
  0 siblings, 1 reply; 12+ messages in thread
From: Aaron Sells @ 2007-08-06 16:14 UTC (permalink / raw)
  To: u-boot

Hi Bob,

Robert S. Grimes wrote:
 >     U-Boot 1.2.0 (Jul 26 2007 - 22:20:01)
 >
 >     CPU:   Freescale MCF5329 (Mask:54 Version:1)
 >            CPU CLK 240 Mhz BUS CLK 80 Mhz
 >     Board: Freescale FireEngine 5329 EVB
 >     DRAM:  16 MB
 >     FLASH:  2 MB
 >     In:    serial
 >     Out:   serial
 >     Err:   serial
 >     Net:   FEC0
 >     -> tftp 40020000 test.kernel.img
<snip>
 >     -> bootm 40020000
 >     ## Booting image at 40020000 ...
 >        Image Name:   uClinux test
 >        Created:      2007-08-06   0:59:09 UTC
 >        Image Type:   M68K Linux Kernel Image (uncompressed)
 >        Data Size:    3148804 Bytes =  3 MB
 >        Load Address: 40020000
 >        Entry Point:  40020000

The fact that you're downloading to and executing from the same address 
location may be your problem.  Try tftping your uClinux image to 
0x41020000.

Regards,
Aaron

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-06 16:14 ` Aaron Sells
@ 2007-08-06 18:03   ` Robert S. Grimes
  2007-08-06 18:43     ` Wolfgang Denk
  0 siblings, 1 reply; 12+ messages in thread
From: Robert S. Grimes @ 2007-08-06 18:03 UTC (permalink / raw)
  To: u-boot

Aaron Sells wrote:
> The fact that you're downloading to and executing from the same 
> address location may be your problem.  Try tftping your uClinux image 
> to 0x41020000.
Okay, I'll try that tonight.

I am a bit confused, but I am quite new here; I've just now begun to try
booting a kernel.

My thinking was that the kernel was built to execute at 0x40020000.  So
I put it there, and then tried to run it.  Now I think I understand -
u-boot is trying to put it in the correct location first?  Is this true
even when the kernel is not compressed?  Seems likely to be the case -
hence, your suggestion.

Maybe I understand now - I'll let you know when I try it tonight .

Thanks for the pointer!
-Bob
>
> Regards,
> Aaron
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-06 18:03   ` Robert S. Grimes
@ 2007-08-06 18:43     ` Wolfgang Denk
  2007-08-06 18:56       ` Robert S. Grimes
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Denk @ 2007-08-06 18:43 UTC (permalink / raw)
  To: u-boot

In message <46B7626B.20202@alum.mit.edu> you wrote:
>
> My thinking was that the kernel was built to execute at 0x40020000.  So
> I put it there, and then tried to run it.  Now I think I understand -
> u-boot is trying to put it in the correct location first?  Is this true
> even when the kernel is not compressed?  Seems likely to be the case -
> hence, your suggestion.

Assume it works similar to this:

with compressed image:

	gunzip <download_address >load_address

with uncompressed image:

	cat <download_address >load_address


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The joys of love made her human and the  agonies  of  love  destroyed
her.
	-- Spock, "Requiem for Methuselah", stardate 5842.8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-06 18:43     ` Wolfgang Denk
@ 2007-08-06 18:56       ` Robert S. Grimes
  0 siblings, 0 replies; 12+ messages in thread
From: Robert S. Grimes @ 2007-08-06 18:56 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> Assume it works similar to this:
>
> with compressed image:
>
> 	gunzip <download_address >load_address
>
> with uncompressed image:
>
> 	cat <download_address >load_address
>   
Got it - I think!  ;-)

Thanks, guys!
> Best regards,
>
> Wolfgang Denk
>
>   

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
       [not found] <89AFDD7DFCD0A24FBDF71F44CB8F9646020B956D@zinexc.ZIN.NET>
@ 2007-08-07  2:53 ` Robert S. Grimes
  2007-08-07  3:17   ` Liew Tsi Chung-r5aahp
  2007-08-07 12:59   ` Aaron Sells
  0 siblings, 2 replies; 12+ messages in thread
From: Robert S. Grimes @ 2007-08-07  2:53 UTC (permalink / raw)
  To: u-boot

Aaron Sells wrote:
> I also just noticed that your u-boot image is compiled to recognize 16MB
> of SDRAM.  I know my M5329EVB came with a standard 32MB SDRAM, so you
> may want to fix that.  Otherwise, you will have to use an address of,
> say, 0x40C00000 to tftp your uClinux image to.
>   
I noticed that too.  To be honest, I have no real solid idea how much 
SDRAM I actually have; I do know it is _supposed_ to be 32 MB.  I'm 
trying to track down the actual amount, but in the meantime, I've been 
using just the 16 MB, and I did try 40800000 and 40c00000.  Here's what 
I get:

    -> bootm 40800000
    ## Booting image at 40800000 ...
       Image Name:   uClinux test
       Created:      2007-08-06   0:59:09 UTC
       Image Type:   M68K Linux Kernel Image (uncompressed)
       Data Size:    3148804 Bytes =  3 MB
       Load Address: 40020000
       Entry Point:  40020000
       Verifying Checksum ... OK
    OK

    Starting kernel ...

    Linux version 2.6.17.1 (root at adman) (gcc version 4.1.1) #39 Sun Aug
    5 20:52:57 7


    uClinux/COLDFIRE(m532x)
    COLDFIRE port done by Greg Ungerer, gerg at snapgear.com
    Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
    Built 1 zonelists
    Kernel command line:
    PID hash table entries: 128 (order: 7, 512 bytes)
    Console: colour dummy device 80x25
    Spurious interrupt 1
    Spurious interrupt 2
    Spurious interrupt 3
    Spurious interrupt 4
    Spurious interrupt 5
    Spurious interrupt 6
      . . .

The "Spurious interrupt N" message just fly by quite furiously!  So I'm 
back to wondering what the difference is between how Dbug initializes 
the hardware and how U-Boot does it.  My understanding is that U-Boot 
doesn't deal in interrupts, is that right?

Is this more of a m5329evb board port issue?  Have you seen this Tsi Chung?

Thanks, as always,
-Bob
> Regards,
> Aaron Sells
>
> -----Original Message-----
> From: Robert S. Grimes [mailto:rsg at alum.mit.edu] 
> Sent: Monday, August 06, 2007 12:47 PM
> To: Aaron Sells
> Subject: Re: Can't boot uClinux image on mcf5329evb
>
> Aaron Sells wrote:
>   
>> The fact that you're downloading to and executing from the same 
>> address location may be your problem.  Try tftping your uClinux image 
>> to 0x41020000.
>>     
> Okay, I'll try that tonight.
>
> I am a bit confused, but I am quite new here; I've just now begun to try
>
> booting a kernel.
>
> My thinking was that the kernel was built to execute at 0x40020000.  So 
> I put it there, and then tried to run it.  Now I think I understand - 
> u-boot is trying to put it in the correct location first?  Is this true 
> even when the kernel is not compressed?  Seems likely to be the case - 
> hence, your suggestion.
>
> Maybe I understand now - I'll let you know when I try it tonight .
>
> Thanks for the pointer!
> -Bob
>   
>> Regards,
>> Aaron
>>
>>     
>
>   

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-07  2:53 ` Robert S. Grimes
@ 2007-08-07  3:17   ` Liew Tsi Chung-r5aahp
  2007-08-07 12:59   ` Aaron Sells
  1 sibling, 0 replies; 12+ messages in thread
From: Liew Tsi Chung-r5aahp @ 2007-08-07  3:17 UTC (permalink / raw)
  To: u-boot

Robert,

	Dtimer 1 is the only module that uses interrupt in 5329. U-boot might still have Dtimer interrupt enable or not clear completely and pass it to kernel execution. In your linux kernel, the very first thing that it need to do is disabled and cleared all interrupts. I believe the spurious interrut is dtimer interrupt.

Regards,
TsiChung
 

-----Original Message-----
From: Robert S. Grimes [mailto:rsg at alum.mit.edu] 
Sent: Monday, August 06, 2007 9:53 PM
To: Aaron Sells; Das U-Boot Mailing List; Liew Tsi Chung-r5aahp
Subject: Re: Can't boot uClinux image on mcf5329evb

Aaron Sells wrote:
> I also just noticed that your u-boot image is compiled to recognize 
> 16MB of SDRAM.  I know my M5329EVB came with a standard 32MB SDRAM, so 
> you may want to fix that.  Otherwise, you will have to use an address 
> of, say, 0x40C00000 to tftp your uClinux image to.
>   
I noticed that too.  To be honest, I have no real solid idea how much SDRAM I actually have; I do know it is _supposed_ to be 32 MB.  I'm trying to track down the actual amount, but in the meantime, I've been using just the 16 MB, and I did try 40800000 and 40c00000.  Here's what I get:

    -> bootm 40800000
    ## Booting image at 40800000 ...
       Image Name:   uClinux test
       Created:      2007-08-06   0:59:09 UTC
       Image Type:   M68K Linux Kernel Image (uncompressed)
       Data Size:    3148804 Bytes =  3 MB
       Load Address: 40020000
       Entry Point:  40020000
       Verifying Checksum ... OK
    OK

    Starting kernel ...

    Linux version 2.6.17.1 (root at adman) (gcc version 4.1.1) #39 Sun Aug
    5 20:52:57 7


    uClinux/COLDFIRE(m532x)
    COLDFIRE port done by Greg Ungerer, gerg at snapgear.com
    Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
    Built 1 zonelists
    Kernel command line:
    PID hash table entries: 128 (order: 7, 512 bytes)
    Console: colour dummy device 80x25
    Spurious interrupt 1
    Spurious interrupt 2
    Spurious interrupt 3
    Spurious interrupt 4
    Spurious interrupt 5
    Spurious interrupt 6
      . . .

The "Spurious interrupt N" message just fly by quite furiously!  So I'm back to wondering what the difference is between how Dbug initializes the hardware and how U-Boot does it.  My understanding is that U-Boot doesn't deal in interrupts, is that right?

Is this more of a m5329evb board port issue?  Have you seen this Tsi Chung?

Thanks, as always,
-Bob
> Regards,
> Aaron Sells
>
> -----Original Message-----
> From: Robert S. Grimes [mailto:rsg at alum.mit.edu]
> Sent: Monday, August 06, 2007 12:47 PM
> To: Aaron Sells
> Subject: Re: Can't boot uClinux image on mcf5329evb
>
> Aaron Sells wrote:
>   
>> The fact that you're downloading to and executing from the same 
>> address location may be your problem.  Try tftping your uClinux image 
>> to 0x41020000.
>>     
> Okay, I'll try that tonight.
>
> I am a bit confused, but I am quite new here; I've just now begun to 
> try
>
> booting a kernel.
>
> My thinking was that the kernel was built to execute at 0x40020000.  
> So I put it there, and then tried to run it.  Now I think I understand 
> - u-boot is trying to put it in the correct location first?  Is this 
> true even when the kernel is not compressed?  Seems likely to be the 
> case - hence, your suggestion.
>
> Maybe I understand now - I'll let you know when I try it tonight .
>
> Thanks for the pointer!
> -Bob
>   
>> Regards,
>> Aaron
>>
>>     
>
>   

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-07  2:53 ` Robert S. Grimes
  2007-08-07  3:17   ` Liew Tsi Chung-r5aahp
@ 2007-08-07 12:59   ` Aaron Sells
  2007-08-07 13:11     ` Robert S. Grimes
                       ` (2 more replies)
  1 sibling, 3 replies; 12+ messages in thread
From: Aaron Sells @ 2007-08-07 12:59 UTC (permalink / raw)
  To: u-boot

Bob,

Robert S. Grimes wrote:
>     Spurious interrupt 1
>     Spurious interrupt 2
>     Spurious interrupt 3
>     Spurious interrupt 4
>     Spurious interrupt 5
>     Spurious interrupt 6
>       . . .

I commented out the following line of cpu/mcf532x/interrupts.c to get 
past this issue:

	intp->imrh0 &= ~CFG_TMRINTR_MASK;

Regards,
Aaron Sells

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-07 12:59   ` Aaron Sells
@ 2007-08-07 13:11     ` Robert S. Grimes
  2007-08-07 15:11     ` w.wegner at astro-kom.de
  2007-08-07 18:03     ` Liew Tsi Chung-r5aahp
  2 siblings, 0 replies; 12+ messages in thread
From: Robert S. Grimes @ 2007-08-07 13:11 UTC (permalink / raw)
  To: u-boot

Thanks, Aaron, I'll check it out tonight.

Aaron Sells wrote:
> Bob,
>
> Robert S. Grimes wrote:
>   
>>     Spurious interrupt 1
>>     Spurious interrupt 2
>>     Spurious interrupt 3
>>     Spurious interrupt 4
>>     Spurious interrupt 5
>>     Spurious interrupt 6
>>       . . .
>>     
>
> I commented out the following line of cpu/mcf532x/interrupts.c to get 
> past this issue:
>
> 	intp->imrh0 &= ~CFG_TMRINTR_MASK;
>
> Regards,
> Aaron Sells
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>
>   

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-07 12:59   ` Aaron Sells
  2007-08-07 13:11     ` Robert S. Grimes
@ 2007-08-07 15:11     ` w.wegner at astro-kom.de
  2007-08-07 15:32       ` w.wegner at astro-kom.de
  2007-08-07 18:03     ` Liew Tsi Chung-r5aahp
  2 siblings, 1 reply; 12+ messages in thread
From: w.wegner at astro-kom.de @ 2007-08-07 15:11 UTC (permalink / raw)
  To: u-boot

Hi Aaron,

On 7 Aug 2007 at 8:59, Aaron Sells wrote:
[...]
> I commented out the following line of cpu/mcf532x/interrupts.c to get 
> past this issue:
> 
> 	intp->imrh0 &= ~CFG_TMRINTR_MASK;
 
I had a similar problem (on MCF5373L). However, in my case there was no output at all after:
Starting kernel ...

For me, your patch worked. Great, now I can in fact use the new U-Boot! (Somehow I was 
not able to debug this on my own and had already decided to stick with my old port until I 
would have more time.)

> Regards,
> Aaron Sells

Regards,
Wolfgang

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-07 15:11     ` w.wegner at astro-kom.de
@ 2007-08-07 15:32       ` w.wegner at astro-kom.de
  0 siblings, 0 replies; 12+ messages in thread
From: w.wegner at astro-kom.de @ 2007-08-07 15:32 UTC (permalink / raw)
  To: u-boot

Hi again,

I just took the time to play a bit with this interrupt thing.

When commenting out the line as proposed by Aaron, the timer is (obviously) not running any 
more. For me, this gives problems because the timeouts for e.g. FPGA programming can not 
be checked any more.

I tried adding a line

disable_interrupts();

immediately before the jump to the kernel in lib_m68k/m68k_linux.c, but without success.
However, using

interrupt_init();

immediately before the call to theKernel(...) instead does the trick.

Is there any "generic" (not linux specific) place where such a call could/should be placed? It is 
not necessary for me, but I guess a more generic solution would be helpful here. And we 
should keep in mind that booting might fail at some place, so this call must not be placed at 
any point where U-Boot is still able to continue due to a broken image or something.

Best regards,
Wolfgang

PS: I am sorry for not sending a patch - my tree is a bit of a mess right now, and I also did
      not really understand how git works, as you might have noticed from previous messages.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] Can't boot uClinux image on mcf5329evb
  2007-08-07 12:59   ` Aaron Sells
  2007-08-07 13:11     ` Robert S. Grimes
  2007-08-07 15:11     ` w.wegner at astro-kom.de
@ 2007-08-07 18:03     ` Liew Tsi Chung-r5aahp
  2 siblings, 0 replies; 12+ messages in thread
From: Liew Tsi Chung-r5aahp @ 2007-08-07 18:03 UTC (permalink / raw)
  To: u-boot

Aaron,

	The dtimer needed for get_timer(). If you disabled it in u-boot, many thins such as CFI FLASH, ethernet will fail! The best way to implement it in lib_m68k/m68k_linux.c. - do_bootm_linux()

Regards,
TsiChung

-----Original Message-----
From: Aaron Sells [mailto:aaron.sells at gmail.com] 
Sent: Tuesday, August 07, 2007 7:59 AM
To: Robert S. Grimes
Cc: Das U-Boot Mailing List; Liew Tsi Chung-r5aahp
Subject: Re: Can't boot uClinux image on mcf5329evb

Bob,

Robert S. Grimes wrote:
>     Spurious interrupt 1
>     Spurious interrupt 2
>     Spurious interrupt 3
>     Spurious interrupt 4
>     Spurious interrupt 5
>     Spurious interrupt 6
>       . . .

I commented out the following line of cpu/mcf532x/interrupts.c to get past this issue:

	intp->imrh0 &= ~CFG_TMRINTR_MASK;

Regards,
Aaron Sells

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-08-07 18:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-06  1:32 [U-Boot-Users] Can't boot uClinux image on mcf5329evb Robert S. Grimes
2007-08-06 16:14 ` Aaron Sells
2007-08-06 18:03   ` Robert S. Grimes
2007-08-06 18:43     ` Wolfgang Denk
2007-08-06 18:56       ` Robert S. Grimes
     [not found] <89AFDD7DFCD0A24FBDF71F44CB8F9646020B956D@zinexc.ZIN.NET>
2007-08-07  2:53 ` Robert S. Grimes
2007-08-07  3:17   ` Liew Tsi Chung-r5aahp
2007-08-07 12:59   ` Aaron Sells
2007-08-07 13:11     ` Robert S. Grimes
2007-08-07 15:11     ` w.wegner at astro-kom.de
2007-08-07 15:32       ` w.wegner at astro-kom.de
2007-08-07 18:03     ` Liew Tsi Chung-r5aahp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox