天嵌 ARM开发社区

 找回密码
 注册
查看: 2897|回复: 10

u-boot移植过程中启动内核问题

[复制链接]
vanlos 发表于 2010-10-10 16:36:50 | 显示全部楼层 |阅读模式
最近按照网上唐智浩的u-boot-1.1.6的移植文档跟着操作,在NAND FLASH引导内核时出现以下错误
SMDK2410 # tftp 0x30000000 zImage-Q35.img
dm9000 i/o: 0x20000000, id: 0x90000a46
MAC: 0a:1b:2c:3d:4e:5f
TFTP from server 192.168.1.8; our IP address is 192.168.1.6
Filename 'zImage-Q35.img'.
Load address: 0x30000000
Loading: checksum bad
checksum bad
T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #############################################################
done
Bytes transferred = 2305500 (232ddc hex)

SMDK2410 # bootm 0x30000000
(……为省略部分)
……………………………………………………
……………………………………………………
block 747 is bad
block 943 is bad
block 1274 is bad
block 1275 is bad
block 1291 is bad
block 1382 is bad
block 1865 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 188K
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
Backtrace:
[<c003bfd4>] (dump_backtrace+0x0/0x10c) from [<c033fb0c>] (dump_stack+0x18/0x1c)

r7:00000000 r6:c04aff80 r5:c04af940 r4:c0478248
[<c033faf4>] (dump_stack+0x0/0x1c) from [<c033fb5c>] (panic+0x4c/0x124)
[<c033fb10>] (panic+0x0/0x124) from [<c00374f0>] (init_post+0xec/0x178)
r3:00000000 r2:c3885e00 r1:c04e6000 r0:c0407f9c
[<c0037404>] (init_post+0x0/0x178) from [<c000847c>] (kernel_init+0xcc/0xf4)
r5:c001ec50 r4:c001f06c
[<c00083b0>] (kernel_init+0x0/0xf4) from [<c004cf30>] (do_exit+0x0/0x620)
r7:00000000 r6:00000000 r5:00000000 r4:00000000

请问checksum bad由什么原因引起的?我分析内核启动时出示话没有成功,具体由于什么原因不是很清楚,希望大家帮忙解答下,感激不尽!!!zImage-Q35.img是天嵌光盘里面提供的zImage_Q35_2.6.30.4_20100531.bin在u-boot-1.1.6/tools/下执行
#mkimage -n 'linux-2.6.25.8' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d zImage zImage.img
得到的。

文档中说u-boot可以正常引导系统,前提是NAND FLASH中已经烧录好对应的文件系
统。这是不是用BUSYBOX制作的文件系统,要先烧写到NAND FLASH后在执行TFTP烧写内核、启动内核????

希望大家帮忙解答下,Vanlos在此谢谢各位了!!!
天嵌_support1 发表于 2010-10-10 18:23:27 | 显示全部楼层
你直接跳到内存执行刚刚下载的内核。
uboot里面传递过来的参数怎么给内核呢?
这样执行不行了呀
 楼主| vanlos 发表于 2010-10-10 21:56:34 | 显示全部楼层
2# embedsky_lxt


那应该怎么做呀?现在对这个还不是很熟悉,刚接触不久
konizhang 发表于 2010-10-11 04:28:34 | 显示全部楼层
你用SMDK2410 # tftp 0x32000000 zImage-Q35.img
SMDK2410 # bootm 0x32000000试试
因为你用mkimage生成img时入口地址为0x30008000 (0x8000=32k)
而你将img用tftp下载到0x30000000(而内核镜像会远大于32k),用bootm操作时会覆盖掉代码吧
machoe 发表于 2010-10-11 08:12:13 | 显示全部楼层
如果是天嵌的zImage内核,应该用boot_zImage命令就可以了。
天嵌_support1 发表于 2010-10-11 15:04:54 | 显示全部楼层
3# vanlos


嗯.....你先告诉我你想做什么?
maylag 发表于 2010-10-12 13:54:34 | 显示全部楼层
个人感觉,您会不会是文件系统有问题,或是烧写的地址不对。
 楼主| vanlos 发表于 2010-10-13 00:26:11 | 显示全部楼层
6# embedsky_lxt


我想移植下U-BOOT,到内核启动那块了,试下我修改的能不能引导启动内核
 楼主| vanlos 发表于 2010-10-13 00:27:52 | 显示全部楼层
4# konizhang


嗯,谢谢,我试试
天嵌_support1 发表于 2010-10-13 11:30:37 | 显示全部楼层
8# vanlos


你想移植一下Uboot,在我看来,你不是已经成功移植了么?
 楼主| vanlos 发表于 2010-10-13 23:06:53 | 显示全部楼层
10# embedsky_lxt


大概明白了,缺少文件系统,谢谢了哈
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

GMT+8, 2024-5-23 13:47 , Processed in 1.093750 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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