Skip to contentSkip to conversation

Can't boot uClinux image on mcf5329evb

U-Boot-Users Robert S. Grimes 3 participants 5 messages Aug 6, 2007

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Hi Bob,

Quoted 12 lines · Robert S. Grimes

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>

Quoted 8 lines
    -> 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

#2 lore raw
Quoted 3 lines · Aaron Sells

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

Quoted 4 lines

Regards,
Aaron

#3 lore raw
Quoted 6 lines · In message <[email protected]> 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

Signature · 6 lines
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
#4 lore raw
Quoted 10 lines · Wolfgang Denk

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!

Quoted 5 lines

Best regards,

Wolfgang Denk