嵌入式开发者社区

标题: SOS,从NAND启动,uboot加载linux 内核报 bad data crc错 [打印本页]

作者: custar    时间: 2015-7-21 12:53
标题: SOS,从NAND启动,uboot加载linux 内核报 bad data crc错
使用创龙核心板加自制的底板,总线上挂接16C554串口芯片,突然出现从nand启动后u-boot加载linux内核时报 bad datacrc错误,掉电重启后可以正常
$ m: C1 y7 z& `: N4 s: Z. b
$ M3 |& m  o0 a/ A! E# W进系统但是SSH应用程序报ubifs读node错误,这种现象会不会是u-boot的bug, 日志文件如下:
" R5 t; x9 d. @2 D0 d2 t$ u# z$ i2 H

( O: o8 m( U6 x: ]. BU-Boot 2012.04.01-00054-g9a6dfff (Nov 04 2014 - 22:07:15)8 `4 ^: J5 s4 a- d

4 V+ k: d2 ]! S  d4 _* ]4 |- sI2C:   ready6 {+ b0 D' r1 i5 w- h* v
DRAM:  128 MiB! \3 M! `( P$ v" d
WARNING: Caches not enabled
$ x* Y; M9 a3 ^- \* i4 o0 e, f! pNAND:  512 MiB3 T) f) d$ a+ t% a1 ~! d+ M
MMC:   davinci: 0( O# c% e" |7 |8 `
Bad block table not found for chip 06 Q: I/ x5 P  C8 i
Bad block table not found for chip 09 t( m& q5 K! V; f
Bad block table written to 0x00001ffe0000, version 0x01
7 D& x- S- N0 j& j2 B, mBad block table written to 0x00001ffc0000, version 0x01
3 C$ ~6 E5 b% \/ S3 KIn:    serial2 L# L& j) h0 X2 {
Out:   serial
- u. w2 G/ }! R  nErr:   serial7 l- S6 q/ G6 k8 w' Q& {- m  X
Default using MAC address from environment& j8 A( I1 i5 M5 |2 N
Net:   DaVinci-EMAC* u+ ?: U, L& R5 r) @8 X3 E# Q
Hit any key to stop autoboot:  01 S5 C  m: ^. L
# N2 Y3 V2 O' p! M- _  V+ U
Loading from nand0, offset 0x1200005 ~8 W! Z& q9 H, L4 |
   Image Name:   Linux-3.3.00 ^2 x2 ]& {- h6 z
   Image Type:   ARM Linux Kernel Image (uncompressed)
: v5 }% V8 l7 m7 m& |   Data Size:    2843400 Bytes = 2.7 MiB+ F+ l- l0 Y) z1 w; D. K3 n
   Load Address: c0008000
