一、前言
Skyeye是一个嵌入式开发板模拟软件,支持多种指令集、多种CPU。本文介绍Skyeye-1.3.5工具的安装。基于以下环境:
1.Ubuntu14.04 LTS (32位), 运行于VMWare虚拟机中;
2.Skyeye-1.3.5;
二、准备
1.下载Skyeye-1.3.5源代码
下载地址:https://sourceforge.net/projects/skyeye/files/skyeye/
hello@hello-pc:~/Desktop$ ls skyeye-1.3.5_rc1.tar.bz2
skyeye-1.3.5_rc1.tar.bz2
hello@hello-pc:~/Desktop$ tar -vxf skyeye-1.3.5_rc1.tar.bz2
2.下载并安装所需依赖库(libiconv-1.14.tar.gz);
hello@hello-pc:~/Desktop$ ls libiconv-1.14.tar.gz
libiconv-1.14.tar.gz
hello@hello-pc:~/Desktop$ tar -vxf libiconv-1.14.tar.gz
hello@hello-pc:~/Desktop$ cd
libiconv-1.14/ Python-2.7/ skyeye-testsuite-1.3.4_rc1/ vmware-tools-distrib/
hello@hello-pc:~/Desktop$ cd libiconv-1.14/
hello@hello-pc:~/Desktop/libiconv-1.14$ ls
ABOUT-NLS ChangeLog configure DESIGN HACKING libtool man PORTS src THANKS
aclocal.m4 config.h configure.ac djgpp include m4 NEWS preload srclib tools
AUTHORS config.h.in COPYING doc INSTALL.generic Makefile NOTES README srcm4 windows
autogen.sh config.log COPYING.LIB extras lib Makefile.devel os2 README.djgpp stamp-h1 woe32dll
build-aux config.status DEPENDENCIES gnulib-local libcharset Makefile.in po README.woe32 tests
hello@hello-pc:~/Desktop/libiconv-1.14$ ./configure ; sudo make ; sudo make install
若make install过程出现错误:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function),需要修改如下:
hello@hello-pc:~/Desktop/libiconv-1.14$ gvim ./srclib/stdio.h
_GL_CXXALIAS_SYS (gets, char *, (char *s));
# undef gets
# endif
_GL_CXXALIASWARN (gets);
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16) /*Add here*/
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
#endif
3.下载并安装所需依赖库(Python-2.7);
hello@hello-pc:~/Desktop$ cd Python-2.7/
hello@hello-pc:~/Desktop/Python-2.7$ ls
build configure.in Include libpython2.7.so Makefile Modules PCbuild Python setup.py
config.log Demo install-sh libpython2.7.so.1.0 Makefile.pre Objects pyconfig.h python-gdb.py Tools
config.status Doc Lib LICENSE Makefile.pre.in Parser pyconfig.h.in README
configure Grammar libpython2.7.a Mac Misc PC python RISCOS
hello@hello-pc:~/Desktop/Python-2.7$ ./configure --enable-shared --enable-unicode=ucs4
hello@hello-pc:~/Desktop/Python-2.7$ sudo make
hello@hello-pc:~/Desktop/Python-2.7$ sudo make install
说明:若不正常安装Python-2.7, skyeye安装会出现如下错误;
sudo apt-get install python-dev
-g -O2 -MT pycli.lo -MD -MP -MF .deps/pycli.Tpo -c -o pycli.lo `test -f 'pycli/pycli.c' || echo './'`pycli/pycli.c
/bin/bash: python-config: command not found
libtool: compile: gcc -g -O2 -D_FILE_OFFSET_BITS=64 -DSTANDALONE -DDEFAULT_INLINE=0 -DSKYEYE_BIN=\"/opt/skyeye/bin/\" -g -O2 -Werror-implicit-function-declaration -Werror=return-type -Wmissing-field-initializers -Wuninitialized -I. -I.. -I../third-party/include/ -I../third-party/bfd/ -I../third-party/bfd/ -I../common -I../common/include -I./common/ -g -O2 -MT pycli.lo -MD -MP -MF .deps/pycli.Tpo -c pycli/pycli.c -fPIC -DPIC -o .libs/pycli.o
pycli/pycli.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
make[2]: *** [pycli.lo] Error 1
make[2]: Leaving directory `/home/hello/skyeye/skyeye-1.3.5_rc1/utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/hello/skyeye/skyeye-1.3.5_rc1'
make: *** [all] Error 2
hello@hello-pc:~/skyeye/skyeye-1.3.5_rc1$ gvim pycli/pycli.c
4.安装所需依赖库
hello@hello-pc:~/Desktop/Python-2.7$ sudo apt-get install libgtk2.0-dev pkg-config libatk1.0-dev
hello@hello-pc:~/Desktop/Python-2.7$ sudo apt-get install libpango1.0-dev libfreetype6-dev libglib2.0-dev libx11-dev binutils-dev
hello@hello-pc:~/Desktop/Python-2.7$ sudo apt-get install libncurses5-dev libxpm-dev libltdl-dev
hello@hello-pc:~/Desktop/Python-2.7$
三、安装Skyeye-1.3.5
hello@hello-pc:~/Desktop$ cd ../skyeye/skyeye-1.3.5_rc1/
hello@hello-pc:~/skyeye/skyeye-1.3.5_rc1$ ls
aclocal.m4 bochs_config.h.in config.log Doxyfile ltdlconf.h Makefile.in pyshell stamp-h2
android ChangeLog config.status emulator ltdlconf.h.in misc README stamp-h3
android_emulator.o common config.sub gui ltmain.sh missing REPORTING-BUGS testsuite
arch conf configure INSTALL m4 mknandflashdump setenv.o third-party
AUTHORS config.guess configure.in install-sh MAINTAINERS mknandflashdump.o skyeye TODO
autogen.sh config.h COPYING libltdl Makefile NEWS skyeye.o uart_console.o
autom4te.cache config.h.in depcomp libtool Makefile.am prof_convert soc uart_instance
bochs_config.h config.h.in~ device LICENSE Makefile.android prof_convert.o stamp-h1 utils
hello@hello-pc:~/skyeye/skyeye-1.3.5_rc1$ sudo make
hello@hello-pc:~/skyeye/skyeye-1.3.5_rc1$ sudo make install
hello@hello-pc:~/skyeye/skyeye-1.3.5_rc1$ sudo make install_lib
hello@hello-pc:~/skyeye/skyeye-1.3.5_rc1$
四、启动skyeye
hello@hello-pc:/opt/skyeye$ cd /opt/skyeye/
hello@hello-pc:/opt/skyeye$ ls
bin include info lib testsuite
hello@hello-pc:/opt/skyeye$ cd testsuite/arm_hello/
hello@hello-pc:/opt/skyeye/testsuite/arm_hello$ ../../bin/skyeye -e arm_hello
SkyEye 1.3.5
SkyEye is an Open Source project under GPL. All rights of different parts or modules are reserved by their author. Any modification or redistributions of SkyEye should not remove or modify the annoucement of SkyEye copyright.
Get more information about it, please visit the homepage http://www.skyeye.org.
Type "help" to get command list.
(skyeye)
运行简单arm_hello实例效果如下: