This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Loading Kernel... hangs on some boards DM368

I've started this as a new topic as I've solved the bootloader issue now, and I think this is a separate issue.

We are developing on DM368 using the Appro IPNC SDK 4.x, hardware is based on the Leopardboard but using an MT29F1G08AB NAND chip (128MiB instead of 256MiB).

We have a kernel & filesys built that boots & runs on a Leopard DM368, but fails to load on our own hardware for some reason.

U-Boot now falls over at loading the kernel:

Loading from nand0, offset 0x500000
   Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
   Created:      2013-07-17  16:29:57 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3439968 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
## Booting kernel from Legacy Image at 80700000 ...
   Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
   Created:      2013-07-17  16:29:57 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3439968 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
DM36x EVM #

If I use setenv verify no it will just  say "Loading kernel..." and hang forever.

Even though the images are the same, and the flashing routine is the same from the same script on the same SD card, for some reason the checksum on our board comes out wrong and booting the kernel fails:

On Leopardboard:

DM36x EVM # nboot 0x80700000 0 0x500000

Loading from nand0, offset 0x500000
   Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
   Created:      2013-07-17  16:29:57 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3439968 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
DM36x EVM # iminfo

## Checking Image at 80700000 ...
   Legacy image found
   Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
   Created:      2013-07-17  16:29:57 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3439968 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
DM36x EVM #

But on our board:

DM36x EVM # nboot 0x80700000 0 0x500000

Loading from nand0, offset 0x500000
   Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
   Created:      2013-07-17  16:29:57 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3439968 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
DM36x EVM # iminfo

## Checking Image at 80700000 ...
   Legacy image found
   Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
   Created:      2013-07-17  16:29:57 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3439968 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ...    Bad Data CRC
DM36x EVM #

The serial port is not wrong as I see the full bootlog on the Leopardboard through the same port w/ same software.

If I manually set the machine ID to 1939 (davinci_dm36x_ipnc/evm) it makes no difference.

The only HW difference I can really see is our NAND is MT29F1G08... (128MiB) and the Leopard is MT29F2G08... (256MiB) but the kernel + filesys are way less than this, and U-Boot seems to recognise correctly that the BBT is to be written at 0x7FE0000 on our board and 0xFFE0000 on the Leopard.

Do I need to run a crc32 on the kernel or something? Do I need to do a scrub of the flash? Is there any way to get more diagnostics on what's going wrong? I guess since the kernel is hanging very early (we have earlyprintk turned on in bootargs and there's no output at all) there's no even-earlier chance to add print statements to the kernel.

Edited to add: If I do a TFTP transfer of the kernel direct to RAM and then boot from there, the same thing happens - the Leopardboard works fine, our board throws a CRC error, or hangs if verify=no.

  • Just to flesh out the case, even if we load the kernel fresh over TFTP it doesn't like the CRC:

    DM36x EVM # nboot 0x80700000 0 0x500000      <--- Load from NAND                                                                     
    Loading from nand0, offset 0x500000
       Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
       Created:      2013-07-17  16:29:57 UTC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3439968 Bytes = 3.3 MiB
       Load Address: 80008000
       Entry Point:  80008000
    DM36x EVM # iminfo

    ## Checking Image at 80700000 ...
       Legacy image found
       Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
       Created:      2013-07-17  16:29:57 UTC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3439968 Bytes = 3.3 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ...    Bad Data CRC
    DM36x EVM # tftpboot 0x80700000 uImage_ipnc_dm368;iminfo

    Using DaVinci-EMAC device
    TFTP from server 192.168.2.10; our IP address is 192.168.2.160
    Filename 'uImage_ipnc_dm368'.
    Load address: 0x80700000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ######################
    done
    Bytes transferred = 3440032 (347da0 hex)

    ## Checking Image at 80700000 ...
       Legacy image found
       Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
       Created:      2013-07-17  16:29:57 UTC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3439968 Bytes = 3.3 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ...    Bad Data CRC
    DM36x EVM #

    But if we do the same on the Leopardboard, with the same image, it's happy and will boot.

  • I've just tried using UBL with 297MHz Core / 270MHz DDR and our boards get much further into the boot process, which makes me wonder if there's some problem with our DDR lines :(

    In the meantime, any suggestions welcomed!