• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: How to solve :NAND: Nand ECC error ???  (Read 9666 times)
mikekgr
Newbie
*

Karma: 0
Posts: 14


View Profile
« on: April 28, 2009, 03:59:08 AM »

Dear friends,
I am suffering from a "NAND: Nand ECC error".
Follow you can find the booting as well as what print command says...
Please instruct me what to do in order to solve the problem (is it hardware problem?)

Thanks

===== QUOTE =====
        __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE80

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
*** Warning - bad CRC or NAND, using default environment


Checking for BootROM Routine Errors

No. of BootROM routine retries: 524288
NAND: Nand ECC error


Running diagnostics ...

        DDR2 data bus test                               PASSED

        DDR2 address bus test                            PASSED

        DDR2 device test                                 PASSED

        Device: 0, Size: 512 MB, Page Size: 2 KB, Block Size: 128 KB
        NAND detection test                              PASSED

        Bad Block: 03280000
        Bad Block: 18900000
        NAND bad-block detection test                    PASSED

        Speed: 100 Mbps, Duplex: Full, Link: up
        GbE link detect test                             PASSED

        RTC test                                         PASSED

Diag completed

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
Using egiga0 device
TFTP from server 10.4.50.5; our IP address is 10.4.50.165
Filename 'uImage'.
Load address: 0x2000000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
## Booting image at 02000000 ...
Bad Magic Number
Unknown command '<NULL>' - try 'help'
Marvell>> print
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
run_diag=yes
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
mainlineLinux=no
CASset=min
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
MALLOC_len=1
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
bootcmd=tftpboot 0x2000000 $(image_name);setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetC
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
bootdelay=3
disaMvPnp=no
ethaddr=00:50:43:e7:29:31
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
enaAutoRecovery=yes
ethact=egiga0
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root) root=/dev/nfs rw nfsroot=10.4.50.5:/mnt/ARM_FS/ ip=10.4.50.165:10.4.50.5s

Environment size: 1555/131068 bytes
Marvell>>
==== UNQUOTE ====
Logged

Rabeeh Khoury
Administrator
Full Member
*****

Karma: 5
Posts: 218


View Profile
« Reply #1 on: April 30, 2009, 03:19:45 AM »

try running 'saveenv' and then 'reset'.
saving the environment variable should fix the ECC errors on the environment variables area.
Logged

mikekgr
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #2 on: April 30, 2009, 05:16:10 AM »

Dear Rabeeh Khoury,
first of all thanks for your answer.
As you suggested me I did saveenv and then reset, but after the reset the result was not successful. I still get: NAND: Nand ECC error

Do you have any other idea/tip to test?

Best Regards,
Mike Kranidis
Logged

Rabeeh Khoury
Administrator
Full Member
*****

Karma: 5
Posts: 218


View Profile
« Reply #3 on: April 30, 2009, 05:56:40 AM »

Can you please print what 'nand bad' command on u-boot says?

BTW - Is it the original u-boot you got from Global? Or is it burned through openocd?
Logged

Rabeeh Khoury
Administrator
Full Member
*****

Karma: 5
Posts: 218


View Profile
« Reply #4 on: May 03, 2009, 07:23:12 AM »

I just checked U-Boot env variables, you probably have a messed up u-boot env variables.
For removing the diagnostics thing, you need to set 'run_diag' environment variable to 'no'.

You can do it by running the following on u-boot -
Code:
setenv run_diag no
saveenv
Logged

mikekgr
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #5 on: May 03, 2009, 10:51:31 PM »

Dear Rabeeh Khoury,
thanks for your help. I really appreciate your tries to help me and to solve the problem I have.
Well follow, is the answers for your asked questions:

Can you please print what 'nand bad' command on u-boot says?

BTW - Is it the original u-boot you got from Global? Or is it burned through openocd?

1) {nand bad}
Marvell>> nand bad

Device 0 bad blocks:
  03280000
  18900000

2) Yest it is the original u-boot as I got it from Global

Best Regards,
Mike Kranidis
Logged

mikekgr
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #6 on: May 03, 2009, 10:56:05 PM »

Dear Rabeeh Khoury,
as you suggested me :
I just checked U-Boot env variables, you probably have a messed up u-boot env variables.
For removing the diagnostics thing, you need to set 'run_diag' environment variable to 'no'.

You can do it by running the following on u-boot -
Code:
setenv run_diag no
saveenv

