登录 免费注册 首页 | 行业黑名单 | 帮助
维库电子市场网
技术交流 | 电路欣赏 | 工控天地 | 数字广电 | 通信技术 | 电源技术 | 测控之家 | EMC技术 | ARM技术 | EDA技术 | PCB技术 | 嵌入式系统
驱动编程 | 集成电路 | 器件替换 | 模拟技术 | 新手园地 | 单 片 机 | DSP技术 | MCU技术 | IC 设计 | IC 产业 | CAN-bus/DeviceNe

uclinux-2.6为什么能看到shell了还有问题!

作者:letter 栏目:嵌入式系统
uclinux-2.6为什么能看到shell了还有问题!
经过一段时间的煎熬,终于看到shell了,可是shell总是过几分钟输出:
init: /bin/sh respawning too FAST
我看了启动信息,发现运行脚本rc时,/bin/expand命令出错:
Command: /bin/expand /etc/ramfs.img /dev/ram1                
/bin/expand: Bad command or file NAME
认为shell出错和这个有关,望高指点,多谢。
     
以下是我的启动信息:
U-Boot 1.1.4 (Jan 22 2007 - 16:40:53)                                     
U-Boot code: 0C700000 -> 0C719EF8  BSS: -> 0C71E99C                                                   
RAM Configuration:                  
Bank #0: 0c000000  8 MB                       
FLASH:  2 MB            
In:    serial             
Out:   serial             
Err:   serial             
Hit any key to stop autoboot:  0                                
## Booting image at 00040000 ...                                
   Image NAME:   Linux-2.6.9                            
   Created:      2007-01-26   2:50:16 UTC                                         
   Image Type:   ARM Linux Kernel Image (uncompressed)                                                      
   Data Size:    659816 Bytes = 644.4 kB                                        
   Load Address: 0c008000                         
   Entry Point:  0c008000                         
   Verifying CHECKSUM ... OK                            
