• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : 内核引导yaffs2文件系统出错 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 9254
精华: 0
发帖: 44
金钱: 450 两
威望: 225 点
贡献值: 0 点
综合积分: 88 分
注册时间: 2009-09-23
最后登录: 2009-12-12
楼主  发表于: 2009-10-29 16:43

 内核引导yaffs2文件系统出错

管理提醒: 本帖被 qq2440 从 Linux技术交流专区 移动到本区(2010-02-08)
斑竹:我用uboot(已支持yaffs文件系统烧写)将yaffs2文件系统烧写到flash,同时使内核支持yaffs2文件系统。在引导的过程中出现如下错误。。
。。。。。。。
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
yaffs: auto selecting yaffs2
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 140K
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.
busybox版本是1.13.1,linuxrc自己写和用busybox编译出来的都不行,,还有就是有没有inittab都不行,,之前用同样方法做的cramfs就可以。。不知道怎么回事,,请斑竹给些建议。。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-10-29 17:27
先不要用yaffs作rootfs,可以用cramfs的文件系统先启动起来之后再手动mount一个yaffs2的文件系统,确保内核中的yaffs支持没有问题
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 9254
精华: 0
发帖: 44
金钱: 450 两
威望: 225 点
贡献值: 0 点
综合积分: 88 分
注册时间: 2009-09-23
最后登录: 2009-12-12
2楼  发表于: 2009-10-30 11:17
请教版主:如何cramfs的文件系统下挂载另一个分区中的yaffs文件系统?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-10-30 11:32

 回 2楼(stone) 的帖子

$mount -t yaffs/yaffs2 <MTD device containing yaffs/yaffs2 image> <mount point>
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 9254
精华: 0
发帖: 44
金钱: 450 两
威望: 225 点
贡献值: 0 点
综合积分: 88 分
注册时间: 2009-09-23
最后登录: 2009-12-12
4楼  发表于: 2009-10-30 11:57
我之前是这么做的
mount -t yaffs /dev/mtdblock4 /var/tmp出现错误
mount: Mounting /dev/mtdblock4 on /var/tmp failed: No such file or directory
但我的文件系统下有/var/tmp ,我在rcS中mkdir -p /var/tmp,
/bin/mount -n -t ramfs none /var
但我查看我的/dev目录下只有console ,null 这个是我手动建的,看不到mtdblock4,mtdblock3之类的东西,但是cat /proc/mtd有下面的信息
mtd0: 00040000 00020000 "uboot"
mtd1: 00020000 00020000 "param"
mtd2: 00200000 00020000 "kernel"
mtd3: 00a00000 00020000 "cramfs"
mtd4: 073a0000 00020000 "yaffs"
该怎么解决呢?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2009-10-30 12:27
如果你的cramfs文件系统里没有像mdev这样自动创建设备节点的东东,你可以在/dev目录下预先建好所有需要的节点。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 9254
精华: 0
发帖: 44
金钱: 450 两
威望: 225 点
贡献值: 0 点
综合积分: 88 分
注册时间: 2009-09-23
最后登录: 2009-12-12
6楼  发表于: 2009-10-30 13:20
如何使cramfs支持mdev这个东西,除了在编译busybox时支持它,还需要做其他的什么配置吗?如果是手动创建mtdblock4等这些节点,,那他们的设备号是什么呢?请斑竹再帮忙解答一下。。。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2009-10-30 13:41
如何使cramfs支持mdev这个东西,除了在编译busybox时支持它,还需要做其他的什么配置吗?

看busybox源代码目录的docs/mdev.txt
如果是手动创建mtdblock4等这些节点,,那他们的设备号是什么呢?

mtdblock的主设备号是31, mtdblock4的设备号是31:4。完整的设备和主设备号的mapping可以通过在开发板上运行cat /proc/devices查看
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 9254
精华: 0
发帖: 44
金钱: 450 两
威望: 225 点
贡献值: 0 点
综合积分: 88 分
注册时间: 2009-09-23
最后登录: 2009-12-12
8楼  发表于: 2009-10-30 14:54
版主:我按照你的办法试了一下,结果如下:
# mount -t yaffs /dev/mtdblock4 /var/tmp
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
yaffs: auto selecting yaffs2
block 2 is bad
block 3 is bad
block 4 is bad
block 5 is bad
block 6 is bad
block 7 is bad
block 8 is bad
。。。。
yaffs_read_super: isCheckpointed 0
# cd /var/tmp
# ls
lost+found
只有lost+found这个东西,,然后我又将cramfs烧到mtdblock4,结果可以挂载成功。。刚在网上查了半天,好多人都出现了这种情况,,是因为yaffs没有烧写成功吗?该从哪里入手解决呢?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
9楼  发表于: 2009-10-30 15:08

 回 8楼(stone) 的帖子

看起来应该是制作镜像或烧录的环节出了问题。确保你制作和烧录yaffs镜像和实际所用的NAND Flash相匹配(每个页512还是2048字节)
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go