Skyeye安装笔记

来源:互联网 发布:删失数据的处理 编辑:程序博客网 时间:2024/04/30 09:00
Skyeye安装笔记 (English Version)作者:姜江QQ:457283Blog:http://blog.csdn.net/jznsmail1.简介SkyEye是一个开源软件项目,它是在Linux和Windows平台上实现一个纯软件模拟集成开发环境,模拟常见的嵌入式系统。可以在SkyEye上运行Linux,uClinux以及uC/OS-II等多款嵌入式操作系统和各种系统软件。目前最新版本的SkyEye是skyeye-1.2-RC6.tar.bz2版本,该版本可以从www.skyeye.org获取。SkyEye目前支持多款嵌入式处理器:ATMEL AT91X40PHILIPS LPC2xxxxSamsung s3c4510bSamsung s3c44b0Cirrus Logic EP7312sharp LH79520Cirrus Logic EP9312cs89712sa1100xscale pxa250 lubbock developboardxscale pxa270 mainstone developboardat91RM9200s3c2410xs3c2440sharp lh7a400 developbaordNetSilicon ns9750Philips LPC2210对于附加设备该项目已经完成对Flash,LCD,Network Interface Card,touchsceen, UART的支持2.SkyEye的安装下面我就以最新版本的skyeye-1.2.RC6为例子安装SkyEye.我的系统配置入下操作系统: Fedora Core 2 Linux(2.4.x)GCC Version: 3.3.2arm-elf-gcc Version: 2.95.3 20010315首先从www.uClinux.org下载arm-elf-tools,里面包含arm-elf-gcc, arm-elf-ld等工具。下载后可以通过如下方式安装:$su -c './arm-elf-tools-20030315.sh'$password:安装完毕后,可以进入存放skyeye的目录,例如我的是放在/home/jelly/download/目录。然后进行解压。$cd ~/download$lsskyeye-1.2-RC6.tar.bz2$tar jxvf skyeye-1.2-RC6-tar.bz2然后进入解压的skyeye目录$cd skyeye-v1最后使用make命令进行软件的安装,编译完毕后会在binary生成一个skyeye可执行文件,该文件就是skyeye模拟器了。使用make命令的时候可以加入一些选项参数,例如:不允许DBCT$make NO_DBCT=1不支持LCD$make NO_LCD=1不支持BFD库$make NO_BFD=1不支持网络设备$make NO_NET=1如果在binary目录下生成了skyeye文件,那么安装成功。下面我以uClinux为例子,在skyeye上模拟。可以通过使用-h参数来获取帮助$skyeye -hSkyEye -V1.2 Usage: SkyEye [options] -e program [program args]Default mode is STANDALONE modeOptions:-e exec-file the (ELF executable format)kernel file name.-d in GDB Server mode (can be connected by GDB).-c config-file the skyeye configure file name.-h This Help Display-v This shows arch and cpu supported-e 指定elf各式的内核文件-d GDB调试模式-c 指定配置文件-h 获取帮助-v 显示体系结构和CPU支持信息(不知道是不是我用的这个版本没有实现该功能,使用-v选项后显示:Unknown option '-v')3.uClinux移植从www.uclinux.org网站上下载比较新的内核包文件,并且解压。$tar xvzf uClinux-dist-xxxxxxxx.tar.gz进入生成的uClinux-dist目录可以使用make xconfig - 图形配置模式,make menuconfig - 菜单模式配置,方式来配置uClinux.在uClinux-dist目录下执行:$make xconfig在Target Platform Selection选项卡中选择:Vendor/Product: GDB/ARMulatorKernel Version: linux-2.4.xLibc Version: uC-libc然后选择save and exit完成配置后,可以使用make dep建立内核依赖关系,然后使用make编译内核和文件系统$make dep; make经过一段时间的编译后,如果没有出现错误,则在uClinux-dist目录下的images目录里会建立如下几个文件:image.bin linux.data linux.text. romfs.img该romfs.img就是我们需要的文件系统映象了同时,在uClinux-dist/linux-2.4.x/目录下会生成linux,该文件是一个我们需要模拟的内核文件。接下来我们可以使用skyeye软件来模拟我们编译的uClinux系统了。我们在uClinux-dist目录下建立一个名为skyeye.conf的配置文件。内容如下:cpu: arm7tdmimach: at91mem_bank: map=M, type=RW, addr=0x00000000, size=0x00004000mem_bank: map=M, type=RW, addr=0x01000000, size=0x00400000mem_bank: map=M, type=R, addr=0x01400000, size=0x00400000, file=images/romfs.imgmem_bank: map=M, type=RW, addr=0x02000000, size=0x00400000mem_bank: map=M, type=RW, addr=0x02400000, size=0x00008000mem_bank: map=M, type=RW, addr=0x04000000, size=0x00400000mem_bank: map=I, type=RW, addr=0xf0000000, size=0x10000000lcd: state=on保存退出然后在uClinux-dist目录里执行~/download/skyeye-v1/binary/skyeye -e linux-2.4.x/linux看看uclinux是不是跑起来了?下面是我的输出arch: armcpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0mach info: name at91, mach_init addr 0x80727e0can't find device module: (null)SKYEYE: use arm7100 mmu opsLoaded ROM images/romfs.imgexec file "linux-2.4.x/linux"'s format is elf32-little.load section .init: addr = 0x01000000 size = 0x0000a000.load section .text: addr = 0x0100a000 size = 0x000c5ca0.load section .data: addr = 0x010d0000 size = 0x00008320.not load section .bss: addr = 0x010d8320 size = 0x00022198 .not load section .debug_abbrev: addr = 0x00000000 size = 0x00039846 .not load section .debug_info: addr = 0x00000000 size = 0x016b812f .not load section .debug_line: addr = 0x00000000 size = 0x00378ef3 .not load section .debug_pubnames: addr = 0x00000000 size = 0x0000b40d .not load section .debug_aranges: addr = 0x00000000 size = 0x000022e0 .start addr is set to 0x01000000 by exec file.Linux version 2.4.19-uc1 (jelly@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/)∞) #1 五 4#1 五 4月 7 23:41:40 CST 2006Processor: Atmel AT91M40xxx revision 0Architecture: EB01On node 0 totalpages: 1024zone(0): 0 pages.zone(1): 1024 pages.zone(2): 0 pages.Kernel command line: root=/dev/rom0Calibrating delay loop... 12.97 BogoMIPSMemory: 4MB = 4MB totalMemory: 3036KB available (791K code, 170K 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 UNIFIXLinux NET4.0 for Linux 2.4Based upon Swansea University Computer Society NET3.039Initializing RT netlink socketStarting kswapdAtmel USART driver version 0.99ttyS0 at 0xfffd0000 (irq = 2) is a builtin Atmel APB USARTttyS1 at 0xfffcc000 (irq = 3) is a builtin Atmel APB USARTBlkmem copyright 1998,1999 D. Jeff DionneBlkmem copyright 1998 Kenneth AlbanowskiBlkmem 1 disk images:0: 1400000-145DBFF [VIRTUAL 1400000-145DBFF] (RO)RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizeNET4: Linux TCP/IP 1.0 for NET4.0IP Protocols: ICMP, UDP, TCPIP: routing cache hash table of 512 buckets, 4KbytesTCP: 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/rcCommand: hostname GDB-ARMulatorCommand: /bin/expand /etc/ramfs.img /dev/ram0Command: mount -t proc proc /procCommand: mount -t ext2 /dev/ram0 /varCommand: mkdir /var/tmpCommand: mkdir /var/logCommand: mkdir /var/runCommand: mkdir /var/lockCommand: cat /etc/motdWelcome to_ _/ | ||_|_ _| | | | _ _ _ _ _| | | | | | || | _ /| | | |/ // /| |_| | || || | | | | |_| |/ /| _/|_||_|_| |_|/|/_//_/| ||_|GDB/ARMulator support by For further information check:http://www.uclinux.org/∞Execution Finished, ExitingSash command shell (version 1.1.1)/>对于skyeye.conf文件的一点说明对于skyeye-v0.2.5版本之前的skyeye使用的是memmap.conf文件,而之后的是使用skyeye.conf文件cpu: 指定CPU类型,如arm7tdmi,arm720t等mach: 开发板类型,如at91, ep7312mem_bank: 内存块map=M 指定为rom/ram, map=I 指定为IO空间type=RW 可读写,type=R 只读addr=0x00000000 内存块开始地址size=0x10000000 内存块大小files=romfs.img 文件系统映象文件net: 网络配置state=on 模拟NIC,等于off则不模拟mac=0:4:3:2:1:f 指定MAC地址ethmod=tuntap/vnet 使用虚拟驱动hostip= 指定ip地址例如:net: state = on, mac=0:4:3:2:1:f, ethmod=tuntap, hostip=10.0.0.1uart: 串口支持fd_in= 指定输入文件fd_out= 指定输出文件例如:uart: fd_in=/dev/ttyS0, fd_out=/dev/ttyS1则你可以使用minicon来监听COM1口来进行数据交换LCD:LCD模拟state = on/off 打开或者关闭LCD模拟4.SkyEye调试功能要使用SkeyEye调试功能,可以在执行的时候加入-d参数,例如:$skyeye -e linux -d这时就在本机的12345端口开启了gdb服务这时重新开一个终端程序$arm-elf-gdb linux(gdb)target remote 127.0.0.1:12345此时就可以象使用本地gdb一样来调试服务端的uClinux了。5.参考文档1.skyeye源码2.SkyEye User Manual http://skyeye.sourceforge.net/wiki/UserManual∞3.skyeyelcdts http://gro.clinux.org/frs/download.php/789/SkyEyelcdtouchscreen4gro.pdf∞4.skyeyeinternal http://gro.clinux.org/frs/download.php/719/skyeyeinternal-0.6.8.pdf∞5.hardwaredoc4skyeye http://gro.clinux.org/frs/download.php/835/hardwaredoc4skyeye.tar.bz2∞
原创粉丝点击