OK  
Starting kernel ...                   
Uncompressing Linux................................................ done, bootin                                                                                
g the kernel.             
Linux version 2.6.9-hsc0 (root@localhost.localdomain) (gcc version 2.95.3 200103                                                                                
15 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClin                                                                                
ux XIP and shared lib patches from http://www.snapgear.com/)) #48 Fri Jan 26 10:                                                                                
47:23 CST 2007              
CPU: Samsung-S3C44B0x [44b07700] revision 0 (ARMv4T)                                                    
Machine: S3C44B0X Development Board                                   
Built 1 zonelists                 
Kernel command LINE: root=/dev/ram0 initrd=0x0c13c53c,120K console=ttyS0,115200                                                   &
2楼: >>参与讨论
wangkj
文件系统的问题
 
3楼: >>参与讨论
letter
该如何解决?内核是2.6.9的。
 
4楼: >>参与讨论
wangkj
换个文件系统,可能是inittab的问题或者init的问题
 
5楼: >>参与讨论
letter
我的inittab是空的。
inittab:
#inet:UNKNOWN:/bin/inetd
#boa:UNKNOWN:/bin/boa


6楼: >>参与讨论
wangkj
我只是给你提示
问题还需要你自己解决,这是一个常见问题。
我是直接换的文件系统,没找具体原因。


7楼: >>参与讨论
letter
今天换了一个文件系统,还是expand有问题。
今天自己做了一ramdisk, Read-only file SYSTEM问题没了,但是还是有二处问题。
第一处:
Command: /bin/expand /etc/ramfs.img /dev/ram1
Can't open expanded file /dev/ram1
pid 11: failed 768
第二处:
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram1 /var
mount failed: No such file or directory
都和ram1有关,我想ram1是不是有问题?

全部信息:

U-Boot 1.1.4 (Jan 22 2007 - 16:40:53)

U-Boot code: 0C700000 -> 0C719EF8  BSS: -> 0C71E99C
RAM Configuration:
Bank #0: 0c000000  8 MB
FLASH:  2 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
=>  bootm 40000 140000
## Booting image at 00040000 ...
   Image NAME:   Linux-2.6.9
   Created:      2007-02-02  18:21:43 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    605444 Bytes = 591.3 kB
   Load Address: 0c008000
   Entry Point:  0c008000
   Verifying CHECKSUM ... OK
OK
## Loading Ramdisk Image at 00140000 ...
   Image NAME:   Ramdisk
   Created:      2007-02-02  19:02:09 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    77798 Bytes = 76 kB
   Load Address: 0c600000
   Entry Point:  0c600000
   Verifying CHECKSUM ... OK

Starting kernel ...

Uncompressing Linux............................................ done, booting the kernel.
Linux version 2.6.9-hsc0 (root@localhost.localdomain) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #62 Fri Feb 2 13:08:52 EST 2007
CPU: SAMSUNG-S3C44B0x [44b07700] revision 0 (ARMv4T)
Machine: S3C44B0X.html">S3C44B0X Development Board
Built 1 zonelists
Kernel command LINE: root=/dev/ram0 rw initrd=0x0c600000,800K.html">800K console=ttyS0,115200
PID hash table entries: 64 (order: 6, 1024 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
MEMORY: 8MB = 8MB total
MEMORY: 5864KB available (1194K code, 164K data, 56K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
checking if image is initramfs...it isn't (no cpio MAGIC); looks like an initrd
Freeing initrd MEMORY: 800K
NET: Registered protocol family 16
init_module
SAMSUNG S3C44B0 RTL8019AS driver version 0.1 (2002-02-20) <hzh12@163.net>
init
eth0: 12:34:56:78:90:ab
get_stats
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
ttyS0 at I/O 0x1d00000 (irq = 3) is a SAMSUNG S3C44B0 Internal UART
ttyS1 at I/O 0x1d04000 (irq = 2) is a SAMSUNG S3C44B0 Internal UART
RAMDISK driver initialized: 16 RAM disks of 2048K size 1024 blocksize
loop: loaded (max 8 DEVICEs)
Using anticipatory io scheduler
nbd: registered DEVICE at major 43
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 fileSYSTEM).
Mounted devfs on /dev
Freeing init MEMORY: 56K
Shell invoked to run file: /etc/rc
Command: hostNAME SAMSUNG
Command: /bin/expand /etc/ramfs.img /dev/ram1
Can't open expanded file /dev/ram1
pid 11: failed 768
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram1 /var
mount failed: No such file or directory
Command: mkdir /var/config
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: cat /etc/motd
Welcome to
          ____ _  _
         /  __| ||_|                 
    _   _| |  | | _ ____  _   _  _  _
   | | | | |  | || |  _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |  ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

For further information check:
http://www.uclinux.org/

Command: ifconfig lo 192.168.1.8
ifconfig: Bad command or file NAME
Command: route add -net 192.168.1.1 netmask 255.255.255.0 lo
route: Bad command or file NAME
Execution Finished, Exiting

Sash command shell (version 1.1.1)
/> init: /bin/sh respawning too FAST


8楼: >>参与讨论
wangkj
QQ qun:35845232
QQ qun:35845232

9楼: >>参与讨论
wangkj
4510-romfs.tgz
试试看吧。
qq 

10楼: >>参与讨论
letter
好的。wangkj,非常感谢你。
 
11楼: >>参与讨论
wangkj
如果运行几个命令后core dump不要奇怪
这个好像没也没完全作好,但也可能是内核的问题(这个和sst FLASH有关,可能)。

12楼: >>参与讨论
letter
原来是配置不对
原来是配置不对而以至文件系统有问题,具体问题我还不知道出在那里。我导入一个现成的内核配置文件就好了,可是shell不能输入任何字符,这又是什么原因?串口驱动(因为串口驱动是自己搞上去的)?

---------------------------------------------------------------------
bootm 0x0c500000
## Booting image at 0c500000 ...
   Image NAME:   Linux-2.6.9
   Created:      2007-02-07  20:51:00 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1088276 Bytes =  1 MB
   Load Address: 0c008000
   Entry Point:  0c008000
   Verifying CHECKSUM ... OK
OK

Starting kernel ...

Uncompressing Linux......................................................................... done, booting the kernel.
Linux version 2.6.9-hsc0 (root@localhost.localdomain) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #62 Wed Feb 7 15:43:21 EST 2007
CPU: SAMSUNG-S3C44B0x [44b07700] revision 0 (ARMv4T)
Machine: S3C44B0X.html">S3C44B0X Development Board
Built 1 zonelists
Kernel command LINE: root=/dev/ram0 initrd=0x0c136600,969k console=ttyS0,115200
PID hash table entries: 64 (order: 6, 1024 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
MEMORY: 8MB = 8MB total
MEMORY: 5776KB available (2126K code, 122K data, 52K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
checking if image is initramfs...it isn't (ungzip failed); looks like an initrd
Freeing initrd MEMORY: 969K
NET: Registered protocol family 16
init_module
SAMSUNG S3C44B0 RTL8019AS driver version 0.1 (2002-02-20) <hzh12@163.net>
init
eth0: 12:34:56:78:90:ab
get_stats
ttyS0 at I/O 0x1d00000 (irq = 3) is a SAMSUNG S3C44B0 Internal UART
ttyS1 at I/O 0x1d04000 (irq = 2) is a SAMSUNG S3C44B0 Internal UART
RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize
loop: loaded (max 8 devices)
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: romfs filesystem found at block 0
RAMDISK: Loading 969KiB [1 disk] into ram disk... done.
VFS: Mounted root (romfs filesystem) readonly.
Freeing init MEMORY: 52K
Shell invoked to run file: /etc/rc
Command: hostname senglen
Command: /bin/expand /etc/ramfs.img /dev/ram1
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram1 /var
Command: mkdir /var/config
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: cat /etc/motd
Welcome to
          ____ _  _
         /  __| ||_|                 
    _   _| |  | | _ ____  _   _  _  _
   | | | | |  | || |  _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |  ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

For further information check:
http://www.uclinux.org/

Execution Finished, Exiting

Sash command shell (version 1.1.1)
/> (不能接受任何字符,怪)


13楼: >>参与讨论
letter
原来是串口驱动问题
现在问题解决了,是串口的中断的接收入口不对,改为正确的就好了。谢谢wangkj的帮助。

---------------------------------------------------------------------
U-Boot 1.1.4 (Jan 22 2007 - 16:40:53)

U-Boot code: 0C700000 -> 0C719EF8  BSS: -> 0C71E99C
RAM Configuration:
Bank #0: 0c000000  8 MB
FLASH:  2 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Booting image at 00040000 ...
   Image NAME:   Linux-2.6.9
   Created:      2007-02-08  14:54:44 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1086152 Bytes =  1 MB
   Load Address: 0c008000
   Entry Point:  0c008000
   Verifying CHECKSUM ... OK
OK

Starting kernel ...

Uncompressing Linux......................................................................... done, booting the kernel.
Linux version 2.6.9-hsc0 (root@localhost.localdomain) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #63 Thu Feb 8 09:36:06 EST 2007
CPU: SAMSUNG-S3C44B0x [44b07700] revision 0 (ARMv4T)
Machine: S3C44B0X.html">S3C44B0X Development Board
Built 1 zonelists
Kernel command LINE: root=/dev/ram0 initrd=0x0c136600,968k console=ttyS0,115200
PID hash table entries: 64 (order: 6, 1024 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
MEMORY: 8MB = 8MB total
MEMORY: 5776KB available (2125K code, 123K data, 52K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
checking if image is initramfs...it isn't (ungzip failed); looks like an initrd
Freeing initrd MEMORY: 968K
NET: Registered protocol family 16
init_module
SAMSUNG S3C44B0 RTL8019AS driver version 0.1 (2002-02-20) <hzh12@163.net>
init
eth0: 12:34:56:78:90:ab
get_stats
ttyS0 at I/O 0x1d00000 (irq = 3) is a SAMSUNG S3C44B0 Internal UART
ttyS1 at I/O 0x1d04000 (irq = 2) is a SAMSUNG S3C44B0 Internal UART
RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize
loop: loaded (max 8 devices)
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: romfs filesystem found at block 0
RAMDISK: Loading 968KiB [1 disk] into ram disk... done.
VFS: Mounted root (romfs filesystem) readonly.
Freeing init MEMORY: 52K
Shell invoked to run file: /etc/rc
Command: hostname ucan
Command: /bin/expand /etc/ramfs.img /dev/ram1
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram1 /var
Command: mkdir /var/config
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: cat /etc/motd
Welcome to
          ____ _  _
         /  __| ||_|                 
    _   _| |  | | _ ____  _   _  _  _
   | | | | |  | || |  _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |  ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

For further information check:
http://www.uclinux.org/

Command: ifconfig lo 192.168.1.8
Command: route add -net 192.168.1.1 netmask 255.255.255.0 lo
route: netmask and route address conflict
pid 15: failed 256
Execution Finished, Exiting
init: Booting to SINGLE user mode

Sash command shell (version 1.1.1)
/> ls
bin
dev
etc
home
lib
mnt
proc
sbin
tmp
usr
var
/> 

参与讨论
昵称:
讨论内容:
 
 
相关帖子
((void *) 0) 不懂..请指点
软件加密
linux的一段代码地址问题
SMD2440A wince5.0的BSP下载
急求ST16C554的资料
免费注册为维库电子开发网会员,参与电子工程师社区讨论,点此进入


Copyright © 1998-2006 www.dzsc.com 浙ICP证030469号