说明一下,在Ubuntu 16.04上安装SkyEye方法不是原创,是来自互联网,仅供学习参考。

一、检查支持软件包

gcc,
make,
vim(optional),
ssh,
subversion
binutils-dev (bfd)
atk-dev (libatk1.0-dev)
gtk+-2.0-dev (libgtk2.0-dev)
pkg-config
pango-dev (libpango1.0-dev)
freetype2-dev (libfreetype6-dev)
glib-dev (libglib2.0-dev)
x11-dev (libx11-dev)

建议您在终端里输入sudo apt-get install 软件包 来逐个检查,例如sudo apt-get install libx11-dev用来检x11-dev是否安装。我用Ubuntu16.04系统直接运行sudo apt-get install skyeye可以安装成功,安装的过程中如果系统提示缺少包,再按提示安装即可。

二、安装skyeye

1、建议在终端里输入sudo apt-get install skyeye来安装,这种方式安装默认安装的版本为1.2.5,。

2、也可以下载源码包进行编译安装,源码安装方法如下:

--------------------------------------------------------------------------------------------------------------------------

源码安装参考了:http://blog.csdn.net/xumin330774233/article/details/18703391

(1)、下载源码包skyeye-1.3.5_rc1.tar.bz2

(2)、解压源码包:

tar -jxvf skyeye-1.3.5_rc1.tar.bz2

(3)、安装一系列依赖库:

libgtk2.0-dev

pkg-config

libatk1.0-dev

libpango1.0-dev

libfreetype6-dev

libglib2.0-dev

libx11-dev

binutils-dev

libncurses5-dev

libxpm-dev

autoconf

automake

libtool

python-dev

根据不同的系统可能还需要其他一些依赖库,根据实际情况安装。

Ubuntu16.04默认安装了python2.7.11版本,所以我没有重新编译python源码和重新安装。

(4)、输入命令:

./configure --prefix=/opt/skyeye

make lib

make

make install_lib

make install

这几个步骤中可能会出现错误:

a、make lib的时候:libopcodes In function 'SUBWORDSISF': third-party/opcodes/cgen-ops.h:323: multiple definition

这个解决方法参考了:http://blog.csdn.net/u012140133/article/details/51943605

问题在于重复定义。具体而言,extern 变量或函数被包含时,可能被多个文件包含。因为 gcc 是对每个文件单独编译然后在对所有文件一起链接的,所以,在不声明全局变量的前提下,编译时不会报告错误而链接时会发生重复定义。

解决方法有两个:
1. 对于单个文件多次包含,可在被包含文件首末加上 #ifndef **  #define **  #endif
2. 对于多个文件多次包含,只能将被包含内容声明为 static

我们按提示找到 third-party/opcodes/cgen-ops.h 第 323 行,发现是一个 SEMOPS_INLINE 类型的宏函数,就是它被重复定义了。所以现在将其声明为 static 。其他类似的函数也要这么声明。

    ---: #define SEMOPS_INLINE extern inline
+++: #define SEMOPS_INLINE static inline ---: QI SUBWORDSIQI (SI, int);
---: HI SUBWORDSIHI (SI, int);
---: SI SUBWORDSFSI (SF);
---: SF SUBWORDSISF (SI);
---: DI SUBWORDDFDI (DF);
---: DF SUBWORDDIDF (DI);
---: QI SUBWORDDIQI (DI, int);
---: HI SUBWORDDIHI (DI, int);
---: SI SUBWORDDISI (DI, int);
---: SI SUBWORDDFSI (DF, int);
---: SI SUBWORDXFSI (XF, int);
---: SI SUBWORDTFSI (TF, int); +++: SEMOPS_INLINE QI SUBWORDSIQI (SI, int);
+++: SEMOPS_INLINE HI SUBWORDSIHI (SI, int);
+++: SEMOPS_INLINE SI SUBWORDSFSI (SF);
+++: SEMOPS_INLINE SF SUBWORDSISF (SI);
+++: SEMOPS_INLINE DI SUBWORDDFDI (DF);
+++: SEMOPS_INLINE DF SUBWORDDIDF (DI);
+++: SEMOPS_INLINE QI SUBWORDDIQI (DI, int);
+++: SEMOPS_INLINE HI SUBWORDDIHI (DI, int);
+++: SEMOPS_INLINE SI SUBWORDDISI (DI, int);
+++: SEMOPS_INLINE SI SUBWORDDFSI (DF, int);
+++: SEMOPS_INLINE SI SUBWORDXFSI (XF, int);
+++: SEMOPS_INLINE SI SUBWORDTFSI (TF, int); ---: UQI SUBWORDSIUQI (SI, int);
---: UQI SUBWORDDIUQI (DI, int);
+++: SEMOPS_INLINE UQI SUBWORDSIUQI (SI, int);
+++: SEMOPS_INLINE UQI SUBWORDDIUQI (DI, int);

