Linux Bootup issues with U-boot

1.Bad Magic Number 
## Booting image at 33000000 ...
Bad Magic Number
OMAP5912 OSK # (tftp下载好kernel的uImage后就停止在这,不能启动kernel)

问题原因:启动参数设置错误,0x30000000处不可以执行。

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

2.启动停止在"Starting 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)
   Data Size:    2025844 Bytes =  1.9 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
OK
Starting kernel ...   (卡在这里)

问题原因:多半是kernel没编译成功。
确认configure参数是否配置正确,是否选择了正确的目标编译平台,如smdk2410等。

3.不能启动kernel
Starting kernel ...
Uncompressing Linux.........................................................
.................... done, booting the kernel.

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

4.不能挂载nfs
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 port of RPC 100003/2 on 192.168.167.170
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 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)

问题原因:这种情况通常是nfs配置问题。

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

5.文件系统不能启动问题
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 port of RPC 100003/2 on 192.168.167.170
Looking up port of RPC 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)没有。
注:运行一个busybox文件系统至少需要如下几个库:
ld-linux.so.x
libc.so.6
libcrypt.so.x
较新版本的busybox可能还需要
libm.so.6
libgcc_s.so.x
(x为版本号)

6.文件系统不能启动问题2
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 port of RPC 100003/2 on 192.168.167.170
Looking up port of RPC 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的连接文件,少拷了库文件。

8.不能获得帐户UID信息
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"

问题原因:
情况一:系统帐户验证出现问题.怀疑是调用getuid、getguid时并没有返回正确值,可能是缺少帐户验证相关库,实际排查后发现,缺少libnss_files库。拷贝交叉编译器的libnss_files库到文件系统后,启动文件系统成功。
情况二:系统没有root帐号。可以由whoami命令看出。
手动创建帐号。
#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只是用来设置一些随机启动的参数,对文件能否正常运行关系不大。
注:这个不是错误,是偶然发现! :)

 

 

第一种:

Uncompressing Linux........................................................................................ done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x0000012f).

Available machine support:

ID (hex)        NAME
000003a2        LogicPD PXA270 Card Engine

Please check your kernel config and/or bootloader.

这个错误是没选对板子类型所致 ,我的板子是Intel HCDDBBVA0 (Mainstone),而在内核中却选成了

LogicPD PXA270 ,这个就是问题所在了

第二种:


停在
  device=eth0, addr=192.168.1.200, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.1.200, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=192.168.1.100, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.100
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
Looking up port of RPC 100005/1 on 192.168.1.100
VFS: Mounted root (nfs filesystem).
Freeing init memory: 92K

2.6内核,不加eabi的结果就是这样

Kernel Features  ---> [*] Use the ARM EABI to compile the kernel选上才是王道

第三种:

 

nfs死也连不上,但nfs服务器是好的,这有一种情况,就是linux宿主机是安在windows的虚拟机下,这是连不上nfs的原因很可能是卡巴斯基,我见过这样的……,卡巴能让你出现的状况如同网线没插一样,但居然能ping通,就是nfs不上,血的教训。ruixing倒不会。

第四种:

blob> boot
Saving param to flash
/
Starting kernel ...

Uncompressing Linux........................................................................................ done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x0000012f).

Available machine support:

ID (hex)        NAME
00000196        Intel HCDDBBVA0 Development Platform (aka Mainstone)

Please check your kernel config and/or bootloader.

选对板子了也不认,这是需要在./arch/arm/boot/compressed/head-xscale.S文件最末添上

 #ifdef  CONFIG_MACH_MAINSTONE
        mov     r7, #(MACH_TYPE_MAINSTONE & 0xff)
        orr     r7, r7, #(MACH_TYPE_MAINSTONE & 0xff00)
 #endif

第五种:

停在

blob> boot
Saving param to flash
/
Starting kernel ...

Uncompressing Linux....................................................................................... done, booting the kernel.

PXA serial port support这项没选,在设备-》字符设备下,关于pxa串口驱动没选

所以,在编内核之前先做make mainstone_defconfig是很有必要的

至于启动参数的事就不说了

boot root=/dev/nfs rw nfsroot=192.168.1.100:/rootfs ip=192.168.1.200::::: console=ttyS0,38400 netmac=00:cf:0a:be:04:25 mem=64M nohalt

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值