uboot 移植出现Verifying Checksum ... Bad Data CRC

大王我来巡山啦 科大讯飞 架构师  2011-02-23 10:00:19
移植uboot时,将内核通过tftp下载到内存可以正常启动.
可是当我尝试将内核烧写到nandflash时,就出现了Verifying Checksum ... Bad Data CRC的错误,我想应该是没有读到内核或者只读到了部分内核.
我是参考 牛人"黄刚"的日志来做的,用的开发板完全和他的一样.我也试过完全按照他的博客日志来做,可是还是起不来.很是苦恼,哪位GG知道的,恳请指点一下,不胜感激...

黄刚的日志:http://blogold.chinaunix.net/u3/101649/showart_2126764.html

有关信息如下:

====================================================================================
环境变量:
[MY2440]#printenv
bootdelay=3
baudrate=115200
ethaddr=08:00:3e:26:0a:5b
ethact=dm9000
filesize=1D2D34
fileaddr=30008000
gatewayip=192.168.1.1
netmask=255.255.255.0
ipaddr=192.168.1.105
serverip=192.168.1.2
stdin=serial
stdout=serial
stderr=serial
bootcmd=nand read 0x30008000 0x50000 0x00200000;bootm 0x30008000

Environment size: 294/65532 bytes

================================================================================
正常启动信息:
[MY2440]#bootm 0x30008000
## Booting kernel from Legacy Image at 30008000 ...
Image Name: linux-2.6.30.4
Created: 2011-02-22 1:47:22 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1912052 Bytes = 1.8 MB
Load Address: 30008000
Entry Point: 30008040
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
............................................................. done, booting the
kernel.
Linux version 2.6.30.4 (root@stallion) (gcc version 4.4.3 (ctng-1.6.1) ) #4 Mon
Feb 21 09:47:01 CST 2011
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=00007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Warning: bad configuration page, trying to continue
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)

====================================================================
再次将内核镜像拷贝到内存,擦除nandflash并将内核写到nandflash
[MY2440]#tftp 0x30008000 uImage.img
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
operating at unknown: 0 mode
Using dm9000 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.105
Filename 'uImage.img'.
Load address: 0x30008000
Loading: T T #T ################################################################

#################################################################
#
done
Bytes transferred = 1912116 (1d2d34 hex)
[MY2440]#nand erase 0x50000 0x200000

NAND erase: device 0 offset 0x50000, size 0x200000
Erasing at 0x2 -- 2408448% complete.ete.
OK
[MY2440]#nand write 0x30008000 0x50000 0x200000

NAND write: device 0 offset 0x50000, size 0x200000
Writing at 0x4000 -- 2097152 bytes written: OK


=========================================================================
重新启动开发板时,信息为:
U-Boot 2009.08 ( 2鏈?16 2011 - 17:32:06)

DRAM: 64 MB
Flash: 0 kB
NAND: NAND_ECC_NONE selected by board driver. This is not recommended !!
64 MiB
In: serial
Out: serial
Err: serial
Net: dm9000
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x50000, size 0x200000
2097152 bytes read: OK
## Booting kernel from Legacy Image at 30008000 ...
Image Name: linux-2.6.30.4
Created: 2011-02-22 1:47:22 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1912052 Bytes = 1.8 MB
Load Address: 30008000
Entry Point: 30008040
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
...全文
1117 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
黄刚日志里有下面一些内容,让我很是不解

mkimage -n 'linux-2.6.30.4' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d zImage uImage.img

为什么 mkimage的指定image的载入地址和内核入口地址一样?



③、Nand Flash的分区。我们查看内核在arch/arm/plat-s3c24xx/common-smdk.c中的分区情况如下:
起始地址 结束地址

uboot : 0x00000000 0x00030000
param : 0x00030000 0x00040000 //注意这个环境变量的地址范围要与上一节补充内容中配置的CONFIG_ENV_OFFSET一致
kernel: 0x00050000 0x00200000
root : 0x00250000 0x03dac000

这个分区它是如何找到的?


=====================================
④、设置修改u-boot的启动参数,在u-boot命令行下输入:
//设置启动参数,意思是将nand中0x50000-0x00200000(和kernel分区一致)的内容读到内存0x31000000中,然后用bootm命令来执行

set bootcmd 'nand read 0x31000000 0x50000 0x00200000;bootm 0x31000000'

saveenv //保存设置

为什么要将nand read 到地址0x31000000处?

================================================
⑤、把uImage.img用tftp下载到内存中,然后再固化到Nand Flash中,操作和执行图如下:
tftp 0x30000000 uImage.img //将uImage.img下载到内存0x30000000处

nand erase 0x50000 0x200000 //擦除nand的0x50000-0x200000的内容

nand write 0x30000000 0x50000 0x200000 //将内存0x30000000处的内容写入到nand的0x50000处
为什么又将uImage.img下载到内存0x30000000处?

恳请明白的言语一声。。。


回复
相关推荐
发帖
Linux_Kernel
创建于2007-08-27

4113

社区成员

Linux/Unix社区 内核源代码研究区
申请成为版主
帖子事件
创建了帖子
2011-02-23 10:00
社区公告
暂无公告