主题 : 【求助】2410移植linux2.6内核 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 9605
精华: 0
发帖: 17
金钱: 140 两
威望: 58 点
综合积分: 34 分
注册时间: 2009-10-07
最后登录: 2011-08-10
楼主  发表于: 2009-10-21 09:30

 【求助】2410移植linux2.6内核

我在UP-TECH-S3C2410实验箱移植linux2.6.29内核,BootLoader还是实验箱自带的vivi,
根文件系统用yaffs,启动根文件系统时出了问题:
VFS: Cannot open root device "mtdblock/3" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00             128 mtdblock0 (driver?)
1f01              64 mtdblock1 (driver?)
1f02            2048 mtdblock2 (driver?)
1f03           63280 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
vivi的bon和mtd分区我都设置好了,内核的mtd分区也修改过,都是一样的,
param也设置了,
现在无法启动根文件系统,希望移植过的给点经验。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-10-21 09:51
2.6.29内核不会认识root=/dev/mtdblock/3这种东西,用root=/dev/mtdblock3或者root=1f03代替
"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: 9605
精华: 0
发帖: 17
金钱: 140 两
威望: 58 点
综合积分: 34 分
注册时间: 2009-10-07
最后登录: 2011-08-10
2楼  发表于: 2009-10-22 07:58
已经找到文件系统了,又有了新的错误:
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
usb 1-1: new full speed USB device using s3c2410-ohci and address 2
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c2410-ohci and address 3
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c2410-ohci and address 4
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 152K
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.

这应该是文件系统的问题吧?
rtc和usb的错误对启动文件系统有影响吗??
Warning: unable to open an initial console.是什么意思呢??
级别: 新手上路
UID: 9605
精华: 0
发帖: 17
金钱: 140 两
威望: 58 点
综合积分: 34 分
注册时间: 2009-10-07
最后登录: 2011-08-10
3楼  发表于: 2009-10-22 08:00
再问一下:
跟文件系统跟硬件平台关系不大吧:

我用了一个在mini2440下可以启动的yaffs文件系统,
在2410下用2.6.29内核不能启动,为什么?
级别: 新手上路
UID: 9605
精华: 0
发帖: 17
金钱: 140 两
威望: 58 点
综合积分: 34 分
注册时间: 2009-10-07
最后登录: 2011-08-10
4楼  发表于: 2009-10-22 18:33
解决了一些问题,现在的启动信息是:
Kernel command line: noinitrd root=/dev/mtdblock3 console=ttySAC0
...
...
NET: Registered protocol family 17                                              
RPC: Registered udp transport module.                                          
RPC: Registered tcp transport module.                                          
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)                        
yaffs: dev is 32505859 name is "mtdblock3"                                      
yaffs: passed flags ""                                                          
yaffs: Attempting MTD mount on 31.3, "mtdblock3"                                
yaffs_read_super: isCheckpointed 0                                              
VFS: Mounted root (yaffs filesystem) on device 31:3.                            
Freeing init memory: 152K                                                      
Warning: unable to open an initial console.                                    
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

我在文件系统的/dev下已经创建了console,
mknod -m 660 console c 5 1
级别: 新手上路
UID: 9605
精华: 0
发帖: 17
金钱: 140 两
威望: 58 点
综合积分: 34 分
注册时间: 2009-10-07
最后登录: 2011-08-10
5楼  发表于: 2009-10-23 08:42
自己顶一下
级别: 新手上路
UID: 9605
精华: 0
发帖: 17
金钱: 140 两
威望: 58 点
综合积分: 34 分
注册时间: 2009-10-07
最后登录: 2011-08-10
6楼  发表于: 2009-10-23 14:42
再顶
嵌入式技术讨论群 Linux ARM QQ群:12056530  YY语音频道ID:82131178
级别: 新手上路
UID: 9137
精华: 0
发帖: 39
金钱: 305 两
威望: 127 点
综合积分: 78 分
注册时间: 2009-09-18
最后登录: 2010-12-22
7楼  发表于: 2009-10-23 20:01
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
看着句话,是不是bootloader没有给init传正确的参数啊?!
把事情做好,这是必须的!
知识用于解决实际问题才是价值所在!
级别: 新手上路
UID: 10795
精华: 0
发帖: 1
金钱: 10 两
威望: 5 点
综合积分: 2 分
注册时间: 2009-11-17
最后登录: 2009-11-18
8楼  发表于: 2009-11-17 22:33
我也是遇到了这样的问题
还没有解决
有人能指点一下吗?
级别: 新手上路
UID: 10455
精华: 0
发帖: 3
金钱: 30 两
威望: 15 点
综合积分: 6 分
注册时间: 2009-11-05
最后登录: 2009-11-27
9楼  发表于: 2009-11-18 16:05
我在移植过程中也遇到这样的问题!
可以把nand flash硬件和软件的ECC校验去掉就可以进入yaffs2文件系统了