2.6.14.1内核移植问题解决帖子

2627阅读 0评论2008-06-26 joshuazzh
分类:LINUX

2008-6-26 18:10 joshuazzh
求助大侠:移植2.6.14.1系统后启动出错stty: /dev/ttyS0: No such file or directory

这是开机logo:
在google上没有找到合适的解答
望大侠不吝赐教!!!!!!!!!!!!
先谢谢了!

VIVI version 0.1.4 ([email]root@localhost.localdomain[/email]) (gcc version 2.95.3 20010315 (re                                                                                
lease)) #0.1.4 2008骞?06鏈?25鏃?鏄熸湡涓?22:47:26 CST                                                         
MMU table base address = 0x33DFC000                                   
Succeed memory mapping.                       
NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)                                                                     
Found saved vivi parameters.                           
Press Return to start the LINUX now, any other key for vivi                                                           
type "help" for help.                     
vivi> load flash kernel x                        
Ready for downloading using xmodem...                                    
Waiting...         
Downloaded file at 0x30000000, size = 940672 bytes                                                         
Found block size = 0x000e8000                             
Erasing...    ... done                     
Writing...    ... done                     
Written 940672 bytes                    
vivi> boot         
Copy linux kernel from 0x00100000 to 0x30008000, size = 0x00300000 ... done                                                                           
zImage magic = 0x016f2818                        
Setup linux parameters at 0x30000100                                    
linux command line is: "noinitrd root=/dev/mtdblock3  init=/linuxrc console=ttyS                                                                                
AC0,115200"           
MACH_TYPE = 193               
NOW, Booting Linux......                        
Uncompressing Linux.............................................................                                                                                
. done, booting the kernel.                           
Linux version 2.6.14.1 ([email]root@localhost.localdomain[/email]) (gcc version 3.4.1) #1 Thu J                                                                                
un 26 05:20:31 CST 2008                       
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)                                                
Machine: SMDK2410                 
ATAG_INITRD is deprecated; please update your bootloader.                                                         
Memory policy: ECC disabled, Data cache writeback                                                
CPU S3C2410A (id 0x32410002)                           
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz                                                                    
S3C2410 Clocks, (c) 2004 Simtec Electronics                                          
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on                                                   
CPU0: D VIVT write-back cache                             
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets                                                                  
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets                                                                  
Built 1 zonelists                 
Kernel command line: noinitrd root=/dev/mtdblock3  init=/linuxrc console=ttySAC0                                                                                
,115200      
irq: clearing pending ext status 00000300                                         
irq: clearing subpending status 00000003                                       
irq: clearing subpending status 00000002                                       
PID hash table entries: 512 (order: 9, 8192 bytes)                                                  
timer tcon=00000000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8                                                                     
Console: colour dummy device                             
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)                                                              
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)                                                            
Memory: 64MB = 64MB total                        
Memory: 62848KB available (1565K code, 314K data, 92K init)                                                           
Mount-cache hash table entries: 512                                   
CPU: Testing write buffer coherency: ok                                       
softlockup thread 0 started up.                              
NET: Registered protocol family 16                                 
S3C2410: Initialising architecture                                 
NetWinder Floating Point Emulator V0.97 (double precision)                                                         
devfs: 2004-01-31 Richard Gooch ([email]rgooch@atnf.csiro.au[/email])                                                      
devfs: devfs_deb              
devfs: boot_options: 0x1                        
Console: switching to colour frame buffer device 80x25                                                      
fb0: Virtual frame buffer device, using 1024K of video memory                                                            
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410                                                         
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410                                                         
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410                                                         
io scheduler noop registered                           
io scheduler anticipatory registered                                    
io scheduler deadline registered                                
io scheduler cfq registered                           
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize                                                                     
S3C24XX NAND Driver, (c) 2004 Simtec Electronics                                                
s3c2410-nand: mapped registers at c4980000                                          
s3c2410-nand: timing: Tacls 10ns, Twrph0 40ns, Twrph1 10ns                                                         
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit                                                                                
)
NAND_ECC_NONE selected by board driver. This is not recommended !!                                                                  
Scanning device for bad blocks                              
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":                                                     
0x00000000-0x00020000 : "vivi"                              
0x00020000-0x00100000 : "param"                              
0x00100000-0x00400000 : "kernel"                                
0x00400000-0x04400000 : "root"                              
mtd: partition "root" extends beyond the end of device "NAND 64MiB 3,3V 8-bit" -                                                                                
- size truncated to 0x3c00000                             
mice: PS/2 mouse device common for all mice                                          
NET: Registered protocol family 2                                 
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)                                                              
TCP established hash table entries: 4096 (order: 2, 16384 bytes)                                                               
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)                                                         
TCP: Hash tables configured (established 4096 bind 4096)                                                        
TCP reno registered                  
TCP bic registered                  
NET: Registered protocol family 1                                 
Reading data from NAND FLASH without ECC is not recommended
VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing init memory: 92K
Reading data from NAND FLASH without ECC is not recommended
Reading data from NAND FLASH without ECC is not recommended
Reading data from NAND FLASH without ECC is not recommended
Reading data from NAND FLASH without ECC is not recommended
Reading data from NAND FLASH without ECC is not recommended
yaffs is mounted
mount: Mounting /dev/mtdblock/1 on /mnt/yaffs failed: No such device
Using /lib/modules/linux/kernel/drivers/char/s3c2410_ts.o
insmod: kernel-module version mismatch
        /lib/modules/linux/kernel/drivers/char/s3c2410_ts.o was compiled for ker
