嵌入式开发者社区

标题: 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错误,掉电重启后可以正常' _" L4 C( C, {2 D7 ^5 a2 `

8 d: h( T2 L) Q' {进系统但是SSH应用程序报ubifs读node错误,这种现象会不会是u-boot的bug, 日志文件如下:& l- {6 g6 ]$ |* M+ G" h

$ ]+ `+ c3 {9 A7 X0 f% Y  [9 u# C0 C: K$ c. ^! C
U-Boot 2012.04.01-00054-g9a6dfff (Nov 04 2014 - 22:07:15)7 t7 a( }2 h" Z) T0 U

$ e2 O% |0 W4 }! b6 t' D& q  g6 hI2C:   ready! G- m3 F* q& L8 m5 I! c
DRAM:  128 MiB# G5 i% j/ m7 A6 [3 h4 m* m0 \
WARNING: Caches not enabled
! r+ v; d0 S2 E3 B, E# RNAND:  512 MiB8 a0 L" D) w" I- ?) x8 ?
MMC:   davinci: 0! g0 n. T' I3 l. d
Bad block table not found for chip 0
/ r3 v4 j' w* BBad block table not found for chip 0
- h3 J0 y/ D. T) h2 Q  ^/ qBad block table written to 0x00001ffe0000, version 0x01* Z% [$ a1 j7 i2 i) O2 h
Bad block table written to 0x00001ffc0000, version 0x01
. |9 D# a% F: D6 F2 x+ r/ FIn:    serial
3 |5 `2 @! {2 d& p( L, }Out:   serial
* ?2 [0 e, ^$ O9 C. L# QErr:   serial
4 S7 F0 D5 i; E. v! QDefault using MAC address from environment. o  M5 f/ d# c/ U
Net:   DaVinci-EMAC
' D$ d+ f8 ]* r+ K- NHit any key to stop autoboot:  0
7 h' k2 H4 @' D8 ^, n2 _- G
  N' A; r0 v/ \5 S3 gLoading from nand0, offset 0x1200002 {3 X" S% l! i: J# L. z7 ^
   Image Name:   Linux-3.3.0% j6 S# o2 z/ e! b* q5 D
   Image Type:   ARM Linux Kernel Image (uncompressed)
1 |7 S1 s& u3 d, m$ e   Data Size:    2843400 Bytes = 2.7 MiB9 F- u8 Z& r; {4 s+ u% n) |" V& ?
   Load Address: c0008000, ^! T/ ^/ l1 F5 h( o# l
   Entry Point:  c0008000
7 C5 `- k/ ~  w7 m- }3 n! X; z## Booting kernel from Legacy Image at c0700000 ...8 i7 `; U, W- v- s' s9 y" \
   Image Name:   Linux-3.3.0
, E3 E4 \( Y9 u% _5 o   Image Type:   ARM Linux Kernel Image (uncompressed)
* i% ]% l$ ~) ]   Data Size:    2843400 Bytes = 2.7 MiB9 J9 E. V4 w, @  U$ Y
   Load Address: c00080008 p5 u. x. c) W, Y6 z
   Entry Point:  c0008000: i3 b- r3 f2 s0 m' I# u
   Verifying Checksum ... Bad Data CRC, U) b2 U& m! M
ERROR: can't get kernel image!+ @1 |  ^) |2 y0 ]
U-Boot > Nand boot...7 J% R- g3 L$ q& }, B% }. {

! I5 y, M% U2 m4 ?6 W* E
' V! J4 ?' W6 RU-Boot 2012.04.01-00054-g9a6dfff (Nov 04 2014 - 22:07:15); u% _. h0 ^6 s# S, y, m. g

7 m. {* {3 N. z7 F% F; pI2C:   ready" g; E- {5 {4 V2 P0 z" G
DRAM:  128 MiB
+ @  u0 Q+ i2 i2 c( \: QWARNING: Caches not enabled
4 I3 `6 U1 _7 t. R& P8 v7 WNAND:  512 MiB& W  ^. o; G0 }6 c- r5 N4 O
MMC:   davinci: 0
* B! `$ A5 y4 G, dBad block table not found for chip 0& f( N/ b! L8 @* P" k3 r& p1 Q+ f
Bad block table not found for chip 0
+ A+ F: w, N- }. J. MBad block table written to 0x00001ffe0000, version 0x015 J- ?! A$ t- k& D# M/ ^
Bad block table written to 0x00001ffc0000, version 0x010 B+ m  v( B& H6 ]( ^2 [
In:    serial7 N' G: v8 d0 S1 C$ J
Out:   serial
. a4 \% t. r; ?7 _Err:   serial- Y/ V. \) j) |: L: T% C. M
Default using MAC address from environment
% t% \5 G+ i- J) ~0 I9 ~Net:   DaVinci-EMAC
/ M* v) ~3 h) yHit any key to stop autoboot:  0
) y% X4 h/ K2 I3 Z
& y1 |: t/ _- y% wLoading from nand0, offset 0x120000
& t. d" x  S" {2 f   Image Name:   Linux-3.3.0# I$ J7 z+ Q1 P9 [/ O# V
   Image Type:   ARM Linux Kernel Image (uncompressed)) f/ o1 y/ w1 `# o" k
   Data Size:    2843400 Bytes = 2.7 MiB: \9 O1 U# f6 T2 _: h
   Load Address: c0008000
* m+ s: f  J# A' D. e5 @   Entry Point:  c0008000& [, ~8 }: K/ }, Z) E- L" y% h
## Booting kernel from Legacy Image at c0700000 ...
- [- B# I' s# M) j/ Q: D4 ]   Image Name:   Linux-3.3.0
/ F% X4 k3 P$ |" M. I; ]6 e   Image Type:   ARM Linux Kernel Image (uncompressed)2 y7 I; ]2 F6 }% u# n" {) ^3 ^) ~
   Data Size:    2843400 Bytes = 2.7 MiB
6 M. P. J- u! F7 d3 a   Load Address: c0008000
. X  M8 s, |* h" N/ W# h- n   Entry Point:  c0008000
0 V, H( w1 d3 ?$ J# V   Verifying Checksum ... OK
6 f2 Y7 v3 U) t" {5 r$ i# _  P; `" v   Loading Kernel Image ... OK1 D( x( W3 I. b% a
OK7 q& t- T# Z4 N% n5 O7 @" L

