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.

dm8168 can't boot uImage from nand flash

Hello all;

images of u-boot and uImage were flashed to nand flash memory via u-boot. And then I want to

boot from the nand flash memory and the filesystem is mounted from network .There are some errors

occoureed ,i can't fix them .I doubt the problem result in NAND ECC algorithm selection .because

Would you give me some suggestions ? Thanks a lot! There are some details below.

TI8168_EVM#nand scrub

devepting envirement:

816X/389X EVM ASSY 512870 REV G" and "816X/39x EXPANSION I/O DAUGHTER CARD ASSY 514060 REV C"

NAND scrub: device 0 whole chip

Warning: scrub option will erase all factory set bad blocks!

There is no reliable way to recover them.

Use this command only for testing purposes if you

are sure of what you are doing!

Really scrub this NAND flash? <y/N>

Erasing at 0xffe0000 -- 100% complete.

OK

TI8168_EVM#mw.b 0x81000000 0xFF 0x00260000;

TI8168_EVM#tftp 0x81000000 u-boot.noxip.bin;

Using DaVinci EMAC device

TFTP from server 192.168.1.245; our IP address is 192.168.1.6

Filename 'u-boot.noxip.bin'.

Load address: 0x81000000

Loading: #####################################

done

Bytes transferred = 184800 (2d1e0 hex)

TI8168_EVM#nand erase 0x0 0x260000;

NAND erase: device 0 offset 0x0, size 0x260000

Erasing at 0x240000 -- 100% complete.

OK

TI8168_EVM#nandecc hw 2;

HW ECC BCH8 Selected

TI8168_EVM#nand write.i 0x81000000 0x0 0x00260000;

NAND write: device 0 offset 0x0, size 0x260000

2490368 bytes written: OK

TI8168_EVM#nandecc hw 0;

HW ECC Hamming Code selected

TI8168_EVM#

TI8168_EVM#mw.b 0x81000000 0xFF 0x440000;

TI8168_EVM#tftp 0x81000000 uImage-dm816x-evm.bin;

Using DaVinci EMAC device

TFTP from server 192.168.1.245; our IP address is 192.168.1.6

Filename 'uImage-dm816x-evm.bin'.

Load address: 0x81000000

Loading: #################################################################

#################################################################

#################################################################

#################################################################

#################################################################

#################################################################

#################################################################

####################

done

Bytes transferred = 2428376 (250dd8 hex)

TI8168_EVM#nand erase 0x00280000 0x00440000;

NAND erase: device 0 offset 0x280000, size 0x440000

Erasing at 0x6a0000 -- 100% complete.

OK

TI8168_EVM#nand write 0x81000000 0x00280000 0x00251000;

NAND write: device 0 offset 0x280000, size 0x251000

2428928 bytes written: OK

TI8168_EVM#dhcp

BOOTP broadcast 1

*** Unhandled DHCP Option in OFFER/ACK: 28

*** Unhandled DHCP Option in OFFER/ACK: 28

DHCP client bound to address 192.168.1.6

TI8168_EVM#setenv serverip 192.168.1.245

TI8168_EVM#setenv bootcmd 'nand read 0x81000000 0x00280000 0x00251000;bootm 0x81000000';

TI8168_EVM#setenv bootargs 'console=ttyO2,115200n8 rootwait rw mem=256M earlyprintk notifyk.vpssm3_sva=0xBF900000 vram=50M ti816xfb.vram=0:16M,1:16M,2:6M root=/dev/nfs nfsroot=192.168.1.245:/home/lowen/targetfs ip=dhcp';

TI8168_EVM#saveenv

Saving Environment to NAND...

Erasing Nand...

Warning: Erase size 0x00002000 smaller than one erase block 0x00020000

Erasing 0x00020000 instead

Erasing at 0x260000 -- 100% complete.

Writing to Nand... done

TI8168_EVM#

TI8168_EVM#reset

resetting ...

U-Boot 2010.06 (Dec 09 2011 - 12:10:47)

TI8168-GP rev 1.1

ARM clk: 987MHz

DDR clk: 796MHz

I2C: ready

DRAM: 2 GiB

NAND: HW ECC Hamming Code selected

256 MiB

:,;;:;:;;;;;;;;r;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:;;;;;;;;:,;;:;:

;,;:::;;;;r;;;rssiSiS552X5252525259GX2X9hX9X9XX2325S55252i5:,;;:;:;;;;;;;;:,;;:

;:;;;;;;;rrssSsS52S22h52299GGAAMHMM#BBH#B#HMM#HMBA&&XX2255S2S5Si:,;;:;:;;;;;;;;

