注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

deisp的博客

 
 
 

日志

 
 

嵌入式Linux启动过程中的问题积累_mikenoodle's home  

2008-07-22 11:04:38|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
liudefang888 |   | | 百度首页 | 百度空间 | 退出
嵌入式Linux启动过程中的问题积累
2008-05-15 15:28

1.Bad Magic Number

## Booting image at 33000000 ...

Bad Magic Number

OMAP5912 OSK # (tftp下载好kernel的uImage后就停止在这,不能启动kernel)

有的开发板sdram不是在0x33000000,所以不能把kernel uImage下载到0x33000000中运行如我之前的bootcmd参数为:setenv bootcmd tftpboot 33000000 uImage\; bootm 33000000但板子Omap5912的sdram地址在0x100000000,将参数改为setenv bootcmd tftpboot 10000000 uImage\; bootm 10000000后便可以启动kernel了

TFTP from server 192.168.167.170; our IP address is 192.168.167.15

Filename 'uImage'

Load address: 0x10000000

Loading: #################################################################

         #################################################################

done

Bytes transferred = 2025908 (1ee9b4 hex)

## Booting image at 10000000 ...

   Image Name:   Linux-2.6.18-mh8_pro500-versatil

   Image Type:   ARM Linux Kernel Image (uncompressed)

OK

确认configure参数是否配置正确,是否选择了正确的目标编译平台,如smdk2410等

Starting kernel ...

Uncompressing Linux.........................................................

.................... done, booting the kernel.

问题原因:可能是Bootargs参数设置错误,确认bootargs设置是否正确

eth0: link up

IP-Config: Complete:

      device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,

     host=192.168.167.15, domain=, nis-domain=(none),

     bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=

Looking up 100003/2 on 192.168.167.170

Root-NFS: Unable to get nfsd port number from server, using default

Looking up 100005/1 on 192.168.167.170

Root-NFS: Unable to get mountd port number from server, using default

mount: server 192.168.167.170 not responding, timed out

Root-NFS: Server returned error -5 while mounting /work/nfs/rootfs_bluetooth_omap

VFS: Unable to mount root fs via NFS, trying floppy.

VFS: Cannot open root device "nfs" or unknown-block(2,0)

Please append a correct "root=" boot option

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

确认uboot的bootargs参数里和nfs相关的ip地址信息设置是否正确,以及Host机/etc/exports配置无误,重起nfs服务,重新尝试连接另外还需要注意bootargs内console和mem两个参数的设置kernel2.6后console最好设置为ttySAC0,mem也要根据开发板实际情况设置正确

eth0: link up

IP-Config: Complete:

      device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,

     host=192.168.167.15, domain=, nis-domain=(none),

     bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=

Looking up 100003/2 on 192.168.167.170

Looking up 100005/1 on 192.168.167.170

VFS: Mounted root (nfs filesystem).

Freeing init memory: 128K

/sbin/initKernel panic - not syncing: Attempted to kill init!

问题原因:制作的文件系统缺少运行busybox所需的libcrypt.so库,新版本会有缺库提示,老版本(1.60)没有

ld-linux.so.x

libc.so.6

libcrypt.so.x

libm.so.6

libgcc_s.so.x

eth0: link up

IP-Config: Complete:

      device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,

     host=192.168.167.15, domain=, nis-domain=(none),

     bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=

Looking up 100003/2 on 192.168.167.170

Looking up 100005/1 on 192.168.167.170

VFS: Mounted root (nfs filesystem).

Freeing init memory: 128K

Kernel panic - not syncing: No init found. Try passing init= option to kernel.

问题原因:对比一个可用的文件系统后发现,缺少了ld-linux.so.x库,文件系统里只有ld-linux.so.x的连接文件,少拷了库文件

Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

Unknown username "root" in message bus configuration file

Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

Failed to start message bus: Could not get UID and GID for username "root"

情况一:系统帐户验证出现问题.怀疑是调用getuidgetguid时并没有返回正确值,可能是缺少帐户验证相关库,实际排查后发现,缺少libnss_files库拷贝交叉编译器的libnss_files库到文件系统后,启动文件系统成功

#vi /etc/passwd

root:x:0:0:root:/root:/bin/sh

kyo:x:500:500:kyo:/home/kyo:/bin/bash

#vi group

root:x:0:root

9.

Freeing init memory: 128K

init started: BusyBox v1.6.1 (2007-08-27 14:33:15 CST) multi-call binary

starting pid 834, tty '': '/etc/init.d/rcS'

Cannot run '/etc/init.d/rcS': No such file or directory

Please press Enter to activate this console.

发现没有/etc/init.d/rcS文件系统一样能正常启动看来rcS只是用来设置一些随机启动的参数,对文件能否正常运行关系不大




©2008 Baidu



引文来源  嵌入式Linux启动过程中的问题积累_mikenoodle's home

----------------------------
一键转贴,快速捕捉生活精彩,赢每周好礼!查看活动首页>>

  评论这张
 
阅读(161)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017