嵌入式开发者社区

标题: 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错误,掉电重启后可以正常
0 E, w% z8 v3 b! y
$ P# C( M% S4 I4 O" \进系统但是SSH应用程序报ubifs读node错误,这种现象会不会是u-boot的bug, 日志文件如下:& [1 F& p. Z) o8 u
0 a+ u' N5 r% {& N9 N8 x7 m
% K5 y/ J7 K% ?8 J
U-Boot 2012.04.01-00054-g9a6dfff (Nov 04 2014 - 22:07:15)/ ?/ B8 w$ Z5 |4 n$ n1 P% S

& @" ?6 N6 L9 V$ J# \; l+ g5 v; DI2C:   ready( n6 L+ b6 F% ~! D- l$ {. f4 u
DRAM:  128 MiB5 ^# H2 v3 {( O, e
WARNING: Caches not enabled
8 z* [$ K! m* ^# D8 Z( E) A$ y% _NAND:  512 MiB
2 _7 L' [( b# A0 d! l* pMMC:   davinci: 0
! ^7 B8 T4 o$ {7 W6 C+ c1 N: kBad block table not found for chip 0
/ o0 p) q7 D6 p) lBad block table not found for chip 0
' A  @2 {# y3 t3 _/ xBad block table written to 0x00001ffe0000, version 0x01
' D' H) ^7 I: o  D# G- ~" GBad block table written to 0x00001ffc0000, version 0x01$ G4 S& w, n% e
In:    serial  r2 H8 X; F0 W7 M* h0 F
Out:   serial; D  _# s# d+ w) e& `0 ?
Err:   serial/ E+ ?- U+ O" D
Default using MAC address from environment
9 G1 o  J$ ~& |" tNet:   DaVinci-EMAC- G2 t+ D0 O& g0 V$ V
Hit any key to stop autoboot:  0
+ c+ p5 v2 [$ `6 `( q" p$ @# J6 x. e5 D# \: M1 y1 ]! ], G4 q" E
Loading from nand0, offset 0x120000
+ }0 i: i. b3 S+ w  v) {4 q   Image Name:   Linux-3.3.0
" s( I0 ?. I) i8 R0 W   Image Type:   ARM Linux Kernel Image (uncompressed)2 Y% C) e$ n! i( Q+ V1 b7 @  s
   Data Size:    2843400 Bytes = 2.7 MiB
  Y+ L+ r! S6 l( B   Load Address: c0008000* w0 P$ l* S8 o, A
   Entry Point:  c0008000
! J# n3 f+ i7 ~* K## Booting kernel from Legacy Image at c0700000 ...5 t& p( A6 X8 w( K
   Image Name:   Linux-3.3.0( M6 V5 l5 H$ ]! f6 w4 I5 T- v
   Image Type:   ARM Linux Kernel Image (uncompressed)7 o! B0 W1 V; j5 Z# N  H! b+ w7 {0 v
   Data Size:    2843400 Bytes = 2.7 MiB, Q0 S! k- A% Z9 i
   Load Address: c0008000
* t9 {7 h# E& ^( P   Entry Point:  c0008000, t& {! S$ q9 d) s! K0 V3 l
   Verifying Checksum ... Bad Data CRC* h' k# I2 ]3 L2 }
ERROR: can't get kernel image!
( ?; S. q/ U) v/ g* O5 x) Z: ?+ `U-Boot > Nand boot...
0 ]3 o4 W9 R3 N) O) x0 K8 E6 Y: d/ f9 L( z% q; o

1 j) c! Y7 Q# c9 r3 eU-Boot 2012.04.01-00054-g9a6dfff (Nov 04 2014 - 22:07:15)
6 Z& E8 Q2 H; w; Z% n. ~2 |) o
) G- f, O- ?2 R* v( |$ d* PI2C:   ready8 \1 d& {" h/ [& w4 U2 G. ~
DRAM:  128 MiB
9 _/ c. h/ ?& H# iWARNING: Caches not enabled
/ g  _8 K1 W0 \, X/ r! `NAND:  512 MiB
. h7 h- I( K. G) c% P3 NMMC:   davinci: 0
3 \- l/ O0 _0 `) t# Y$ `: ]Bad block table not found for chip 0
. n  f2 d" }- d9 RBad block table not found for chip 0
4 t/ ?: n" R$ w. ]2 O' e  a0 hBad block table written to 0x00001ffe0000, version 0x01
5 `) ^% i, D5 fBad block table written to 0x00001ffc0000, version 0x01
) ^& ]) {( f3 O8 jIn:    serial
  S& O' z1 L. Z# |  |# |8 BOut:   serial
6 J! v/ o  x" A) |7 \Err:   serial
2 p+ c+ y; `1 r4 `. a/ T4 zDefault using MAC address from environment
5 ^6 u  l, V4 jNet:   DaVinci-EMAC$ G6 g2 V( ^% [9 J$ Y: P
Hit any key to stop autoboot:  04 z; P1 Y; r4 i( Y# c% z( W

5 w. C. p. Q) a+ ^" tLoading from nand0, offset 0x120000
5 R3 C& k' N, P7 s% G% H   Image Name:   Linux-3.3.0
+ j1 u' G: ~4 S7 _' O   Image Type:   ARM Linux Kernel Image (uncompressed)4 `$ _5 K, V! D) n* V
   Data Size:    2843400 Bytes = 2.7 MiB