( T5 W2 @6 O6 M6 w! N& PStarting kernel ...
* t/ `7 _- x  J2 X
  ^. g" f: G, Z  A  F! O% x( OUncompressing Linux... done, booting the kernel.% I: k+ Z3 c: }
[    0.000000] Booting Linux on physical CPU 06 {7 s8 @) d* }! p( @% v% L
[    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
6 V# V1 q2 n3 S1 x[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
% F$ p" ?5 p3 M* e' V[    0.000000] CPU: VIVT data cache, VIVT instruction cache
2 a( {0 s4 B# ?4 e# N: u[    0.000000] Machine: DaVinci DA850/OMAP-L138/AM18x EVM. T1 d/ E% g. R0 P
[    0.000000] Memory policy: ECC disabled, Data cache writeback" W8 r3 [( F! I; r8 y
[    0.000000]  =======> da850_evm_map_io!
0 `* G  v+ d3 A1 l$ L8 Q" m[    0.000000] BUG: mapping for 0x80000000 at 0xfffe0000 out of vmalloc space, W4 w; _6 `, B( R, z5 b
[    0.000000] DaVinci da850/omap-l138/am18x variant 0x1, D# v; e8 b) s( z

, P6 N" S9 C; ~- A" C5 u) k( _4 M# H$ c1 ]& M
5 O9 ^( |$ }0 X
......( u6 y/ R3 m. J8 n9 p( n
tarting Dropbear SSH server: [   17.173901] UBIFS error (pid 1063): ubifs_read_node: bad node length 4082, expected 3570  t. S/ r6 N+ a3 U1 t* w
[   17.182220] UBIFS error (pid 1063): ubifs_read_node: bad node at LEB 486:101360, LEB mapping status 17 s+ w$ X7 e! U5 N- @4 C% b
[   17.191623] UBIFS error (pid 1063): do_readpage: cannot read page 22 of inode 3091, error -22
0 G' d' x2 n- T' z  _[   17.202389] UBIFS error (pid 1063): ubifs_read_node: bad node length 4082, expected 3570
- |5 n! q0 \! `" I$ p* e$ s, K[   17.210675] UBIFS error (pid 1063): ubifs_read_node: bad node at LEB 486:101360, LEB mapping status 1  _! v; i% h  g6 g  U8 z
[   17.220069] UBIFS error (pid 1063): do_readpage: cannot read page 22 of inode 3091, error -22
) _, z7 w8 u# D! P) M5 D& L1 u/etc/rc5.d/S10dropbear: line 70:  1063 Bus error               start-stop-daemon -S -x "$DAEMON" -- $KEY_ARGS -p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
+ j* S7 l! [" }3 TStarting telnet daemon.
" E: [7 X4 {* k0 x! v( q, p$ }3 o
; t! ?: c0 E+ Q2 V) H6 d. Z' i......
" y+ c4 n: q" H: l& DStopping Bootlog daemon: bootlogd.
9 p* ]% G8 U0 o7 [0 w+ ^3 m0 J% f7 A* o3 P
_____                    _____           _         _* m; w! z. ~. Y( o% N
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_" k" ^' N2 H1 y, y3 a
|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
( F5 y2 f; w" |2 @. R|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|& q( n( v: Q3 ~3 `. }5 K) b
              |___|                    |___|+ g6 W& R& v0 O# @4 f3 f' C* y

8 \7 E, T& A, [% c4 f% b% W8 xArago Project http://arago-project.org tl ttyS2) m* Q7 Z" `( U( b' j3 u. Y3 U

; M0 r5 g" Z% E% X- g) B# E+ ~+ a- tArago 2013.06 tl ttyS2
; W4 m/ L8 R" j* K' w4 P
! D$ p7 L2 Z9 v* U; R! z; wtl login: root (automatic login)- [5 u& |& k8 h) v3 E7 a

; M4 ~5 F- d- nroot@tl:~#
- }7 Q9 [* Q+ o. L7 ?& s# ~- `
7 M. d* v, g( J; X6 l5 N  j
作者: teddy    时间: 2015-7-21 13:54
16C554串口芯片是连接在emifa总线,nand flash也是连接emifa总线,有可能被影响了。
作者: custar    时间: 2015-7-21 14:51
teddy 发表于 2015-7-21 13:54
4 f. s9 z* ]/ N0 `, _16C554串口芯片是连接在emifa总线,nand flash也是连接emifa总线,有可能被影响了。 ...

5 S$ k4 Q  N2 B' {, ?会是数据线影响,还是片选之间干扰,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% D0 K. V+ {( `9 j
可以参考创龙的多串口模块TL16CP754,就是通过emifa扩展串口,相应的驱动源码,例程都是提供的。 ...

5 X4 V# B1 r, L; F0 d/ c* e5 zEMIF相关配置应该是没问题的,spansion的片子在延长总线时序,增加时钟之后,UBIFS逻辑坏块试了1000次反复满规格擦写不会出现,但是某些核心板还是会出现重启后内核bad crc,一般是在更改系统里文件并reboot之后出现,这时在u-boot中reset,又正常了,但是还是会出现在
& e) Y, K7 f* |8 }Starting kernel .../ G  }0 W; m4 f$ ^
Uncompressing Linux... done, booting the kernel.之后卡住的现象!




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