Ubuntu 16.04上安装SkyEye及测试
说明一下,在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及测试的更多相关文章
- 如何在Ubuntu 16.04上安装配置Redis
如何在Ubuntu 16.04上安装配置Redis Redis是一个内存中的键值存储,以其灵活性,性能和广泛的语言支持而闻名.在本指南中,我们将演示如何在Ubuntu 16.04服务器上安装和配置Re ...
- Ternsorflow 学习:000-在 Ubuntu 16.04 上安装并使用 TensorFlow_v1.14 (改)
声明:本人已经对原文链接根据情况做出合理的改动. 本系列文章使用的是Tensorflow v1.14 引言 TensorFlow 是由谷歌构建的用于训练神经网络的开源机器学习软件.TensorFlow ...
- 在 Ubuntu 16.04上安装 vsFTPd
在 Ubuntu 16.04上安装 vsFTPd Ubuntu vsFTPd 关于 vsFTPd vsFTPd 代表 Very Secure File Transfer Protocol Daemon ...
- 在 Ubuntu 16.04 上安装 Eclipse Oxygen
2017 年 6 月 28 日,Eclipse 社区(the Eclipse Community)发布了 Eclipse Oxygen.本文记录了我在 Ubuntu 16.04 上安装 Eclipse ...
- 如何在Ubuntu 16.04上安装Apache Web服务器
转载自:https://www.howtoing.com/how-to-install-the-apache-web-server-on-ubuntu-16-04 介绍 Apache HTTP服务器是 ...
- 如何在Ubuntu 16.04上安装Nginx
原文链接https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04 介绍 Nginx是世 ...
- ubuntu 16.04上安装php5.6
php --ini 按下面的步骤,在ubuntu 16.04上面安装成功了 php5.6 dpkg -l | grep php| awk '{print $2}' |tr "\n" ...
- 在 Ubuntu 16.04 上安装 LEMP 环境之图文向导
导读 LEMP 是个缩写,代表一组软件包(注解 ① L:Linux OS,E:Nginx 网络服务器,M:MySQL/MariaDB 数据库和 P:PHP 服务端动态编程语言),它被用来搭建动态的网络 ...
- Ubuntu 16.04上安装并配置Postfix作为只发送SMTP服务器
如果大家已经在使用第三方邮件服务方案发送并收取邮件,则无需运行自己的邮件服务器.然而,如果大家管理一套云服务器,且其中安装的应用需要发送邮件通知,那么运行一套本地只发送SMTP服务器则更为理想. 如何 ...
随机推荐
- linux内核I2C子系统学习(三)
写设备驱动: 四部曲: 构建i2c_driver 注册i2c_driver 构建i2c_client ( 第一种方法:注册字符设备驱动.第二种方法:通过板文件的i2c_board_info填充,然后注 ...
- poj-3744-Scout YYF I-矩阵乘法
f[i]=f[i-1]*p+f[i-2]*(1-p); 正好能够用矩阵加速. . . . #include<stdio.h> #include<string.h> #inclu ...
- Spring核心(ioc控制反转)
IoC,Inversion Of Control 即控制反转,由容器来管理业务对象之间的依赖关系,而非传统方式中的由代码来管理. 其本质.即将控制权由应用程序代码转到了外部容器,控制权的转移就是 ...
- PS 基础知识 .atn文件如何使用
ANT文件就是Frames.atn类动作文件 具体安装步骤如下 : (以CS4 为例) 启动Photoshop 点击"窗口" 选"动作" 在弹出的动作面板里,点 ...
- 微信授权网页登陆,oauth
1.在微信公众号请求用户网页授权之前.开发人员须要先到公众平台官网中的开发人员中心页配置授权回调域名.请注意,这里填写的是域名(是一个字符串),而不是URL,因此请勿加http://等协议头. 2.授 ...
- final 和static
一.final 1.final变量: 当你在类中定义变量时,在其前面加上final关键字,那便是说,这个变量一旦被初始化便不可改变,这里不可改变的意思对基本类型来说是其值不可变,而对于对象变量来说其引 ...
- PHP中curl获取本机虚拟主机接口
在PHP的curl代码中增加header可解决此问题. $header = array( "Host: 你的域名(不能包含http://)", "Accept: text ...
- 如何打造你的独特观点(一) ——形成“自己的想法”的基础课zz
信息过载的时代,能在各种KOL的声音中保持独立思考很不容易,能输出独特观点又进一层.不断练习我们独立思考的能力,有助于看清周围复杂的事物,也能让我们在日常生活中给人留下“有趣之人”的印象,提升人际交往 ...
- 运维基础-IO 管道
什么是文件描述符FD或者文件句柄? 通过构建一个带有编号标记的通道(文件描述符)的进程结构来管理打开的文件.今晨连接到文件,从而达到这些文件所代表的的数据内容或者设备.通过使用通道0.1.2(称为标准 ...
- java的多生产者多消费者例子
import java.util.concurrent.locks.*; public class Test9 { public static void main(String[] args) { / ...