b、make过程中可能出现的错误:

1、/usr/bin/ld: cannot find -lltdl,解决办法:可能是libtool未安装正确,重新输入命令sudo apt-get install libtool即可。

2、/usr/bin/ld: cannot find -liconv,解决办法:由于系统源中没有libiconv的库,所以要下载源码:ftp://gnu.mirror.iweb.com/libiconv/,下载源码后解压:

tar -zxvf libiconv-1.14.tar.gz

./configure --prefix=/usr/local
make
make install

make的时候出现:
./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
修改libiconv-1.14/srclib/stdio.h文件,把上句中的gets改为fgets,重新make。

3、fatal error: gtk/gtk.h: No such file or directory  fatal error: glibconfig.h: No such file or directory等,解决办法:
首先查看系统中是否有该头文件存在,可以在/usr/include和/usr/lib下查找,查找命令为:find /usr/include | grep "gtk.h",如果系统中不存在该头文件那么是相应的依赖库没有安装,先安装依赖库;如果系统中存在头文件那么是包含路径没有包含。如果因为包含路径没有包含,可以在Makefile文件中增加包含路径,例如在skyeye-1.3.5_rc1/device/touchscreen_s3c6410/touchscreen_s3c6410.c源文件中找不到头文件,可以在skyeye-1.3.5_rc1/device路径下的Makefile中增加头文件包含路径:

am__append_25 = -I/usr/include/gtk-2.0/ \
                -I/usr/include/pango-1.0/ \
                      -I/usr/include/glib-2.0/ \
                                -I/usr/lib/i386-linux-gnu/glib-2.0/include/ \
                                -I/usr/lib/i386-linux-gnu/gtk-2.0/include/ \
                                -I/usr/include/cairo/        \
                                -I/usr/include/gdk-pixbuf-2.0/    \
                                -I/usr/include/atk-1.0/

以上步骤完成后可以进入到/opt/skyeye/bin目录下,输入命令./skyeye查看软件版本信息,这个时候可能会出现以下错误:

ImportError: /usr/lib/python2.7/lib-dynload/_ctypes.i386-linux-gnu.so: undefined symbol: PyFloat_Type

首先查看一下_ctypes.i386-linux-gnu.so对python的依赖库:

ldd /usr/lib/python2.7/lib-dynload/_ctypes.i386-linux-gnu.so

 linux-gate.so.1 =>  (0xb77a9000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb774b000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7595000)
    libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb758b000)
    /lib/ld-linux.so.2 (0x800a2000)
发现_ctypes.i386-linux-gnu.so并没有依赖python库,在/usr/lib/i386-linux-gnu/libpython2.7.so.1.0库中通过命令查看是否有PyFloat_Type的定义:

readelf -a /usr/lib/i386-linux-gnu/libpython2.7.so.1.0 | grep PyFloat_Type
00328c44  00016406 R_386_GLOB_DAT    00361ce0   PyFloat_Type
356: 00361ce0   196 OBJECT  GLOBAL DEFAULT   24 PyFloat_Type
可以看到libpython2.7.so.1.0中定义了PyFloat_Type,但是没找到解决方法 。偶然看到一个帖子上说可以通过加"-n"参数尝试不使用命令行启动,python主要是负责命令行的解析和显示的。

这样测试/opt/skyeye/testsuite/arm_hello程序就通过了,输入以下命令可以看到窗口一直打印helloworld:

/opt/skyeye/bin/skyeye -n -e arm_hello

出现上述问题时还有一种方法就是重新编译安装python2.7:

下载python2.7源码:https://www.python.org/downloads/release/python-2712/

加压源码:tar -zxvf Python-2.7.12.tgz

进入源码根目录并配置:./configure --enable-shared --enable-unicode=ucs4

sudo make

sudo make install

安装完毕后再次运行skyeye已经不会出现上述问题。

--------------------------------------------------------------------------------------------------------------------------------------------------------

三、检查skyeye安装是否正确

在终端中输入skyeye并回车,如果出现下面信息,说明安装正确。

