|
发表于 2007-4-10 09:22:48
|
显示全部楼层
Post by TristanHan
运行环境:Redhat9.0+skyeye0.7.0+arm-elf-gcc+uClinux20030522(附带uclinux4skyeye-v0.2.3)
首先安装skyeye0.7.0和交叉编译环境,
然后将uclinux4skyeye解压,按照installguide.txt中的提示将文件拷贝
到uClinux-dist的相应目录中,
进行make menuconfig,网络功能选项中会出现skyeye支持的选项,
接下来make dep,make 完成安装。
加入网络功能:看看是否tun.o存在,其是linux内核带的一个模拟网络点到点的虚拟网络设备,
不存在就:
mknod /dev/net/tun c 10 200
insmod /lib/modules/2.4.x/kernel/drivers/net/tun.o
可以了。
skyeye.conf 应该是
cpu: arm7tdmi
mach: at91
mem_bank: map=M, type=RW, addr=0x00000000, size=0x00004000
mem_bank: map=M, type=RW, addr=0x01000000, size=0x00400000
mem_bank: map=M, type=R, addr=0x01400000, size=0x00400000, file=images/romfs.img
mem_bank: map=M, type=RW, addr=0x02000000, size=0x00400000
mem_bank: map=M, type=RW, addr=0x02400000, size=0x00008000
mem_bank: map=M, type=RW, addr=0x04000000, size=0x00400000
mem_bank: map=I, type=RW, addr=0xf0000000, size=0x10000000
# format: state=on/off mac=xx:xx:xx:xx:xx:xx ethmod=tuntap/vnet hostip=dd.dd.dd.dd
net: state=on, mac=0:4:3:2:1:f, ethmod=tun, hostip=10.0.0.1
如果uClinux正常运行,出现
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram0
Command: mount -t proc proc /proc
mount: /etc/mtab: Read-only file system
Command: mount -t ext2 /dev/ram0 /var
mount: /etc/mtab: Read-only file system
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: cat /etc/motd
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
GDB/ARMulator support by <davidm@snapgear.com>
For further information check:
http://www.uclinux.org/
Command: /bin/ifconfig eth0 up 10.0.0.2
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/>
我的Redhat9.0主机-->[eth0:192.168.5.10]
-->[tap0:10.0.0.1]
uClinux-->[10.0.0.2]
在uClinux的路由表中加入 destination 192.168.5.0 nexthop 10.0.0.1
即可完成两端的通讯功能!其他网段通讯类似处理!
测试通过! 可是我为何出现如下错误提示?
[root@wen uClinux]# skyeye linux
***************************************************************
**** ****
**** SkyEye Simulator Ver 0.8.0 with GDB 5.3 Interface ****
**** ****
***************************************************************
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(SkyEye) target sim
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x813e02c
nic[0] info: state=1, ethmod num=1, mac addr=0:4:3:2:1:f, hostip=10.0.0.1
nic_init_begin
tapif_init begin
tapif_init: fd 6
tapif_init: system("ifconfig tap0 inet 10.0.0.1");
tapif_init end
nic_init_end
SKYEYE: use arm7100 mmu ops
Loaded ROM ./boot.rom
Connected to the simulator.
(SkyEye) load
Loading section .init, size 0xa000 vma 0x1000000
Loading section .text, size 0xcf830 vma 0x100a000
Loading section .data, size 0x8ff0 vma 0x10da000
Start address 0x1000000
Transfer rate: 7422208 bits in <1 sec.
(SkyEye) run
Starting program: /opt/skyeye-cdrom/uClinux/linux
Linux version 2.4.20-uc0 (root@wen) (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/)) #1 五 4月 6 15:56:31 CST 2007
Processor: Atmel AT91M40xxx revision 0
Architecture: EB01
On node 0 totalpages: 1024
zone(0): 0 pages.
zone(1): 1024 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/rom0
Calibrating delay loop... 12.97 BogoMIPS
Memory: 4MB = 4MB total
Memory: 2992KB available (830K code, 174K data, 40K init)
Dentry cache hash table entries: 512 (order: 0, 4096 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 1024 (order: 0, 4096 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Atmel USART driver version 0.99
ttyS0 at 0xfffd0000 (irq = 2) is a builtin Atmel APB USART
ttyS1 at 0xfffcc000 (irq = 3) is a builtin Atmel APB USART
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: 1400000-14DDFFF [VIRTUAL 1400000-14DDFFF] (RO)
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
Shell invoked to run file: /etc/rc
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram0
Command: mount -t proc proc /proc
mount: /etc/mtab: Read-only file system
Command: mount -t ext2 /dev/ram0 /var
mount: /etc/mtab: Read-only file system
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: cat /etc/motd
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
GDB/ARMulator support by <davidm@snapgear.com>
For further information check:
http://www.uclinux.org/
Command: /bin/ifconfig eth0 up 10.0.0.2
SIOCGIFFLAGS: No such device
SIOCSIFADDR: No such device
pid 12: failed 512
Execution Finished, Exiting
init: Booting to single user mode
Sash command shell (version 1.1.1)
/> |
|