/ K& Q9 x+ d4 M5 Y   Load Address: c0008000, P; D6 t$ i! v& H) r
   Entry Point:  c00080009 t2 l, G/ K. t2 w
## Booting kernel from Legacy Image at c0700000 ...( V- {( \) ]( ~+ L
   Image Name:   Linux-3.3.0$ ]: K+ H% a' F) o9 t
   Image Type:   ARM Linux Kernel Image (uncompressed)
$ \2 G. G$ o5 K& v   Data Size:    2843400 Bytes = 2.7 MiB
3 [* d- E! q% o7 z7 w   Load Address: c0008000
9 i+ ^2 v6 e6 r- s& N# w! U, m   Entry Point:  c0008000" _7 @6 c9 |3 U- T
   Verifying Checksum ... OK
7 Y( N; U5 e& h! z6 s+ d   Loading Kernel Image ... OK
9 x. Y: W! U- J2 J6 g; ^OK2 V2 Y* s! M. u& I" F
- ?* N/ J8 o* X5 G$ v! q/ ]
Starting kernel ...' m" a: H2 {1 J* D! q
0 f. o, e1 L0 U: R  P6 |! z7 O
Uncompressing Linux... done, booting the kernel.5 s5 }/ l# e5 w3 n
[    0.000000] Booting Linux on physical CPU 0
1 r" X1 U4 u' i[    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 2015
: q  a6 Y5 r6 t+ E7 c( K* }[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=000531776 O9 M  S/ Y1 r$ F( E6 ?
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
; j$ o! |8 X* K* y4 X2 f7 ?% v[    0.000000] Machine: DaVinci DA850/OMAP-L138/AM18x EVM
1 H1 ?! T0 N. `7 k/ c[    0.000000] Memory policy: ECC disabled, Data cache writeback
9 l* s* w) X- p& Q, }' \/ }[    0.000000]  =======> da850_evm_map_io!1 w! ^7 e& J1 Q$ p5 s  }) e
[    0.000000] BUG: mapping for 0x80000000 at 0xfffe0000 out of vmalloc space& a: [: i. F4 ~7 j
[    0.000000] DaVinci da850/omap-l138/am18x variant 0x13 T2 ]( ^$ D7 Z8 j* f

9 ~1 {' n6 N4 s( i8 w0 ~& W2 P: M
: k: K/ I) O: C0 N
8 q% M$ ^! M" u7 ]/ R......
9 R5 L- W5 y- e0 X' t5 D, S" ntarting Dropbear SSH server: [   17.173901] UBIFS error (pid 1063): ubifs_read_node: bad node length 4082, expected 3570
. k) [" G7 X$ E- M6 h[   17.182220] UBIFS error (pid 1063): ubifs_read_node: bad node at LEB 486:101360, LEB mapping status 1
% Y$ e4 m! P$ ][   17.191623] UBIFS error (pid 1063): do_readpage: cannot read page 22 of inode 3091, error -22& l0 [$ F) m3 }( x2 B! W
[   17.202389] UBIFS error (pid 1063): ubifs_read_node: bad node length 4082, expected 3570) r% d( a' A- r! m. \9 z' V1 h
[   17.210675] UBIFS error (pid 1063): ubifs_read_node: bad node at LEB 486:101360, LEB mapping status 1- {, Y9 S. _2 l1 X, R( g
[   17.220069] UBIFS error (pid 1063): do_readpage: cannot read page 22 of inode 3091, error -222 p6 z9 C7 U1 ~) g! O( h) U
/etc/rc5.d/S10dropbear: line 70:  1063 Bus error               start-stop-daemon -S -x "$DAEMON" -- $KEY_ARGS -p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
9 H/ S# h/ O/ xStarting telnet daemon.
/ F7 o* `! g# h* L9 d
0 d' K; J, u3 s' A+ u......5 r$ G: ]" C4 R/ C9 P
Stopping Bootlog daemon: bootlogd.
. \! u( O% B% I
" K' i% S2 D: E$ F4 i/ x _____                    _____           _         _; I: m, t% T5 a( n) O6 X8 t
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
/ r# s, E# A* e: d! @2 U|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
! ]9 J; o( V) t1 V|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|9 h9 [9 `" j) z$ B
              |___|                    |___|, p8 n; q5 {2 b% d" B2 V
* Z- f' g8 {# E, Y" J
Arago Project http://arago-project.org tl ttyS2) G, Z: o! ]" }" C; F- k
! W4 F8 e) ^( i9 R. e  [& N
Arago 2013.06 tl ttyS2
, s$ }) {  d7 q' ?. J! n; b. J" \9 U' a4 C. M3 q. Z+ f1 E
tl login: root (automatic login)
/ ?& A9 ?* \' x0 Q! V
/ H, C; b# k. t6 E4 nroot@tl:~#" m' k" Q% X' L, W4 d3 D
$ [& I+ `- S8 L$ G4 Z( `! l+ v

作者: teddy    时间: 2015-7-21 13:54
16C554串口芯片是连接在emifa总线,nand flash也是连接emifa总线,有可能被影响了。
作者: custar    时间: 2015-7-21 14:51
teddy 发表于 2015-7-21 13:542 ^: {& Z. B$ n& [* p8 B* [
16C554串口芯片是连接在emifa总线,nand flash也是连接emifa总线,有可能被影响了。 ...

5 K3 t" ^) L4 `/ T) ]$ @- d( A会是数据线影响,还是片选之间干扰,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  k* J3 y5 U9 f. q4 _
可以参考创龙的多串口模块TL16CP754,就是通过emifa扩展串口,相应的驱动源码,例程都是提供的。 ...

* Z* C" A) H: \2 _- ~! uEMIF相关配置应该是没问题的,spansion的片子在延长总线时序,增加时钟之后,UBIFS逻辑坏块试了1000次反复满规格擦写不会出现,但是某些核心板还是会出现重启后内核bad crc,一般是在更改系统里文件并reboot之后出现,这时在u-boot中reset,又正常了,但是还是会出现在8 ]6 G1 x2 m* R, Z& a
Starting kernel ...4 A4 L- M6 l9 `! p8 {$ ^- e
Uncompressing Linux... done, booting the kernel.之后卡住的现象!




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