Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Mar 2009 09:36 AM by  johnlongawa
kernel refuses to start on cold boot after copy to RAM
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
ad@dohmanngmbh.de
New Member
New Member
Posts:


--
13 Mar 2009 08:23 PM
    Hi all,

    I've got problems with uclinux ( freescale-ltib with kernel 2.6.22 ) on a fireengine m5329EVB after Power-on Reset

    I built a the kernel, zipped and flashed it into the fireengines boot ROM. It works quite well after an External Reset, but when I switch of the main power and force a Power-on Reset the kernel refuses to start:

    Power-on Reset

    ColdFire MCF532x on the M5329EVB
    Firmware v4d.1a.1e (Built on Mar 10 2009 11:23:43)
    Copyright 2006 Freescale Semiconductor, Inc.

    Enter 'help' for help.

    Press any key to stop autoboot
    Compressed image found. Uncompressing...


    even when try to reset the device again the kernel doesn't start.
    The only way to get the device running is to load ELF file of the same kernel into RAM via ethernet and then start it.
    First I thought it has to be something with the missing initialization info in the binary file and I was able to fix it by enabling initrd support in the kernel for quite a long time.
    But now the issue appeared again - even with initrd-support I am a little confused.

    I also tried freescales new ltib-version, but there was no change with new kernel (2.6.26).

    Any Ideas about the real reason ?
    Every hint is most welcome.

    thx.

    edit: sry, I use the dbug bootloader <!-- s;-) -->;-)<!-- s;-) -->
    johnlongawa
    New Member
    New Member
    Posts:


    --
    14 Mar 2009 01:46 PM
    I don't know anything about your system or CPU so this is likely of little value. That said, the contents of memory are potentially different when you do an external reset (after running code, flashing, etc.) than they are on power-up. It could be that your kernel only boots when the contents of memory are in a certain state and you can never get them to be in that state after power-on. I don't know how much control you have over specifying the image size and RAM load address but if the compressed image size is wrong or the initial RAM load address overlaps the uncompressed address, depending on the code that decompresses and copies it, the act of decompressing and copying it can either fail to complete or actually trash the compressed image (if it is in RAM). This has happened to me when I specified the wrong uncompressed image size.

    Also, some processors can distinguish between an external reset and a power-on reset and execute different code based on that determination so check into your bootloader to see it intentionally does anything different and you might find a clue.

    That's all I can think of. Good luck.
    ad@dohmanngmbh.de
    New Member
    New Member
    Posts:


    --
    16 Mar 2009 03:43 AM
    hi john,

    thx for your reply and your wishes - they seemed to work <!-- s;-) -->;-)<!-- s;-) -->

    Well, we already had the same idea, because the elf file defines the memory areas to clear - and the elf version works.
    We tried some traces this morning - but without success. dbug and linux are both modifying A7 (sp) and crash the system.

    So we just went through the dbug code and watched for differences between elf and bin version load and had an idea.
    The dbug decompresses the kernel image to RAM. So we assume this area to be well defined and the problem to be just behind the kernel.

    Some zeros behind the kernelimage won't really size up the zipped image, so we did a
    dd if=/dev/zero bs=1024 count=4096 >> vmlinux.bin && gzip vmlinux.bin

    just to zero the next 4 MB behind the kernel but not to touch the stack (16 MB RAM).

    And, well, this hack works <!-- s;-) -->;-)<!-- s;-) -->

    thx
    johnlongawa
    New Member
    New Member
    Posts:


    --
    16 Mar 2009 09:36 AM
    Glad to hear it!
    You are not authorized to post a reply.