Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2112200
  • 博文数量: 438
  • 博客积分: 3871
  • 博客等级: 中校
  • 技术积分: 6075
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-10 00:11
个人简介

邮箱: wangcong02345@163.com

文章分类

全部博文(438)

文章存档

2017年(15)

2016年(119)

2015年(91)

2014年(62)

2013年(56)

2012年(79)

2011年(16)

分类: LINUX

2012-06-30 10:06:34

系统: ubuntu 10.10
一、配置工具链
1.1 下载leeos_tools_for_linux.tar.gz 
1.2 解压到 /usr目录
1.3 添加环境变量
   root@ubuntu:~/test# echo 'PATH=$PATH:/usr/leeos_tools_for_linux/arm-elf/bin/' >> /etc/profile

   root@ubuntu:~/test# echo 'PATH=$PATH:/usr/leeos_tools_for_linux/libexec/gcc/arm-elf/4.4.3/' >> /etc/profile

   root@ubuntu:~/test# echo 'PATH=$PATH:/usr/leeos_tools_for_linux/bin/' >> /etc/profile
二、安装skyeye
2.1 利用apt-get install 安装的skyeye版本好像有问题,一运行就报错
   2.1.1 安装skyeye, SkyEye 1.2.5
      root@ubuntu:~/test# apt-get install skyeye
   2.1.2 运行skyeye,出现如下错误。
      root@ubuntu:~/test/part1# skyeye -c skyeye.conf -e leeos
Your elf file is little endian.
arch: arm
cpu info: armv4, arm920t, 41009200, ff00fff0, 2 
mach info: name s3c2410x, mach_init addr 0x806d3c0
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm920t mmu ops
Loaded RAM   ./leeos.bin
start addr is set to 0x30000000 by exec file.
SKYEYE:Error in mem_read_word, no bank found, NumInstrs 2, mem_read_word addr = 0 no bank
SKYEYE:Error in mem_read_word, no bank found, NumInstrs 2, mem_read_word addr = 4 no bank
SKYEYE:Error in mem_read_word, no bank found, NumInstrs 2, mem_read_word addr = 8 no bank
。。。
SKYEYE:Error in mem_read_word, no bank found, NumInstrs 2, mem_read_word addr = 10 no bank
2.2 源码编译skyeye
   2.2.1 安装必要的包
      root@ubuntu:~/skyeye# apt-get install libgtk2.0-dev pkg-config libatk1.0-dev libpango1.0-dev libfreetype6-dev libglib2.0-dev libx11-dev binutils-dev  libncurses5-dev  libxpm-dev libncurses5-dev
   2.2.2 安装llvm-2.8 (下载地址)
      root@ubuntu:~/skyeye/llvm-2.8# ./configure && make && make install 
   2.2.3 编译安装skyeye-1.3.3
      root@ubuntu:~/skyeye/skyeye# make lib && make 
      root@ubuntu:~/skyeye/skyeye# make install_lib && make install 
   2.2.4 需要修改skyeye.conf,在最后添加串口
      uart:mod=term
   2.2.5在生成有二进制文件的目录执行
      root@ubuntu:~/test/part1# /opt/skyeye/bin/skyeye_main.py -c skyeye.conf -e leeos
SkyEye 1.3.3
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
Type "help" to get command list. 
  LLVM EXIST
LLVM EXIST 
(skyeye) start
cpu info: armv4, arm920t, 41009200, ff00fff0, 2 
In do_mach_option, mach info: name s3c2410x, mach_init addr 0xf8fed0

uart_mod:3, desc_in:, desc_out:, converter:
In create_uart_console
Loaded RAM   ./leeos.bin
1 core is initialized.
SKYEYE: use arm920t mmu ops
SKYEYE: use arm920t mmu ops
exec file "leeos"'s format is elf32-i386.
In SIM_start, Set PC to the address 0x30000000

(skyeye) run
In start_all_thread, the thread 1 is set to running
In start_all_thread, the thread 2 is set to running
(running) 

在skyeye的命令行中输入start后会弹出一个窗口,然后再在命令行中输入run,那么在刚才弹出的窗口中就会出现打印的"hello,world"
2.2.6 编译安装时可能会出现的问题,总结一下
2.2.6.1 configure出错
root@ubuntu:~/skyeye/skyeye# ./configure --prefix=/opt/skyeye checking whether the C++ compiler works... no configure: error: in `/root/skyeye/skyeye': configure: error: C++ compiler cannot create executables See `config.log' for more details. root@ubuntu:~/skyeye/skyeye# apt-get install g++
2.2.6.2 编译时出错
root@ubuntu:~/skyeye/skyeye# make && make install /bin/bash: line 7: makeinfo: command not found make[2]: *** [bfd.info] Error 127 make[2]: Leaving directory `/root/skyeye/skyeye/third-party/bfd/doc' make[1]: *** [info-recursive] Error 1 make[1]: Leaving directory `/root/skyeye/skyeye/third-party/bfd' make: *** [third-party/bfd/.libs/libbfd.so] Error 2 root@ubuntu:~/skyeye/skyeye# apt-get install texinfo
2.2.6.3 编译出错
root@ubuntu:~/skyeye/skyeye# make libtool: link: (cd ".libs" && rm -f "libshutdown.so" && ln -s "libshutdown.so.0.0.0" "libshutdown.so") libtool: link: ( cd ".libs" && rm -f "libshutdown.la" && ln -s "../libshutdown.la" "libshutdown.la" ) make[2]: Leaving directory `/root/skyeye/skyeye/utils' Making all in libltdl make[2]: Entering directory `/root/skyeye/skyeye/libltdl' make[2]: *** No rule to make target `all'. Stop. make[2]: Leaving directory `/root/skyeye/skyeye/libltdl' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/skyeye/skyeye' make: *** [all] Error 2
root@ubuntu:~/skyeye/skyeye# make lib && make install_lib
2.2.6.4 编译出错
root@ubuntu:~/skyeye/skyeye# make
/bin/bash: llvm-config: command not found
这个需要先安装llvm,然后重新编译skyeye
2.2.6.5 运行时找不到需要的库,做个符号链接
出现如下错误:
OSError: libbfd-2.18.50.20070907.so: cannot open shared object file: No such file or directory
root@ubuntu:/usr/lib# ln -s libbfd-2.20.51-system.20100908.so libbfd-2.18.50.20070907.so
OSError: libopcodes-2.18.50.20070907.so: cannot open shared object file: No such file or directory
root@ubuntu:/usr/lib# ln -s libopcodes-2.20.51-system.20100908.so  libopcodes-2.18.50.20070907.so


阅读(6297) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~