nel version 2.4.18-rmk7-pxa1
        while this kernel is version 2.6.14.1.
Using /lib/modules/S3c2410_ownkbd.o
insmod: kernel-module version mismatch
        /lib/modules/S3c2410_ownkbd.o was compiled for kernel version 2.4.18-rmk
7-pxa1
        while this kernel is version 2.6.14.1.
mount: Mounting usbdevfs on /proc/bus/usb failed: No such file or directory
stty: /dev/ttyS0: No such file or directory

2008-6-26 18:14 joshuazzh
补充说明

内核配置参考了网上好几个文档
vivi设置如下??
请问是vivi的问题呢还是系统内核的配置问题或者其它问题
VIVI version 0.1.4 ([email]root@localhost.localdomain[/email]) (gcc version 2.95.3 20010315 (re                                                                                
lease)) #0.1.4 2008骞?06鏈?25鏃?鏄熸湡涓?22:47:26 CST                                                         
MMU table base address = 0x33DFC000                                   
Succeed memory mapping.                       
NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)                                                                     
Found saved vivi parameters.                           
Press Return to start the LINUX now, any other key for vivi                                                           
type "help" for help.                     
vivi> part show               
mtdpart info. (4 partitions)                           
name              offset        size        flag                                               
------------------------------------------------                                                
vivi            : 0x00000000    0x00020000     0  128k                                                      
param           : 0x00020000    0x000e0000     0  896k                                                      
kernel          : 0x00100000    0x00300000     0    3M                          
root            : 0x00400000    0x04000000     4   64M
vivi> bon part show
BON info. (3 partitions)
No: offset      size            flags     bad
---------------------------------------------
0: 0x00000000  0x00100000      00000000    0    1M
1: 0x00100000  0x00300000      00000000    0    3M
2: 0x00400000  0x03bfc000      00000001    0   59M+1008k
vivi> param show
Number of parameters: 9
name                    :          hex             integer
-------------------------------------------------------------
mach_type               :       000000c1                  193
media_type              :       00000003                    3
boot_mem_base           :       30000000            805306368
baudrate                :       0001c200               115200
xmodem_one_nak          :       00000000                    0
xmodem_initial_timeout  :       000493e0               300000
xmodem_timeout          :       000f4240              1000000
ymodem_initial_timeout  :       0016e360              1500000
boot_delay              :       01000000             16777216
Linux command line: noinitrd root=/dev/mtdblock3  init=/linuxrc console=ttySAC0,
115200
vivi>

2008-6-26 18:15 joshuazzh
在线求助大侠解答

望大侠不吝赐教啊!!!!!!!!!

2008-6-26 18:25 joshuazzh
补充说明

