天嵌 ARM开发社区

 找回密码
 注册
查看: 3174|回复: 2

内核引导的问题?求帮助???

[复制链接]
gongping11 发表于 2011-10-5 14:45:37 | 显示全部楼层 |阅读模式
u-boot移植的差不多了,但是发现最严重的问题出现了,移植好的u-boot不能引导内核,查了一些帖子,但是都出不来!特来向高手请教!!


关于u-boot中两个传递参数的命令我也添加了,但是还是不能引导。我的具体思路是将以前移植好的zImage.bin 直接加载到内存中,然后运行就可以了,但是好像不行。命令是直接用go。但是好像不行。

u-boot@SMDK2440 # tftpboot 0x30000000 zImage.bin                                      
dm9000 i/o: 0x20000300, id: 0x90000a46                                                
DM9000: running in 16 bit mode                                                        
MAC: 0a:1b:2c:3d:4e:5f                                                               
operating at unknown: 0 mode                                                         
Using dm9000 device                                                                  
TFTP from server 192.168.10.154; our IP address is 192.168.10.122                     
Filename 'zImage.bin'.                                                               
Load address: 0x30000000                                                              
Loading: T #################################################################         
         #################################################################            
         ############################                                                
done                                                                                 
Bytes transferred = 2305436 (232d9c hex)
u-boot@SMDK2440 # go 0x30000000                                                      
## Starting application at 0x30000000 ...                                             
Uncompressing Linux...................................................................
                                                                                      
crc error                                                                             
                                                                                      
-- System halted
这个问题我找了一些但是都不行,放弃了这种方法。


我又采用了bootm这个命令来实现,但是还是不行。
u-boot@SMDK2440 # tftpboot 0x30000000 zImage.bin                                      
dm9000 i/o: 0x20000300, id: 0x90000a46                                                
DM9000: running in 16 bit mode                                                        
MAC: 0a:1b:2c:3d:4e:5f                                                               
operating at unknown: 0 mode                                                         
Using dm9000 device                                                                  
TFTP from server 192.168.10.154; our IP address is 192.168.10.122                     
Filename 'zImage.bin'.                                                               
Load address: 0x30000000                                                              
Loading: T #################################################################         
         #################################################################            
         ############################                                                
done                                                                                 
Bytes transferred = 2305436 (232d9c hex)                                             
u-boot@SMDK2440 # bootm 0x30000000                                                   
Wrong Image Format for bootm command                                                  
ERROR: can't get kernel image!

关于机器码什么的应该不会出错,因为之前移植linux内核的时候我注意到了这个问题!
我查找了采用什么mkimage工具制作镜像的方式,认为自己的内核格式不对,需要添加头文件什么的,但是好像还是不对。
[root@Gong-Computer tftpboot]# mkimage -n 'Linux-2.6.20.3' -A arm -O linux -T kernel -C none -a 0x30000000 -e 0x30000000 -d zImage.bin zImage.img
Image Name:   Linux-2.6.20.3
Created:      Wed Oct  5 14:40:05 2011
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2305436 Bytes = 2251.40 kB = 2.20 MB
Load Address: 30000000
Entry Point:  30000000

u-boot@SMDK2440 # tftpboot 0x30000000 zImage.img                                      
dm9000 i/o: 0x20000300, id: 0x90000a46                                                
DM9000: running in 16 bit mode                                                        
MAC: 0a:1b:2c:3d:4e:5f                                                               
operating at unknown: 0 mode                                                         
Using dm9000 device                                                                  
TFTP from server 192.168.10.154; our IP address is 192.168.10.122                     
Filename 'zImage.img'.                                                               
Load address: 0x30000000                                                              
Loading: #################################################################            
         #################################################################            
         ############################                                                
done                                                                                 
Bytes transferred = 2305500 (232ddc hex)                                             
u-boot@SMDK2440 # bootm 0x30000000                                                   
## Booting kernel from Legacy Image at 30000000 ...                                   
   Image Name:   Linux-2.6.20.3                                                      
   Created:      2011-10-05   6:40:05 UTC                                             
   Image Type:   ARM Linux Kernel Image (uncompressed)                                
   Data Size:    2305436 Bytes = 2.2 MiB                                             
   Load Address: 30000000                                                            
   Entry Point:  30000000                                                            
   Verifying Checksum ... OK                                                         
   XIP Kernel Image ... OK                                                            
OK                                                                                    
                                                                                      
Starting kernel ...
                                                                  
                                                                                      
undefined instruction                                                                 
pc : [<30000028>]          lr : [<33f98814>]                                          
sp : 33f3fb58  ip : 0000000c     fp : 00000b4e                                       
r10: 33f3ffc4  r9 : 30000000     r8 : 000000a0                                       
r7 : 000000a8  r6 : 33f412ad     r5 : 30000100  r4 : 00000000                        
r3 : 00000000  r2 : 30000100     r1 : 000000a8  r0 : 56190527                        
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32                                          
Resetting CPU ...                                                                     
                                                                                      
resetting ...   
                                                                     
                                                                                      
                                                                                      
U-Boot 2010.06 (Oct 05 2011 - 13:50:53)                                               
                                                                                      
DRAM:  64 MiB                                                                        
Flash: 2 MiB                                                                          
NAND:  256 MiB                                                                        
In:    serial                                                                        
Out:   serial                                                                        
Err:   serial                                                                        
Net:   dm9000                                                                        
Hit any key to stop autoboot:  0                                                      
Unknown command 'boot_zImage' - try 'help'                                            
u-boot@SMDK2440 #

为了确保环境变量一样,我将出厂设置的环境变量复制了一份进行比较没有什么区别,我想知道我应该怎么处理?高手指点以下??
 楼主| gongping11 发表于 2011-10-5 19:01:47 | 显示全部楼层
怎么没有高手码?我搞了一个下午还是没有结果,有谁知道怎么搞??我把原厂的内核重新编译仍然处问题,不知道为什么拉??
回复

使用道具 举报

 楼主| gongping11 发表于 2011-10-9 09:51:24 | 显示全部楼层
重新做了一遍,还是出现这样的问题,高手给点意见!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2025-6-16 22:26 , Processed in 2.038102 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表