I did the above and the result is the following: (as you can see I have not any error on screen but is not booting and I am almost sure that I need to change the booting command but I am not sure what is the "correct command" in my case...)
===== QUOTE =====

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE80

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
Using egiga0 device
TFTP from server 10.4.50.5; our IP address is 10.4.50.165
Filename 'uImage'.
Load address: 0x2000000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
## Booting image at 02000000 ...
Bad Magic Number
Unknown command '<NULL>' - try 'help'
Marvell>>
==== UNQUOTE ====
Logged

mikekgr
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #7 on: May 03, 2009, 11:24:31 PM »

Dear Rabeeh Khoury,
does make any sense or help the debugging this error:
===== QUOTE =====
Marvell>> setenv bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
## Booting image at 00800000 ...
Bad Magic Number
==== UNQUOTE ====

Best Regards
Logged

Rabeeh Khoury
Administrator
Full Member
*****

Karma: 5
Posts: 218


View Profile
« Reply #8 on: May 06, 2009, 01:54:56 AM »

The main problem with what you wrote is that -

Code:
setenv bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000

won't work because of the '='. Alternatively you should be doing -

Code:
setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'

Seems that you u-boot factory environment variables are corrupted. Please refer to the following that might help -

http://www.openplug.org/plugwiki/index.php/Factory_Default_u-Boot_Environment
Logged

mikekgr
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #9 on: May 06, 2009, 10:46:58 PM »

Dear Rabeeh Khoury,
yes, you are absolute right, I corrected now again there is something wrong (although the start of booting progress now seems normal) see:

===== QUOTE =====
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE80

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 00800000 ...
Bad Magic Number
===== UNQUOTE =====

Any idea?
Many thanks
Logged

Rabeeh Khoury
Administrator
Full Member
*****

Karma: 5
Posts: 218


View Profile
« Reply #10 on: May 07, 2009, 08:25:57 AM »

hmm... looks your kernel is corrupted? (resides in offset 1MB (0x00100000))

how did you get into this situation? maybe if we you can roll back you can understand what happened?

Logged

mikekgr
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #11 on: May 07, 2009, 01:43:02 PM »

Dear Rabeeh Khoury,
hmm... looks your kernel is corrupted? (resides in offset 1MB (0x00100000))

how did you get into this situation? maybe if we you can roll back you can understand what happened?


I am not really sure how I got into this situation! The only question is: How can install the ubuntu 9.04 again (I mean the supplied ubuntu with the supplied kernel...). Is there anywhere step by step how to?
Thanks and I really appreciate your endless help

Best Regards,
Mike Kranidis
Logged

Brian
Newbie
*

Karma: 0
Posts: 7


View Profile
« Reply #12 on: May 07, 2009, 03:37:22 PM »

Have a look at:
http://openplug.org/plugforum/index.php?topic=67.msg1452#msg1452

you will need a tftp server, may need to rename one of the files, and the usb detection is flakey. You may need to reset the plug more than once.
Logged

Dhaval Vasa
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #13 on: May 15, 2009, 12:36:48 PM »

If u-boot on NAND is programmed using OpenOCD (which is true during production), you will see NAND: NAND ECC error as OpenOCD somehow doesn't support flashing u-boot with ECC support; thus, 88F6281 SoC BootROM reads u-boot without ECC support.

Easier way to fix this issue - re-write u-boot on NAND using u-boot.  This can be done using

Marvell>> setenv ipaddr <ipaddress>
Marvell>> setenv netmask <subnet mask>
Marvell>> setenv serverip <serverip having tftp support>
Marvell>> bubt <uboot.bin file>
Marvell>> reset

Now, you should see no NAND error message during u-boot boot up, only if run_diag env is set to yes. 
Logged

mikekgr
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #14 on: May 17, 2009, 06:24:01 AM »

If u-boot on NAND is programmed using OpenOCD (which is true during production), you will see NAND: NAND ECC error as OpenOCD somehow doesn't support flashing u-boot with ECC support; thus, 88F6281 SoC BootROM reads u-boot without ECC support.

Easier way to fix this issue - re-write u-boot on NAND using u-boot.  This can be done using

Marvell>> setenv ipaddr <ipaddress>
Marvell>> setenv netmask <subnet mask>
Marvell>> setenv serverip <serverip having tftp support>
Marvell>> bubt <uboot.bin file>
Marvell>> reset

Now, you should see no NAND error message during u-boot boot up, only if run_diag env is set to yes. 

Thanks sir. I will try the proposed solution one of these days and I let you know
Logged

Pages: [1] 2
Print
Jump to: