在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
芯片精品文章合集(500篇!) 创芯人才网--重磅上线啦!
查看: 4565|回复: 0

关于SKYEYE

[复制链接]
发表于 2008-3-26 13:48:47 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
一 //-------------------------------------------------------------------------------------------------------------------------
1 系统安装
         ubuntu 7.10
[email=root@ubuntu:/]root@ubuntu:/[/email]# uname -a
Linux ubuntu 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux

2 安装binutils-dev
[email=root@ubuntu:/]root@ubuntu:/[/email]# apt-get install binutils-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
binutils-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[email=root@ubuntu:/]root@ubuntu:/[/email]#
QUOTE:
    3 下载文件
    1> skyeye 最新版
    wget http://jaist.dl.sourceforge.net/ ... ye-1.2.4_Rel.tar.gz

    2> arm开发环境
          有了这个就可以在ubuntu下编译arm上可以用的软件了,就一个包安装了就ok了,当然如果你不怕麻烦或者想自己做一个环境出来也是可以的,那就自己学一下怎么搭建交叉编译环境吧
    wget http://opensrc.sec.samsung.com/d ... s-20040427.sh%C2%A0
    3> 如果要测试你的环境是不是ok了,是不是可以正常的使用skyeye来模拟arm开发板,那么下面的软件是必须的
    http://nchc.dl.sourceforge.net/s ... stsuite-2.3.tar.bz2
    4> 我们要安装uClinux 那么这个包就必须下下来
    http://www.uclinux.org/pub/uClin ... est-20070823.tar.gz
    二//----------------------------------------------------------------------------------------------------------------------------------
    安装arm tool
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# mv arm-elf-tools-20040427.sh_ arm-elf-tools-20040427.sh
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# chmod 755 arm-elf-tools-20040427.sh
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# ./arm-elf-tools-20040427.sh
    tail: Warning: "+number" syntax is deprecated, please use "-n +number"
    ./usr/local/arm-elf/
    ./usr/local/arm-elf/bin/
    ./usr/local/arm-elf/bin/nm
    ./usr/local/arm-elf/bin/strip
    ./usr/local/arm-elf/bin/ar
    ./usr/local/arm-elf/bin/ranlib
    ./usr/local/arm-elf/bin/as
    ./usr/local/arm-elf/bin/ld
    ./usr/local/arm-elf/bin/flthdr
    ./usr/local/arm-elf/bin/gcc
    ./usr/local/arm-elf/bin/elf2flt
    ./usr/local/arm-elf/bin/ld.real
    ./usr/local/arm-elf/lib/
    .......
    ............
    ................
    .......................
    ./usr/local/bin/arm-elf-protoize
    ./usr/local/bin/arm-elf-ranlib
    ./usr/local/bin/arm-elf-readelf
    ./usr/local/bin/arm-elf-size
    ./usr/local/bin/arm-elf-strings
    ./usr/local/bin/arm-elf-strip
    ./usr/local/bin/arm-elf-unprotoize
    ./usr/local/bin/genromfs
    ./usr/local/bin/elf2flt
    ./usr/local/bin/flthdr
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# ls /usr/local/skyeye/
    COPYING    LICENSE      Makefile  REPORTING-BUGS  arch    dbct    misc
    ChangeLog  MAINTAINERS  README    TODO            binary  device  utils
    查看了以后,安装一ok了,我们现在测试一下是不是真的ok了,nano建立一个文件
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# nano test.c
    然后输入
    #include <stdio.h>
    int main()
    {
            printf("ARM tools is OK\n");
            return 0;
    }
    然后ctrl+o保存退出
    我们编译出来这个测试文件
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# arm-elf-gcc -Wl,-elf2flt -o test test.c
    看清楚了,W后面的是个小写的L,不是数字1哦
    然后我们查看一下是不是编译ok了
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# ls -lh test*
    -rwxr--r-- 1 root root 29K Dec 14 12:45 test
    -rw-r--r-- 1 root root 136 Dec 14 10:38 test.c
    -rwxr-xr-x 1 root root 76K Dec 14 12:45 test.gdb
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# file test
    test: BFLT executable - version 4 ram
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# file test.gdb
    test.gdb: ELF 32-bit LSB executable, ARM, version 1, statically linked, not stripped
    我们运行一test看看,呵呵,肯定出错,出错也看看
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# ./test
    bash: ./test: cannot execute binary file
    在arm下跑的肯定不能x86下跑了
    我们继续

    安装skyeye
    1> 解压缩
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# cd /usr/local/;tar zxvf /root/cache/skyeye-1.2.4_Rel.tar.gz
    skyeye-1.2.4/
    skyeye-1.2.4/utils/
    skyeye-1.2.4/utils/share/
    skyeye-1.2.4/utils/share/ansidecl.h
    skyeye-1.2.4/utils/tools/
    skyeye-1.2.4/utils/main/
    skyeye-1.2.4/utils/main/symbol.c
    skyeye-1.2.4/utils/main/skyeye.c
    skyeye-1.2.4/utils/main/elf32.h
    skyeye-1.2.4/utils/main/symbol.h
    skyeye-1.2.4/utils/main/skyeye.h
    skyeye-1.2.4/utils/main/ide.py
    skyeye-1.2.4/utils/main/setup.py
    skyeye-1.2.4/utils/config/
    skyeye-1.2.4/utils/config/skyeye_conf
    .........
    .............
    .................
    .....................
    skyeye-1.2.4/arch/mips/mach/
    skyeye-1.2.4/arch/mips/mach/skyeye_mach_nedved.c
    skyeye-1.2.4/arch/mips/mach/au1000.h
    skyeye-1.2.4/arch/mips/mach/skyeye_mach_au1100.c
    skyeye-1.2.4/binary/
    skyeye-1.2.4/binary/README
    修改个名字,skyeye
    [email=root@ubuntu:/usr/local]root@ubuntu:/usr/local[/email]# mv skyeye-1.2.4/ skyeye
    [email=root@ubuntu:/usr/local]root@ubuntu:/usr/local[/email]# cd skyeye/
    [email=root@ubuntu:/usr/local/skyeye]root@ubuntu:/usr/local/skyeye[/email]# ls
    COPYING    LICENSE      Makefile  REPORTING-BUGS  arch    dbct    misc
    ChangeLog  MAINTAINERS  README    TODO            binary  device  utils
    2> make一下看
    [email=root@ubuntu:/usr/local/skyeye]root@ubuntu:/usr/local/skyeye[/email]# make
    --------------------------- NOTICE ------------------------------
    If you always get error, please run "make NO_CHECK=1" instead.
    -----------------------------------------------------------------
    Checking whether host is big endian ... no
    Checking gcc ... OK ( gcc version: 4.1.3 )
    Checking whether the compiler supports x86 asm ... FAILED
    *** It seems that the compiler don't support inline x86 AT&T ASM codes.
    *** Run "make NO_DBCT=1" instead to ignore it.
    make: *** [check] Error 1
    重新按照下面的输入重新make
    [email=root@ubuntu:/usr/local/skyeye]root@ubuntu:/usr/local/skyeye[/email]# make clean
    [email=root@ubuntu:/usr/local/skyeye]root@ubuntu:/usr/local/skyeye[/email]# make NO_DBCT=1
    耐心等待一下,我的计算机大概两分钟就ok了,直到下面的出现就表示ok了
    ****
    **** The binary file located at 'binary/skyeye', enjoy it.
    ****
    然后我们编辑一下环境变量,把path修改一下,让系统能直接找到skyeye
    [email=root@ubuntu:/usr/local/skyeye]root@ubuntu:/usr/local/skyeye[/email]# nano /etc/environment
    看第一行
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/skyeye/binary"
    修改如上面的这样,然后保存--按快捷键 Ctrl+o,然后打回车
    然后exit退出到登陆界面重新登陆一下,让刚才修改的生效
    我们测试一下看ok了没
    [email=root@ubuntu:/]root@ubuntu:/[/email]# skyeye -h
    ------------------------- SkyEye -V1.2 ---------------------------
    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
    出现了这个界面说明skyeye已经ok了

    我们测试一下看看
    三系统测试///---------------------------------------------------------------------------------------------------------------------
    [email=root@ubuntu:/]root@ubuntu:/[/email]# cd /root/cache/
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# ls
    arm-elf-tools-20040427.sh  skyeye-testsuite-2.3      test    test.gdb
    skyeye-1.2.4_Rel.tar.gz    skyeye-testsuite-2.3.tar.bz2  test.c
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]#
    到放置skyeye等文件的目录
    解压缩testsuite到这个目录
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# tar xvjf skyeye-testsuite-2.3.tar.bz2
    skyeye-testsuite-2.3/
    skyeye-testsuite-2.3/rtems/
    skyeye-testsuite-2.3/rtems/bf533/
    skyeye-testsuite-2.3/rtems/bf533/kernel_prof.txt
    ...................
    skyeye-testsuite-2.3/linux/cs89712/initrd.img
    skyeye-testsuite-2.3/linux/auto_test
    skyeye-testsuite-2.3/linux/initrd.img
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# ls
    arm-elf-tools-20040427.sh  skyeye-testsuite-2.3          test    test.gdb
    skyeye-1.2.4_Rel.tar.gz    skyeye-testsuite-2.3.tar.bz2  test.c
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]#
    解压缩ok了,我们进去
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# ls
    arm-elf-tools-20040427.sh  skyeye-testsuite-2.3          test    test.gdb
    skyeye-1.2.4_Rel.tar.gz    skyeye-testsuite-2.3.tar.bz2  test.c
    [email=root@ubuntu:~/cache]root@ubuntu:~/cache[/email]# cd skyeye-testsuite-2.3/
    [email=root@ubuntu:~/cache/skyeye-testsuite-2.3]root@ubuntu:~/cache/skyeye-testsuite-2.3[/email]#
    [email=root@ubuntu:~/cache/skyeye-testsuite-2.3]root@ubuntu:~/cache/skyeye-testsuite-2.3[/email]# ls
    linux  rtems  u-boot  uClinux
    [email=root@ubuntu:~/cache/skyeye-testsuite-2.3]root@ubuntu:~/cache/skyeye-testsuite-2.3[/email]# cd linux/
    at91rm9200/ ep7312/     mpc8560/    s3c2410/   
    cs89712/    ep9312/     pxa/        strongarm/
    [email=root@ubuntu:~/cache/skyeye-testsuite-2.3]root@ubuntu:~/cache/skyeye-testsuite-2.3[/email]# cd linux/ep9312/
    [email=root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312]root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312[/email]# ls
    2.6.x
    [email=root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312]root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312[/email]# cd 2.6.x/
    [email=root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312/2.6.x]root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312/2.6.x[/email]# ls
    initrd.img  skyeye.conf  skyeye_dbct.conf  vmlinux
    OK我们进到具体的目录了,我们现在测试一下看能不能把基本的测试跑起来
    运行下面的命令
    [email=root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312/2.6.x]root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312/2.6.x[/email]# skyeye -e vmlinux -c skyeye.conf
    简单的说一下,-e表示指定加载什么文件为内核,-c表示什么文件是配置文件
    好,我们看一下
    [email=root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312/2.6.x]root@ubuntu:~/cache/skyeye-testsuite-2.3/linux/ep9312/2.6.x[/email]# skyeye -e vmlinux -c skyeye.conf
    big_endian is false.
    arch: arm
    cpu info: armv4, arm920t, 41009200, ff00fff0, 2
    mach info: name ep9312, mach_init addr 0x805bd90
    uart_mod:0, desc_in:, desc_out:, converter:
    SKYEYE: use arm920t mmu ops
    Loaded RAM   ./initrd.img
    exec file "vmlinux"'s format is elf32-little.
    load section .init: addr = 0xc0008000  size = 0x00012000.
    load section .text: addr = 0xc001a000  size = 0x000d4a1c.
    load section __ex_table: addr = 0xc00eea20  size = 0x000008a0.
    not load section .pci_fixup: addr = 0xc00ef2c0  size = 0x00000000 .
    not load section __ksymtab: addr = 0xc00ef2c0  size = 0x00000000 .
    not load section __ksymtab_gpl: addr = 0xc00ef2c0  size = 0x00000000 .
    not load section __kcrctab: addr = 0xc00ef2c0  size = 0x00000000 .
    not load section __kcrctab_gpl: addr = 0xc00ef2c0  size = 0x00000000 .
    load section __param: addr = 0xc00ef2c0  size = 0x00000078.
    load section .data: addr = 0xc00f0000  size = 0x00024a40.
    not load section .bss: addr = 0xc0114a40  size = 0x00029678 .
    not load section .comment: addr = 0x00000000  size = 0x0000127e .
    call ARMul_InitSymTable,kernel filename is vmlinux.
    start addr is set to 0xc0008000 by exec file.
    Linux version 2.6.12 ([email=skyeyeuser@debian]skyeyeuser@debian[/email]) (gcc version 3.3.2) #2 Fri Aug 5 14:03:55 CST 2005
    CPU: ARM920Tid(wb) [41009200] revision 0 (ARMvundefined/unknown)
    CPU0: D VIVT write-back cache
    CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
    CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
    Machine: edb9312
    Warning: bad configuration page, trying to continue
    Memory policy: ECC disabled, Data cache writeback
    Built 1 zonelists
    Kernel command line: root=/dev/ram initrd=0xC1000000,0x200000 console=ttyAM0 rw
    PID hash table entries: 256 (order: 8, 4096 bytes)
    Console: colour dummy device 80x30
    Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    Memory: 32MB = 32MB total
    Memory: 29056KB available (852K code, 312K data, 72K init)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
    Freeing initrd memory: 2048K
    Linux NoNET1.0 for Linux 2.6
    CPU model: Cirrus Logic EP9315, silicon rev A
    NetWinder Floating Point Emulator V0.97 (double precision)
    Serial: EP93xx driver $Revision: 1.42 $
    ttyAM0 at MMIO 0x808c0000 (irq = 52) is a uart-ep93xx
    ttyAM1 at MMIO 0x808d0000 (irq = 54) is a uart-ep93xx
    ttyAM2 at MMIO 0x808e0000 (irq = 55) is a uart-ep93xx
    io scheduler noop registered
    io scheduler anticipatory registered
    io scheduler deadline registered
    io scheduler cfq registered
    RAMDISK driver initialized: 16 RAM disks of 12288K size 1024 blocksize
    physmap flash device: 2000000 at 60000000
    mice: PS/2 mouse device common for all mice
    RAMDISK: ext2 filesystem found at block 0
    RAMDISK: Loading 2048KiB [1 disk] into ram disk... done.
    VFS: Mounted root (ext2 filesystem).
    Freeing init memory: 72K
    ifconfig: socket: Function not implemented
    ifconfig: socket: Function not implemented
    Welcome to
         _      _____      __   __    _      _
        / \    /  __ \    /  \_/  \  | |    |_|               
       / _ \   | |  | |  / /\   /\ \ | |     _ ____  _   _  _  _
      / /_\ \  | |__| | / /  \_/  \ \| |    | |  _ \| | | |\ \/ /
    / /___\ \ | |__\ \ | |       | || |___ | | |_| | |_| |/    \
    /_/     \_\| |   \_\|_|       |_||_____||_|_| |_|\____|\_/\_/
            
    ARMLinux for Skyeye
    For further information please check:
    http://www.skyeye.org/

    BusyBox v1.00 (2004.12.27-02:03+0000) Built-in shell (ash)
    Enter 'help' for a list of built-in commands.
    /bin/ash: can't access tty; job control turned off
    / # uname -a
    Linux skyeye 2.6.12 #2 Fri Aug 5 14:03:55 CST 2005 armv4tl unknown
    / # cat /proc/cpuinfo
    Processor       : ARM920Tid(wb) rev 0 (v4l)
    BogoMIPS        : 25.80
    Features        : swp half thumb
    CPU implementer : 0x41
    CPU architecture: undefined/unknown
    CPU variant     : 0x0
    CPU part        : 0x920
    CPU revision    : 0
    Cache type      : write-back
    Cache clean     : cp15 c7 ops
    Cache lockdown  : format A
    Cache format    : Harvard
    I size          : 16384
    I assoc         : 64
    I line length   : 32
    I sets          : 8
    D size          : 16384
    D assoc         : 64
    D line length   : 32
    D sets          : 8
    Hardware        : edb9312
    Revision        : 0000
    Serial          : 0000000000000000
    / #
    ok,我们查看过cpuinfo文件了,确定可以模拟了,呵呵,skyeye安装ok了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条


小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-11-15 05:39 , Processed in 0.018033 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表