0 W9 [+ i3 G# \! K# z   Entry Point:  c0008000. b& S! L) ?* A( o6 T, @
## Booting kernel from Legacy Image at c0700000 ...
8 @: f& b! x+ D( @   Image Name:   Linux-3.3.0
! n0 m, M% U1 |5 u6 \. [   Image Type:   ARM Linux Kernel Image (uncompressed)
7 W3 F" d  n5 l" D+ D   Data Size:    2843400 Bytes = 2.7 MiB1 U1 M3 n4 A4 T: ~
   Load Address: c0008000
/ v8 P/ b8 N: a6 p+ ~   Entry Point:  c0008000) C- d3 Y, c2 `8 s5 T, v
   Verifying Checksum ... Bad Data CRC3 }  Z- `% Q$ Z% s
ERROR: can't get kernel image!
+ T, `+ V3 s$ n# V5 lU-Boot > Nand boot..." Z& H0 [/ ~# m) X! V; ]
. S6 R, C) D# e8 G% p0 o& E
: \. d: u5 l: x7 W  ~- `- U
U-Boot 2012.04.01-00054-g9a6dfff (Nov 04 2014 - 22:07:15)
8 b8 D% f( m4 ]2 t- \7 K. p! F
0 k8 @/ Y. w& rI2C:   ready4 M, w4 ~' c7 I
DRAM:  128 MiB* d4 L% }5 o) E$ [# U/ |
WARNING: Caches not enabled' |! Q" j' X. s  [) }' n* `5 U
NAND:  512 MiB3 Q. q# }" h, V- {7 P
MMC:   davinci: 0
7 V2 D6 h( x" {Bad block table not found for chip 08 I6 [6 i( L  L% E! w
Bad block table not found for chip 0$ Y! k& Y3 w% x6 H$ x) T! |
Bad block table written to 0x00001ffe0000, version 0x01/ Z$ W" f/ K3 j- N5 Z5 p- l
Bad block table written to 0x00001ffc0000, version 0x01/ P( n9 A" y1 O& s; B9 e5 [
In:    serial
: f$ ~7 j; C4 h* O5 ]1 X6 eOut:   serial
6 {  V3 x# E2 ^1 a+ y- \5 q1 `2 pErr:   serial
/ e; O' U/ m: u. L" g/ xDefault using MAC address from environment
) ?- T9 ]. B: _( }6 qNet:   DaVinci-EMAC2 O+ ~* f% j4 ^/ s7 s
Hit any key to stop autoboot:  0
7 y8 Q& I% s7 {4 P
3 j/ e) r, Y4 I; fLoading from nand0, offset 0x120000: G( b; {1 K& X) p/ J0 y
   Image Name:   Linux-3.3.0, Q8 t9 \- m1 i" S
   Image Type:   ARM Linux Kernel Image (uncompressed)1 ~" W; F  B+ M4 m
   Data Size:    2843400 Bytes = 2.7 MiB
  f' ?8 m; U  D, s2 o( I+ n; N# F   Load Address: c0008000  J) g9 T) f% z7 v
   Entry Point:  c0008000- l: ?" q9 F; C0 S1 B
## Booting kernel from Legacy Image at c0700000 ...
2 |1 F% D: p2 a  I# G   Image Name:   Linux-3.3.0
' G# t2 v% x7 h" B9 O' n' T   Image Type:   ARM Linux Kernel Image (uncompressed)
! L; K3 u$ D1 d* N( F9 A& O   Data Size:    2843400 Bytes = 2.7 MiB
' c" m% a: e3 Q; Y& I4 ^& }1 n0 ]   Load Address: c0008000- L- l3 S0 {+ |% D; X2 G
   Entry Point:  c0008000( Y/ u' b% F8 ?% i8 Y
   Verifying Checksum ... OK
3 D+ T9 P, ~/ q+ |* a, P; b# r   Loading Kernel Image ... OK
' |! Q2 {/ J1 y$ g7 DOK
2 g, h+ {1 k% \& s: O6 n3 F& o8 L( Q1 W8 l+ q
Starting kernel ...
$ A% L1 `7 c6 s7 x
1 e, f! e3 S, C) wUncompressing Linux... done, booting the kernel.
- `* L# |! j. I- V3 J6 d* _" U[    0.000000] Booting Linux on physical CPU 0
; t* D. o5 R+ j. }9 n8 R[    0.000000] Linux version 3.3.0 (root@custar-desktop) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #8 g PREEMPT Tue Apr 28 08:29:38 CST 20151 w  y) {! |+ l- y" o5 O; ?, G; p( J
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=000531774 ]/ ?" k, L0 @1 L7 {: b; u
[    0.000000] CPU: VIVT data cache, VIVT instruction cache5 M3 u: I  F# c+ Z% m3 n9 W
[    0.000000] Machine: DaVinci DA850/OMAP-L138/AM18x EVM+ v1 {+ r* U$ s
[    0.000000] Memory policy: ECC disabled, Data cache writeback
  w' c; J6 u2 n  Y3 L" H# E[    0.000000]  =======> da850_evm_map_io!
: X6 ^! H5 i0 P) f+ K0 |3 N4 X5 K( V/ Z[    0.000000] BUG: mapping for 0x80000000 at 0xfffe0000 out of vmalloc space
0 B. i8 B+ |5 c[    0.000000] DaVinci da850/omap-l138/am18x variant 0x1
, n+ j0 Y* m# n- d+ C8 b! T
0 R1 b4 l* ^6 @* D) r" h3 O& a8 F6 ?& T( M

* p7 ~; G) Q3 _# }+ ^......
, p* ?/ l' r, O+ L9 Mtarting Dropbear SSH server: [   17.173901] UBIFS error (pid 1063): ubifs_read_node: bad node length 4082, expected 3570
- G6 z! e+ h; p6 T, j6 v$ [' @[   17.182220] UBIFS error (pid 1063): ubifs_read_node: bad node at LEB 486:101360, LEB mapping status 13 H. ?0 N$ ^( l& u" w* O# y5 T
[   17.191623] UBIFS error (pid 1063): do_readpage: cannot read page 22 of inode 3091, error -22
. y5 b2 t* N6 o- t  U[   17.202389] UBIFS error (pid 1063): ubifs_read_node: bad node length 4082, expected 3570
! M& ~9 ^% @$ E7 `[   17.210675] UBIFS error (pid 1063): ubifs_read_node: bad node at LEB 486:101360, LEB mapping status 1. m; \! Q. @' Y) \  \
[   17.220069] UBIFS error (pid 1063): do_readpage: cannot read page 22 of inode 3091, error -22+ e0 Y- ?! y6 x
/etc/rc5.d/S10dropbear: line 70:  1063 Bus error               start-stop-daemon -S -x "$DAEMON" -- $KEY_ARGS -p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
; d% d4 ^  P0 JStarting telnet daemon.- C/ \2 u3 {; {, k4 N& p: ?9 S9 F

5 z' b9 B) [4 D( ~3 T  Y" ]  O......
2 a' x7 b$ R) P$ PStopping Bootlog daemon: bootlogd.
0 j: s; r  a5 N) W+ T0 Q" ~8 t9 L
# w0 o1 c  C$ e! } _____                    _____           _         _" y4 L, w  p1 n+ i
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
! z0 u4 o# H! g|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|% @. s# v  l  W+ X
|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|/ q. i, U7 m( N% U
              |___|                    |___|
6 |2 M) Q7 ]0 Q5 e5 F5 u, G
3 _" J' z6 \1 C) O& ^Arago Project http://arago-project.org tl ttyS2; F- h8 E: A. ~
3 m8 S( w1 ^2 L$ w5 {- W# J
Arago 2013.06 tl ttyS22 k# I% y) Z% R  @0 M5 Q# U+ B8 ~4 M

3 M& b( B6 H  h# y) f9 }% etl login: root (automatic login)9 l9 M% k' t, h  I6 x5 q- K
; n5 i) \. Z' f  ?. }
root@tl:~#
# z/ r1 E5 _/ \3 A/ D4 k1 Y& k3 L1 C8 p* t; j0 u2 ^' B2 X( _  g

作者: teddy    时间: 2015-7-21 13:54
16C554串口芯片是连接在emifa总线,nand flash也是连接emifa总线,有可能被影响了。
作者: custar    时间: 2015-7-21 14:51
teddy 发表于 2015-7-21 13:54/ Z1 x; e# H  N1 ~' ^2 @
16C554串口芯片是连接在emifa总线,nand flash也是连接emifa总线,有可能被影响了。 ...

. Z% M# g6 o' V6 V8 O6 n会是数据线影响,还是片选之间干扰,16c554 是一上电就复位的。
作者: custar    时间: 2015-7-21 14:52
有没有可能EMIF哪个寄存器设置不妥当产生这种影响。
作者: teddy    时间: 2015-7-27 15:10
可以参考创龙的多串口模块TL16CP754,就是通过emifa扩展串口,相应的驱动源码,例程都是提供的。
作者: custar    时间: 2015-8-12 10:20
teddy 发表于 2015-7-27 15:10
# i* A* }8 a% ^" F8 _( }/ a! @可以参考创龙的多串口模块TL16CP754,就是通过emifa扩展串口,相应的驱动源码,例程都是提供的。 ...

: e/ k) q4 B# y6 kEMIF相关配置应该是没问题的,spansion的片子在延长总线时序,增加时钟之后,UBIFS逻辑坏块试了1000次反复满规格擦写不会出现,但是某些核心板还是会出现重启后内核bad crc,一般是在更改系统里文件并reboot之后出现,这时在u-boot中reset,又正常了,但是还是会出现在& O6 L7 K9 k: R
Starting kernel ...
8 N- m3 b% W3 O; Q7 b0 S8 GUncompressing Linux... done, booting the kernel.之后卡住的现象!




欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4