QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4336|回复: 4

请教:U-BOOT引导内核问题,急!

[复制链接]
发表于 2007-2-3 17:14:58 | 显示全部楼层 |阅读模式
我使用命令生成U-BOOT执行内核zImage.img
mkimage -n 'zImage' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d zImage zImage.img
下载后开机运行:

U-Boot 1.1.4 (Feb  1 2007 - 21:34:29)                                    

U-Boot code: 33F80000 -> 33F9C3C0  BSS: -> 33FA04A8                                                   
RAM Configuration:                  
Bank #0: 30000000 64 MB                       
Flash:  2 MB            
NAND:  64 MB/n*** Warning - bad CRC, using default environment                                                              

In:    serial            
Out:   serial            
Err:   serial            
Hit any key to stop autoboot:  0                                

NAND read: device 0 offset 1048576, size 3145728 ...  3145728 bytes read: OK                                                                           
## Booting image at 30008000 ...                                
   Image Name:   uImage                       
   Created:      2007-02-03   8:57:21 UTC                                         
   Image Type:   ARM Linux Kernel Image (uncompressed)                                                      
   Data Size:    957924 Bytes = 935.5 kB                                       
   Load Address: 30008000                        
   Entry Point:  30008000                        
   Verifying Checksum ... OK                           
   XIP Kernel Image ... OK                          

Starting kernel ...                  

data abort
pc : [<30008008>]    lr : [<33f95c10>]
sp : 33f07c64  ip : 33f07c54  fp : 33f07c98
r10: 33f07d0c  r9 : 00000001  r8 : 33f4ffdc
r7 : 33f9f2e4  r6 : 30008000  r5 : 00000000  r4 : 00000000
r3 : 30008000  r2 : 30000100  r1 : 000000c1  r0 : 00000000
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...



U-Boot 1.1.4 (Feb  1 2007 - 21:34:29)

U-Boot code: 33F80000 -> 33F9C3C0  BSS: -> 33FA04A8
RAM Configuration:
Bank #0: 30000000 64 MB
Flash:  2 MB
NAND:  64 MB/n*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
crne2410 #>

然后在运行
crne2410 #>go 0x30008040

crne2410 #> go 0x30008040
## Starting application at 0x30008040 ...
Uncompressing Linux.............................................................
... done, booting the kernel.

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

Available machine support:

ID (hex)        NAME
000000c1        SMDK2410

Please check your kernel config and/or bootloader.(不动)

请教这是啥原因啊,怎么修改啊?
谢谢!
发表于 2007-2-3 18:30:30 | 显示全部楼层
u-boot传参有问题。

修改内核使u-boot的go命令能够启动内核
找到并打开arch/arm/kernel/head.S文件,直接将s3c2410的参数赋给内核。在如下代码:
__INIT
.type        stext, %function
ENTRY(stext)
后面添加:
mov                r0, #0
mov                r1, #0xc1
ldr                r2, =0x30000100
保存后关闭该文件。

然后重新编译内核。当然也可以修改u-boot的源代码。具体怎么修改,你上网查一下吧
回复

使用道具 举报

 楼主| 发表于 2007-2-3 22:39:16 | 显示全部楼层
谢谢
回复

使用道具 举报

 楼主| 发表于 2007-2-4 09:57:38 | 显示全部楼层
zshxiong您好:
我按您的方法改了内核代码,可运行还是不行
U-Boot 1.1.4 (Feb  1 2007 - 21:34:29)

U-Boot code: 33F80000 -> 33F9C3C0  BSS: -> 33FA04A8
RAM Configuration:
Bank #0: 30000000 64 MB
Flash:  2 MB
NAND:  64 MB/n*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0

NAND read: device 0 offset 1048576, size 3145728 ...  3145728 bytes read: OK
## Booting image at 30008000 ...
Bad Magic Number
crne2410 #>

若运行go 0x30008000就可正常进入内核运行
crne2410 #> go 0x30008000
## Starting application at 0x30008000 ...
Uncompressing Linux........................................................(正常启动)
帮我分析一下
谢谢
回复

使用道具 举报

发表于 2007-2-5 14:59:21 | 显示全部楼层
bootm不能使用zImage
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-4-26 01:38 , Processed in 0.069817 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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