打印
[嵌入式linux]

linux-2.6.11.8在44B0上运行出问题了

[复制链接]
1524|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
mybao|  楼主 | 2007-6-4 19:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我在s3c44b0上跑linux2.6.11.8,用了samsung网站的补丁: 
http://opensrc.sec.samsung.com/download/linux-2.6.11.8-hsc0.patch.gz。 
我的command line :"root=/dev/ram0 initrd=0xc500000,0x200000 init=/linuxrc rw console=ttyS0,115200 " 

serial console输出如下信息后就没反应了: 
RAMDISK driver initialized: 1 RAM disks of 2048K size 1024 blocksize 
mice: PS/2 mouse device common for all mice 
md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27 
NET: Registered protocol family 2 
IP: routing cache hash table of 128 buckets, 4Kbytes 
TCP established hash table entries: 512 (order: 0, 4096 bytes) 
TCP bind hash table entries: 512 (order: 1, 14336 bytes) 
TCP: Hash tables configured (established 512 bind 512) 
Initializing IPsec netlink socket 
NET: Registered protocol family 1 
NET: Registered protocol family 17 
md: Autodetecting RAID arrays. 
md: autorun ... 
md: ... autorun DONE. 
RAMDISK: Compressed image found at block 0 

文件系统结构如下: 
[root@localhost rootfs]# pwd 
/myfold/rootfs 
[root@localhost rootfs]# tree 

|-- bin 
| |-- ash -> busybox 
| |-- busybox 
| |-- cat -> busybox 
| |-- cp -> busybox 
| |-- echo -> busybox 
| |-- ip -> busybox 
| |-- ls -> busybox 
| |-- mkdir -> busybox 
| |-- mount -> busybox 
| |-- mv -> busybox 
| |-- ping -> busybox 
| |-- pwd -> busybox 
| |-- rm -> busybox 
| |-- touch -> busybox 
| |-- umount -> busybox 
| `-- vi -> busybox 
|-- dev 
| |-- console 
| |-- initrd 
| |-- null 
| `-- ttyS0 
|-- etc 
|-- lib 
|-- linuxrc 
|-- mnt 
| `-- etc 
| |-- fstab 
| |-- fstab~ 
| |-- group 
| |-- group~ 
| |-- passwd 
| `-- passwd~ 
|-- proc 
|-- root 
|-- sbin 
| |-- halt -> ../bin/busybox 
| |-- ifconfig -> ../bin/busybox 
| |-- init -> ../bin/busybox 
| |-- poweroff -> ../bin/busybox 
| |-- reboot -> ../bin/busybox 
| |-- start-stop-daemon -> ../bin/busybox 
| `-- watchdog -> ../bin/busybox 
|-- sys 
|-- tmp 
`-- usr 
|-- bin 
| |--  -> ../../bin/busybox 
| |-- [[ -> ../../bin/busybox 
| |-- mesg -> ../../bin/busybox 
| |-- test -> ../../bin/busybox 
| `-- tr -> ../../bin/busybox 
|-- lib 
`-- sbin 

linuxrc内容如下: 
#!/bin/ash 
echo "mount /etc as ramfs" 
/bin/mount -n -t ramfs ramfs /etc 
/bin/cp -a /mnt/etc/* /etc 
echo "re-create the /etc/mtab entries" 
#re-create the /etc/mtab entries 
#mount some file system 
echo "-----------mount /dev/shm as tmpfs" 
/bin/mount -n -t tmpfs tmpfs /dev/shm 
echo "-----------mount /sys as sysfs" 
/bin/mount -n -t sysfs none /sys 
exec /sbin/init 

ramdisk文件系统制作方法如下: 
dd if=/dev/zero of=/dev/ram0 bs=1k count=2048 
mke2fs -vm0 /dev/ram0 2048 
mount /dev/ram0 /mnt/ramdisk 
cp -rd /myfold/rootfs/* /mnt/ramdisk 
umount /dev/ram0 
dd if=/dev/ram0 bs=1k count=2048 | gzip -v9 > /tftpboot/ram_image.gz 

用uboot下载zImage和am_image.gz,运行到上面说到的地方 
RAMDISK: Compressed image found at block 0 
然后就没反应了,怎么回事呢? 

我在 windows下用仿真器调试了一下(只能看到汇编语言,看不到C源码) 
发现console输出 RAMDISK: Compressed image found at block 0 以后,程序并没有跑飞,对照map文件,发现CPU是在void cpu_idle(void)这个函数里面转。 
但是console上没任何反应了,不知何故。 

我猜是不是需要在文件系统中对串口做一些工作?

相关帖子

沙发
prince1234| | 2008-1-4 14:33 | 只看该作者

应该是的文件系统建立出了问题~~

应该是的文件系统建立出了问题~~

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

85

主题

759

帖子

3

粉丝