天嵌 ARM开发社区

 找回密码
 注册
查看: 2184|回复: 8

移植kernel出错

[复制链接]
clever0725 发表于 2010-1-12 10:02:22 | 显示全部楼层 |阅读模式
移植的kernel
没有到yaffs2文件这一步
就是按手册上的
在uboot下按7 下载到ram测试
结果死了 如下 请问什么原因

## Starting application at 0x30000000 ...

Uncompressing Linux...

ran out of input data

-- System halted
 楼主| clever0725 发表于 2010-1-12 10:03:59 | 显示全部楼层
还有个问题
移植手册上移植文件系统的时候是 动态的还是静态的 ?
亚瑟王 发表于 2010-1-12 14:48:06 | 显示全部楼层
1、在SDRAM中执行运行内核镜像,需要使用t命令,否则会出错;
2、文件系统是“动态”“静态”这个怎么理解?yaffs文件系统是可读写的文件系统。
 楼主| clever0725 发表于 2010-1-13 10:00:10 | 显示全部楼层
我的nand分区如下
static struct mtd_partition smdk_default_nand_part[] = {
    [0] = {
        .name    = "------U-Boot2009.08------",
        .size    = 0x00040000,
        .offset    = 0,
    },
    /*
    [1] = {
        .name    = "------Parme area------",
        .offset = 0x00040000,
        .size    = 0x00010000,
    },
    */
    [1] = {
        .name    = "------Kernel-2.6.30.4------",
        .offset = 0x00200000,
        .size    = 0x00200000,
    },
    [2] = {
        .name    = "------Yaffs2-FileSystem------",
        .offset    = 0x00400000,
        .size    = 0x03BF8000,
    },

启动后显示如下
Scanning device for bad blocks
Bad eraseblock 1623 at 0x00000cae0000
Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "------U-Boot2009.08------"
0x000000200000-0x000000400000 : "------Kernel-2.6.30.4------"
0x000000400000-0x000003ff8000 : "------Yaffs2-FileSystem------"
mtd: partition "------Yaffs2-FileSystem------" doesn't end on an erase block -- force read-only

请问这个算错误吗?force read-only 警告
 楼主| clever0725 发表于 2010-1-13 10:00:52 | 显示全部楼层
我的nand分区如下
static struct mtd_partition smdk_default_nand_part[] = {
    [0] = {
        .name    = "------U-Boot2009.08------",
        .size    = 0x00040000,
        .offset    = 0,
    },
    /*
    [1] = {
        .name    = "------Parme area------",
        .offset = 0x00040000,
        .size    = 0x00010000,
    },
    */
    [1] = {
        .name    = "------Kernel-2.6.30.4------",
        .offset = 0x00200000,
        .size    = 0x00200000,
    },
    [2] = {
        .name    = "------Yaffs2-FileSystem------",
        .offset    = 0x00400000,
        .size    = 0x03BF8000,
    },

启动后显示如下
Scanning device for bad blocks
Bad eraseblock 1623 at 0x00000cae0000
Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "------U-Boot2009.08------"
0x000000200000-0x000000400000 : "------Kernel-2.6.30.4------"
0x000000400000-0x000003ff8000 : "------Yaffs2-FileSystem------"
mtd: partition "------Yaffs2-FileSystem------" doesn't end on an erase block -- force read-only

请问这个算错误吗?force read-only 警告
 楼主| clever0725 发表于 2010-1-13 10:02:21 | 显示全部楼层
你好
文件系统没做前
我的内核是下载到0x200000 就是2M的地方 下完后我执行命令bootm 0x30000000  能启动一次  复位后同样的命令就启动不了了
请问set bootcmd 'nand read 0x31000000 0x50000 0x00200000;bootm 0x31000000' 这句话里的 0x31000000是哪里来的

还有是不是u-boot 和 内核有个约定的地址 从哪里开始启动内核的?
我试了很多 都不行 0x3200 0000 0x3000 0000 0x3100 0000 0x30000100
只有第一次bootm 0x3000 0000可以启动一次 可是我都是已经固化在nandflash上了啊 ?  多谢指教
亚瑟王 发表于 2010-1-13 12:17:31 | 显示全部楼层
你把uImage读到sdram的0x31000000这个位置,然后跳到这个位置去启动内核,这个是uImage镜像的入口地址。
如果你使用是我们提供的uboot,在我们提供的uboot中有个命令t用于在内存中测试zImage格式的镜像的。
 楼主| clever0725 发表于 2010-1-13 13:52:30 | 显示全部楼层
你们提供的U-BOOT没有T这个命令

我也试过了
3下载zImage内核
然后8执行
也是同样的问题
而且配对码是168 我的系统移植后是1008
你先回答我 4楼的问题那个分区的问题
mtd: partition "------Yaffs2-FileSystem------" doesn't end on an erase block -- force read-only  这里有没有错?

内核是按照3
[3] Download Linux Kernel to Nand Flash烧进去的   地址是2M开始处 大小2M

yaffs2是在你们U-BOOT中按5  地址是4M开始处

[5] Download CRAMFS image to Nand Flash
烧进去的

现在出来的还是
FAT: unable to read boot sector
VFS: Cannot open root device "mtdblock2" or unknown-block(31,2)
Please append a correct "root=" boot option; here are the available partitions:
1f00             256 mtdblock0 (driver?)
1f01            2048 mtdblock1 (driver?)
1f02           61408 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

???文件系统要怎么才能连接得到 ???
亚瑟王 发表于 2010-1-14 14:40:38 | 显示全部楼层
1、yaffs是可读写的,所以,你的信息显示read-only是不行的;
2、烧写yaffs是使用命令6,而不是使用命令5。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

GMT+8, 2024-10-6 22:26 , Processed in 1.017617 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

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