我的文件系统为cramfs  ,为原来恒颐H2410F自带的文件系统,没有做改动
改动的仅仅有vivi0.4.1版本
内核2.6.14.1
我在修改vivi时候,有个makefile下的参数叫CROSS-COMPILE  ?=
参数
起先我是用的内核2.6.14.1下的某个include,后来编译是出错,网上有位仁兄也出现过同样的现象,解决方法是把这个参数换成板子原来本身所带内核2.4.18下的include,编译通过
是不是这点导致了一下的错误:
yaffs is mounted
mount: Mounting /dev/mtdblock/1 on /mnt/yaffs failed: No such device
Using /lib/modules/linux/kernel/drivers/char/s3c2410_ts.o
insmod: kernel-module version mismatch
        /lib/modules/linux/kernel/drivers/char/s3c2410_ts.o was compiled for ker
nel version 2.4.18-rmk7-pxa1
        while this kernel is version 2.6.14.1.
Using /lib/modules/S3c2410_ownkbd.o
insmod: kernel-module version mismatch
        /lib/modules/S3c2410_ownkbd.o was compiled for kernel version 2.4.18-rmk
7-pxa1
        while this kernel is version 2.6.14.1.
mount: Mounting usbdevfs on /proc/bus/usb failed: No such file or directory

而且我的文件系统为cramfs,为什么会有yaffs is mounted的提示信息啊??、
我在内核配置时候是没有选择yaffs的!!!!
仅仅选择了cramfs的那个compressed rom file system support
请问这是什么原因?????????????

2008-6-26 20:03 joshuazzh
等待求助中

等待中~~~~~~~~~~~~~~~~~

2008-6-26 22:24 joshuazzh
已经找到问题存在的地方

由信息
VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing init memory: 92K
Reading data from NAND FLASH without ECC is not recommended
Reading data from NAND FLASH without ECC is not recommended
Reading data from NAND FLASH without ECC is not recommended
Reading data from NAND FLASH without ECC is not recommended
Reading data from NAND FLASH without ECC is not recommended
yaffs is mounted
mount: Mounting /dev/mtdblock/1 on /mnt/yaffs failed: No such device
Using /lib/modules/linux/kernel/drivers/char/s3c2410_ts.o
insmod: kernel-module version mismatch
        /lib/modules/linux/kernel/drivers/char/s3c2410_ts.o was compiled for ker
nel version 2.4.18-rmk7-pxa1
        while this kernel is version 2.6.14.1.
Using /lib/modules/S3c2410_ownkbd.o
insmod: kernel-module version mismatch
        /lib/modules/S3c2410_ownkbd.o was compiled for kernel version 2.4.18-rmk
7-pxa1
        while this kernel is version 2.6.14.1.
mount: Mounting usbdevfs on /proc/bus/usb failed: No such file or directory
stty: /dev/ttyS0: No such file or directory

大致可以判断系统已经执行到根文件系统了,因为挂在等操作应该是在根文件系统中进行的,据我判断问题存在之处应该是insmod: kernel-module version mismatch  或者是stty: /dev/ttyS0: No such file or directory 两个其中一个或者是两个。当我在网上找到了一个类似的存在insmod: kernel-module version mismatch 问题也可以正确启动之后,排除了第一个错误的可能,并且在和他的启动logo对比时,发现执行到stty: /dev/ttyS0: No such file or directory
后很快就到press enter to activate this console这一步,这更加证明了我的直觉是正确的。
于是我在别人了拷了一个小的根文件系统,制作成cramfs只读文件系统,烧写到板子,重启,成功!
至此,在恒颐H2410F板子上进行vivi(版本0.4.1)移植、内核移植2.6.14.1、根文件系统差错等工作全部完成!板子可以正常运行起来!最重要的收获就是让我更加明白了学习的精髓在于:
1、在漫天的信息海洋中找到对自己有用的信息,并提炼出来
2、更加懂得了独立分析思考问题的重要性!
3、多动手,不要惧怕错误,勇于尝试,多动手实践!在错误中解决问题比一个劲的看课本更能牢固掌握知识!
上一篇:Linux2.6内核的vivi分区及内核MTD分区
下一篇:不要做浮躁的嵌入式系统工程师【转载】