**************************** WARNING **********************************
If you want to run ELF image, you should use -e option to indicate
your elf-format image filename. Or you only want to run binary image,
you need to set the filename of the image and its entry in nf.
***********************************************************************

Your elf file is little endian.
Failed to open skyeye config file nf in the same directory
error: No such file or directory
SkyEye 1.2.5
Bug report: skyeye-developer@list
Usage: skyeye [options] -e program [program args]
Default mode is STANDALONE mode
------------------------------------------------------------------
Options:
-e exec-file        the (ELF executable format)kernel file name.
-l load_address,load_address_mask
                    Load ELF file to another address, not its entry.
-b                  specify the data type is big endian when non "-e" option.
-d                  in GDB Server mode (can be connected by GDB).
-c config-file      the skyeye configure file name.
-h                  The SkyEye command options, and ARCHs and CPUs simulated.
------------------------------------------------------------------
----------- Architectures and CPUs simulated by SkyEye-------------
-------- ARM architectures ---------
at91
lpc
s3c4510b
s3c44b0x
s3c44b0
s3c3410x
ep7312
lh79520
ep9312
cs89712
sa1100
pxa_lubbock
pxa_mainstone
at91rm92
s3c2410x
s3c2440
sharp_lh7a400
ns9750
-------- BlackFin architectures ----
bf533
bf537

如果没有出现上面信息,而是出现:

skyeye: error while loading shared libraries:
libbfd-2.19.90.20090909.so: cannot open shared object file: No such file
or directory

解决方法:在Ubuntu
16.04中libbfd版本是libbfd-2.20.1-system.20100303.so,而需要的是libbfd-
2.19.90.20090909.so,手动创建符号链接即可,在终端中输入如下命令:sudo ln -s
/usr/lib/libbfd-2.20.1-system.20100303.so
/usr/lib/libbfd-2.19.90.20090909.so并回车,OK!在在终端中执行skyeye命令,会打印出正确信息。

4.测试

下载skyeye-testsuite-1.2.5,用tar
jxvf解压,在终端中进入skyeye-testsuite-1.2.5/uClinux/at91/uclinux_cs8900a,执行以下命
令:sudo skyeye -e linux,会打印出如下信息:

Your elf file is little endian.
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x80605a0
ethmod num=1, mac addr=0:0:0:0:0:0, hostip=10.0.0.1
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm7100 mmu ops
Loaded ROM   ./romfs.img
exec file "linux"'s format is elf32-little.
load section .init: addr = 0x01000000 size = 0x0000a000.
load section .text: addr = 0x0100a000 size = 0x000e1cd0.
load section .data: addr = 0x010ec000 size = 0x0000a434.
not load section .bss: addr = 0x010f6440 size = 0x000222c0 .
call ARMul_InitSymTable,kernel filename is linux.
start addr is set to 0x01000000 by exec file.
Linux
version 2.4.27-uc1 (skyeyeuser@debian) (gcc version 2.95.3 20010315
(release)(ColdFire patches - 20010318 from )(uClinux XIP and shared lib
patches from )) #3 Tue Aug 9 18:57:29 CST 2005
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... 15.82 BogoMIPS
Memory: 4MB = 4MB total
Memory: 2916KB available (903K code, 178K 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-1512BFF [VIRTUAL 1400000-1512BFF] (RO)
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Cirrus Logic CS8900A driver for Linux (V0.02)
eth0: CS8900A rev D detected
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: mkdir /var/empty
Command: cat /etc/motd
Welcome to

____ _ _
     / __| ||_|                
    _   _| | | | _ ____ _   _ _ _
   | | | | | | || | _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   | ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

GDB/ARMulator support by <>
For further information check:

Command: /bin/ifconfig eth0 up 10.0.0.2
Execution Finished, Exiting

Sash command shell (version 1.1.1)

而后可以输入一些命令进行测试,例如ls、cd等系统常用命令。

Ubuntu 16.04上安装SkyEye及测试的更多相关文章

  1. 如何在Ubuntu 16.04上安装配置Redis

    如何在Ubuntu 16.04上安装配置Redis Redis是一个内存中的键值存储,以其灵活性,性能和广泛的语言支持而闻名.在本指南中,我们将演示如何在Ubuntu 16.04服务器上安装和配置Re ...

  2. Ternsorflow 学习:000-在 Ubuntu 16.04 上安装并使用 TensorFlow_v1.14 (改)

    声明:本人已经对原文链接根据情况做出合理的改动. 本系列文章使用的是Tensorflow v1.14 引言 TensorFlow 是由谷歌构建的用于训练神经网络的开源机器学习软件.TensorFlow ...

  3. 在 Ubuntu 16.04上安装 vsFTPd

    在 Ubuntu 16.04上安装 vsFTPd Ubuntu vsFTPd 关于 vsFTPd vsFTPd 代表 Very Secure File Transfer Protocol Daemon ...

  4. 在 Ubuntu 16.04 上安装 Eclipse Oxygen

    2017 年 6 月 28 日,Eclipse 社区(the Eclipse Community)发布了 Eclipse Oxygen.本文记录了我在 Ubuntu 16.04 上安装 Eclipse ...

  5. 如何在Ubuntu 16.04上安装Apache Web服务器

    转载自:https://www.howtoing.com/how-to-install-the-apache-web-server-on-ubuntu-16-04 介绍 Apache HTTP服务器是 ...

  6. 如何在Ubuntu 16.04上安装Nginx

    原文链接https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04 介绍 Nginx是世 ...

  7. ubuntu 16.04上安装php5.6

    php --ini 按下面的步骤,在ubuntu 16.04上面安装成功了 php5.6 dpkg -l | grep php| awk '{print $2}' |tr "\n" ...

  8. 在 Ubuntu 16.04 上安装 LEMP 环境之图文向导

    导读 LEMP 是个缩写,代表一组软件包(注解 ① L:Linux OS,E:Nginx 网络服务器,M:MySQL/MariaDB 数据库和 P:PHP 服务端动态编程语言),它被用来搭建动态的网络 ...

  9. Ubuntu 16.04上安装并配置Postfix作为只发送SMTP服务器

    如果大家已经在使用第三方邮件服务方案发送并收取邮件,则无需运行自己的邮件服务器.然而,如果大家管理一套云服务器,且其中安装的应用需要发送邮件通知,那么运行一套本地只发送SMTP服务器则更为理想. 如何 ...

随机推荐

  1. ubuntu安装常用软件

    安装unzip sudo apt-get install unzip

  2. SolidEdge 工程图中如何给零件添加纹理或贴图

    格式-检视-勾选纹理   选中一个零件之后,点击格式-面,在纹理选项卡中找到纹理的贴图   最后效果如下图所示,如果不勾选检视纹理,则虽然的确贴图了,但是不显示出来给你看.如果贴图文件没了,也不会显示 ...

  3. hdu 4432 数学杂题

    http://acm.hdu.edu.cn/showproblem.php?pid=4432 6分钟写的代码,一上午去调试,, 哎,一则题目没看懂就去写了,二则,哎,,恶心了.在坚持几天然后ACM退役 ...

  4. iOS 私有库的使用

    最近项目说要用私有库 主要过程 创建两个库:  索引库   组件库 组件库  用git操作  比如更新代码 push   打tag等 索引库  存放组件的描述信息 也就是 .spec文件 这个文件和 ...

  5. Ubuntu 登陆异常-输入正确的密码后还会返回到登陆界面的问题

    问题表现: 启动到了登陆界面,输入对应的密码,发现一闪黑屏有返回到登陆界面,如此往复. 解决方法: 开机后在登陆界面按下shift + ctrl + F1进入tty命令行终端登陆,可以查看用户主目录下 ...

  6. websotrom 2016.2 license Server

    license server” 输入:http://114.215.133.70:41017 仅供学习测试使用,支持正版.

  7. 记录一次在 VirtualBox的添加共享windows文件后,发现没有共享文件的事

    在VirtualBox设置完桥接添加ip后,在设备中添加共享windows文件,“e:\work ”,发现共享目录没有文件.使用了各种reboot之后,还是没有发现共享文件夹,重新设置还是不行,用mo ...

  8. 800元组装一台3D打印机全教程流程-零件清单

    继前面的教程800元组装一台3D打印机全教程流程 k800是一台根据kosselmini改进的低成本3d打印机,通过改变设计,降低了成本,但损失较少性能,取得性价比. 主要改动是:底部支架改为-> ...

  9. iOS进程间通信之CFMessagePort

    本文转载至 http://www.cocoachina.com/industry/20140606/8701.html iOS系统是出了名的封闭,每个应用的活动范围被严格地限制在各自的沙盒中.尽管如此 ...

  10. Xcode 6 IDE

    本文转载至 http://www.cocoachina.com/ios/20140823/9442.html     (via:苹果开发者中心) Xcode IDE 是 Apple 开发体验的核心.X ...