;:;;r;;rsrrriiXS5S329&A&MH#BMB#A&9XXA252GXiSXX39AAMMMBB&G22S5i2SSiiiisi:,;;:;:;

;;;;;r;rr2iisiih393HB#B#AA99i22irrrX3X52AGsisss2Xii2299HBMA&X2S5S5iSiisSsi:,;;:

r:r;rrsrsihXSi2&##MHB&Ahh3AGHGA9G9h&#H##@@@##MAMMXXX9SSS29&&HGGX2i5iisiiisisi:,

;;rrrrsSiiiA&ABH&A9GAGhAhBAMHA9HM@@@@@@@@@@@@@@@@@@@HHhAh2S2SX9&Gh22SSiisiiisii

r:rrssisiS2XM##&h3AGAX&3GG3Ssr5H@M#HM2; ;2X&&&MHMB###GBB#B&XXSSs529XX55iSsisisi

r;rsrisSi2XHAhX99A3XXG&&XS;:,rH#HGhAS @@@@3rs2XBM@@A552&&AHA2XiisSS252SSsisSs

r;issi5S22&&3iSSX292&hXsr;;:;h@&G339&S9@@@@2@MA&9&HB##Xris29ABMAAX2ir;rsSi5iss5

rrsSi2XhG&9GXh399&X99i;;;;;;r#H&293H9X#@@@@@@@B&9GhAH@XrrsrsiXABHB&HG2rr;rrSiSi

;:rsisS599&AA9XG&3A35r;:::;,;BMh&&2iX5A@@@@@@@&392X5GB2;;;r;iSX393A##A&Xi:::rsi

;:rss552222X553&XHMhir;;::,:,h#HhGSXhG3#@@@@#AXXS2XAHA;::;;;;ss55XShBA3239r:,;;

r;ii2S5SSi2i53hirsh2srr::,,,,;MMXX359&Ah3h&Si59SX99A#i:,::::;;sri2,.2r;:SGAr;,:

;:;rrrrssiriXGSi::shs;;;,,,:,,rBBA9h5s5h5iS5isi2SAHB5:,,,:::;rrs5&SrisSX5Srrr:,

;,r;;;;rsriSSrrrr;;5Xrr;;,:,,.,;9AA2SsisS5323XXXG9&i:.,,::;;r;;;srrrrrr;;:;::::

:,;r;r;rrissrrr;:;::;s;;;;,:,,..,r293h222hXXAAGGGX;:,,,:,:,::;:;::,:,,,,...,,,,

;,;;;;rrrrrrrrirr;,.,,:::::::,,,,.,;SX&ABAB2hhXir:,,.,,.,,:,,,,..,,,..,..,,,..:

:.:;:;;;:;;;;r;rrs;:.. ,,:::::,:,:,,.::rrsrr;;,,.......,..,....,,,,,,,...,.,,:,

:.:::,::::::;;r;rrr;:.......,.,.,,:::,,...............,,::.,,,,:,::,,:,:,,,:,;:

,.::,:,,,,,;;;;;;;;r;;::,..............................;;;:;::::,:::::::,:,:,,,

: ,,:,,,,,,,,,,,,,:;rrr;;:;,,,,,,,::,.,.:.,.,;s,:;;;;:;:;;;;;::::,:::,:::,:,:,:

,.,,,,,,,...,,.,,....................................:,............:,,,:,:,,,,,

MMC: OMAP SD/MMC: 0

Net: Detected MACID:40:5f:c2:20:a3:4e

Ethernet PHY: GENERIC @ 0x01

DaVinci EMAC

Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x280000, size 0x251000

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed

NAND read from offset 280000 failed -74

0 bytes read: ERROR

## Booting kernel from Legacy Image at 81000000 ...

Image Name: Arago/2.6.37-psp04.00.01.13/dm81

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 2428312 Bytes = 2.3 MiB

Load Address: 80008000

Entry Point: 80008000

Verifying Checksum ... Bad Data CRC

ERROR: can't get kernel image!

TI8168_EVM#

TI8168_EVM#printenv

bootdelay=3

baudrate=115200

autoload=no

verify=yes

ramdisk_file=ramdisk.gz

loadaddr=0x81000000

script_addr=0x80900000

loadbootscript=fatload mmc 0 ${script_addr} boot.scr

bootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}

ethaddr=40:5f:c2:20:a3:4e

ethact=DaVinci EMAC

filesize=250DD8

fileaddr=81000000

bootfile=uImage-dm816x-evm.bin

gatewayip=192.168.1.1

netmask=255.255.255.0

ipaddr=192.168.1.6

dnsip=192.168.1.1

serverip=192.168.1.245

bootcmd=nand read 0x81000000 0x00280000 0x00251000;bootm 0x81000000

bootargs=console=ttyO2,115200n8 rootwait rw mem=256M earlyprintk notifyk.vpssm3_sva=0xBF900000 vram=50M ti816xfb.vram=0:16M,1:16M,2:6M root=/dev/nfs nfsroot=192.168.1.245:/home/lowen/tp

stdin=serial

stdout=serial

stderr=serial

ver=U-Boot 2010.06 (Dec 09 2011 - 12:10:47)

Environment size: 828/8188 bytes

TI8168_EVM#

best regards

lowen

  • Hi, lowen lin!

    Do you have any idea? I have the same problem :(

  • I solved this my problem. 

    In this page http://processors.wiki.ti.com/index.php/Booting_Linux_kernel_using_U-Boot 

    (On my board DDR3 connected to EMIF1 at address 0xC0000000)

    BOARD#mw.b 0xC1000000 0xFF 0x100000
    BOARD#dhcp
    BOOTP broadcast 1
    DHCP client bound to address 192.168.1.36
    BOARD#setenv serverip 192.168.1.34
    BOARD#tftp 0xC1000000 uImage
    Using DaVinci EMAC device
    TFTP from server 192.168.1.34; our IP address is 192.168.1.36
    Filename 'uImage'.
    Load address: 0xc1000000
    Loading: #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    ###
    done
    Bytes transferred = 2011248 (1eb070 hex)
    BOARD#nand erase 0x280000 0x440000

    NAND erase: device 0 offset 0x280000, size 0x440000
    Erasing at 0x6a0000 -- 100% complete.
    OK
    BOARD#nand write.e 0xC1000000 0x280000 0x440000

    NAND write: device 0 offset 0x280000, size 0x440000
    4456448 bytes written: OK
    BOARD#
    After reboot I set in my boot.scr
    setenv bootcmd 'dhcp; setenv serverip 192.168.1.34; run loadbootscript'
    setenv bootargs 'console=ttyO2,115200n8 rootwait rw mem=256M earlyprintk \
    root=/dev/nfs nfsroot=192.168.1.34:/home/karak/targetfs ip=dhcp'
    nand read.e 0xC1000000 0x280000 0x440000
    bootm 0xC1000000
    And system start booting...
    MMC:   OMAP SD/MMC: 0
    Net: Detected MACID:40:5f:c2:27:d:50
    Ethernet PHY: KSZ8051MNL @ 0x07
    DaVinci EMAC
    Hit any key to stop autoboot: 0
    BOOTP broadcast 1
    DHCP client bound to address 192.168.1.36
    Using DaVinci EMAC device
    TFTP from server 192.168.1.34; our IP address is 192.168.1.36
    Filename 'boot.scr'.
    Load address: 0xc0900000
    Loading: #
    done
    Bytes transferred = 2054 (806 hex)
    ## Executing script at c0900000

    NAND read: device 0 offset 0x280000, size 0x440000
    4456448 bytes read: OK
    ## Booting kernel from Legacy Image at c1000000 ...
    Image Name: Linux-2.6.37
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2011184 Bytes = 1.9 MiB
    Load Address: c0008000
    Entry Point: c0008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
    OK

    Starting kernel ...

  • hello idle;

    thank you for your reply.but I can't fix it yet followed your way. Would you have another solution?I am looking forward to hearing from  you .

  • Hi, lowen lin!

    Can you try burn another kernel image smaller size? In this forum I saw some messages about problems when flashing large kernel. I use latest ezsdk_5_03_01_15 and my custom kernel size about 2.5MB.

  • Lowen Lin,

    Immediately after flashing have you tried booting the kernel? 

    -Renjith

    www.pathpartnertech.com

  • yes ! Could you give me some suggestions? thanks a lot

  • Lowen,

    Is this a custom board or EVM? Did you try using "nandecc hw 2" or using sw ecc?

    Can you do this simple experiment?

    Create a pattern in memory or a file which is of 2K in size. Make sure the data is correct by doing memory dump using "md  " command in u-boot. Then erase and write this 2K data to the NAND after setting "nandecc hw 0".

    Just read back the 2K data from NAND to a different RAM address offset and compare whether the data is proper or not. If its improper do a "nand dump " of the particular NAND offset.

    -Renjith

    www.pathpartnertech.com

  • Hi, Lowen lin!

    1) May be there are short circuits between adress/data lines on NAND? (but u-boot was burned successfully) Open box there NAND is placed and carefully insert it again.

    2) Image uImage-dm816x-evm.bin - have the same format as uImage in linux/arch/arm/boot/uImage ?

    May be this help you.