主题 : 菜鸟移植linux-2.3.32到mini2440的几个问题,请教高手 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 27740
精华: 0
发帖: 8
金钱: 40 两
威望: 8 点
综合积分: 16 分
注册时间: 2010-08-30
最后登录: 2010-10-19
楼主  发表于: 2010-09-01 22:53

 菜鸟移植linux-2.3.32到mini2440的几个问题,请教高手

首先是supervivi下的分区为
Supervivi> part show
Number of partitions: 4
name            :       offset          size            flag
------------------------------------------------------------
vivi            :       0x00000000      0x00040000      0
param           :       0x00040000      0x00020000      0
kernel          :       0x00060000      0x00300000      0
root            :       0x00360000      0x40000000      0

但是在内核按上述分区,老出现错误,说是
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             128 mtdblock1 (driver?)
1f02            3072 mtdblock2 (driver?)
1f03          127616 mtdblock3 (driver?)
1f04          131072 mtdblock4 (driver?)
用了很多种方法都不行,后来我改成了三个分区,竟然就可以了,分区如下所示:
0x000000000000-0x000000040000 : "supervivi"
uncorrectable error :
0x000000040000-0x000000360000 : "Kernel"
0x000000360000-0x000040360000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 128MiB 3,3V 8-bit"
-- size truncated to 0x7ca0000

但是这样以后,出现错误:
cannot run '/etc/init.d/rcS': No such file or directory
can't open /dev/tty4: No such file or directory
can't open /dev/tty3: No such file or directory
然后依次出现上面两句话,无限循环,搞了几天了,很是郁闷,请高手指点,谢谢。
级别: 新手上路
UID: 5613
精华: 0
发帖: 20
金钱: 100 两
威望: 20 点
综合积分: 40 分
注册时间: 2009-04-30
最后登录: 2017-09-13
1楼  发表于: 2010-09-02 11:09
1. 挂错mtd block了
2. root fs block结尾超过你nand flash实际大小
级别: 新手上路
UID: 27740
精华: 0
发帖: 8
金钱: 40 两
威望: 8 点
综合积分: 16 分
注册时间: 2010-08-30
最后登录: 2010-10-19
2楼  发表于: 2010-09-03 22:29
mtd: partition "root" extends beyond the end of device "NAND 128MiB 3,3V 8-bit"
-- size truncated to 0x7ca0000
这个它可以自动缩小到最小值的哦
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2010-09-03 23:37

 回 2楼(lihao6441506) 的帖子

虽然这不是导致文件系统无法正常启动的根本原因,但这的确是不正确的设置。
另外,saoyu说的第一点很对,内核命令行上的root=/dev/mtdblock2和supervivi的分区表是不一致的,这也是你为什么后来改成3个分区之后可以挂载文件系统的原因。也许在所谓的解决问题之后,你应该多想想问题是不是真的解决了。
"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: 5302
精华: 0
发帖: 110
金钱: 550 两
威望: 110 点
综合积分: 220 分
注册时间: 2009-04-18
最后登录: 2021-05-31
4楼  发表于: 2011-09-16 15:02
楼主的问题解决了吗?
版主