Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2092263
  • 博文数量: 288
  • 博客积分: 10594
  • 博客等级: 上将
  • 技术积分: 3469
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-27 19:27
文章分类

全部博文(288)

文章存档

2012年(4)

2011年(30)

2010年(40)

2009年(32)

2008年(71)

2007年(79)

2006年(32)

分类: LINUX

2008-10-22 09:56:26

Starting kernel ...

参照网上一些资料后,决定通过tftp把image下载到0c008000,然后bootm,步骤和显示如下:

Mj=> bootm c008000
## Booting image at 0c008000 ...
Image Name: Linux-2.4.20.8
Created: 2006-06-30 2:35:33 UTC
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 637682 Bytes = 622.7 kB
Load Address: 0c008000
Entry Point: 0c008000
Verifying Checksum ... OK
Uncompressing Kernel Image ... Error: inflate() returned -3
GUNZIP ERROR - must RESET board to recover

后来把image通过tftp下载到0c007f'c0,然后bootm,错误一样,不知怎么回事?恳请各位大哥帮忙!!

____________________________________________________________________________________
前面有关于这个问题的帖子,可以参考一下。

我的调试经验如下:

1. kernel的启动参数设置正确与否 ?
2. kernel的entry point是否正确,比如对于ARM,可能会使用0x30008000这个地址,uImage会在zImage前加0x40字节,因此,应该将uImage下载到内存的0x30007FC0(0x30008000 - 0x40)处 ;
3. linux kernel有没有配置好,比如支持console;
4. 对于一些可以变频的MCU,如s3c2410,需要检查一下u-boot与kernel中设置的CPU频率是否一致,否则无法在u-boot启动的shell中看到kernel的启动信息;
5. 如果按上面做了还都不行,在确保上面都正确的情况下,直接使用zImage启动,如:
tftp 30008000 zImage ; go 30008000

从你的调试信息来看,zImage还没有解压,可能是2中的entry pont地址不对.


__________________________________________________________________________________

entry point address需要在mkimage时指定,另外,还得根据你的板子的地址定义。
u-boot中也有一个有关kernel的地址设置,在u-boot/board/board_name/config.mk文件中,比如对于smdk2410 :

#
# SMDK2410 has 1 bank of 64 MB DRAM
#
# 3000'0000 to 3400'0000
#
# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000
# optionally with a ramdisk at 3080'0000
#
# we load ourself to 33F8'0000
#
# download area is 3300'0000
#


TEXT_BASE = 0x33F80000

这个地址也需要根据你的板子定义。
__________________________________________________________________________________
多谢各位大侠指点,重新配置了kernel和修改启动参数之后终于可以启动内核了:)
也就是说,如果启动参数不对printk(linux_banner);还是不会运行,看来我对启动环节代码理解还是有问题,需要好好再读一下。

不过在挂载ramdisk时出现新的问题:
RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (ramdisk too small?) (-28 != 32768)

ramdisk是自己做的,可以mount,但不知道有没有其它问题,启动参数是:
"initrd=0x30800000,0x200000 root=/dev/ram init=/linuxrc console=ttyS0,115200"

另外在make menuconfig 中的ramdisk选项里面有个default ram disk size是什么意思,会不会与这个有关,我就用的默认值4096,

__________________________________________________________________________________

阅读(22008) | 评论(2) | 转发(1) |
给主人留下些什么吧!~~

dezhihuang2014-08-12 14:43:07

http://blog.sina.com.cn/s/blog_6340cd9c010106pu.html

dezhihuang2014-08-12 14:42:59

http://blog.sina.com.cn/s/blog_6340cd9c010106pu.html