说明一下,在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. Direct2D教程(一)Direct2D已经来了,谁是GDI的终结者?

    什么是Direct2D 一言以蔽之,就是Windows 7平台上的一个2D图形API,可以提供高性能,高质量的2D渲染.大多数人对Direct2D可能都比较陌生,以至于我之前在论坛上提到这个词的时候, ...

  2. PS 基础知识 如何绘制几何图形

    注意:规则的几何图形必须用路径工具,如果使用简单的椭圆工具再描边,则效果是像素堆砌起来的.图像一旦放大就是出现明显的失真.   使用钢笔工具,然后选择路径工具,然后选择需要绘制的图形.   如果需要找 ...

  3. HashSet中存方用户自己定义数据类型数据,重写equals方法和hashCode方法

    import java.util.Set; import java.util.HashSet; public class SetTest { public static void main(Strin ...

  4. 【iOS】UIWebView的HTML5扩展之canvas篇

    先前公布大那个所谓的"HTML5"扩展严格说来还算不是"HTML5".曲曲几行JS代码就自诩为HTML5扩展多少有些标题党的嫌疑. 而相比之下,本篇的主题can ...

  5. Flex4_Tree组件1(添加、删除、展开、关闭、右键菜单)

    1.屏蔽系统菜单:工程目录“html-template”文件夹-->“index.template.html”文件中,在var params = {};语句下添加新语句:        para ...

  6. 小数运算需要注意什么? 接口和抽象类 WinForm窗体上两个panel,怎么实现一个panel固定漂浮在另一个panel之上

    小数运算需要注意什么? 1. 生活中0.1+0.2=0.3, 计算机中可不是这样,为什么呢? 大家都知道计算机类型都是有数据范围的.整形int范围是 正负21亿左右,小数类型同样也是有范围的,但是即使 ...

  7. poj3181 Dollar Dayz

    Description Farmer John goes to Dollar Days at The Cow Store and discovers an unlimited number of to ...

  8. caffe搭建----Visual Studio 2015+CUDA8.0+CUDNN5配置Caffe-windows(BLVC)

    原文来源:  来源:Angle_Cal  2016-12-19 17:32 本博主修改于2017-09-12.  版权所有,转载请注明出处.   BLVC版本的Caffe-windows已经支持Vis ...

  9. 宜信开源|分布式任务调度平台SIA-TASK的架构设计与运行流程

    一.分布式任务调度的背景 无论是互联网应用或者企业级应用,都充斥着大量的批处理任务.我们常常需要一些任务调度系统来帮助解决问题.随着微服务化架构的逐步演进,单体架构逐渐演变为分布式.微服务架构.在此背 ...

  10. 07 http内容压缩

    一:http内容压缩 思考: Content-Length在之前的学习中,我们知道,代表返回的主体的长度 但此处,为什么返回的主体长度和content-length不一致呢? 原因在于: Conten ...