在Ubuntu在安装SkyEye及测试

有一堆依赖的关键包,比如gtk的依赖,一般Ubuntu 都默认安装了,稳妥起见,运行下面的代码:
sudo apt-get install libgtk2.0-dev pkg-config libatk1.0-dev libpango1.0-dev libfreetype6-dev libglib2.0-dev libx11-dev binutils-dev

我的系统是ubuntu 9.10 用apt装了skyeye 但是运行出出错
root@hanls-desktop:~# skyeye
skyeye: error while loading shared libraries: libbfd-2.19.90.20090909.so: cannot open shared object file: No such file or directory
root@hanls-desktop:~#

解决方法:
在ubuntu 9.10中,libbfd的版本是libbfd-2.20.so,我想libbfd-2.19.90.20090909.so到libbfd- 2.20.so的改动应该不是很大吧,所以我把libbfd-2.20.so拷贝一份,然后将文件名改成libbfd- 2.19.90.20090909.so就可以了。libbfd-2.20.so在/usr/lib目录下。

sudo cp /usr/lib/libbfd-2.20.so /usr/lib/libbfd-2.19.90.20090909.so

sudo mv /usr/lib/libbfd-2.20.so /usr/lib/libbfd-2.20.so.bak

然后输入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 skyeye.conf.
***********************************************************************

Non-option argument ?
Your elf file is little endian.
Failed to open skyeye config file skyeye.conf in the same directory
error: No such file or directory
SkyEye 1.2.5
Bug report: [email protected]
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


    (5)测试skyeye-testsuite-2.3.tar.bz2  http://sourceforge.net/projects/skyeye/files/skyeye-testsuits/skyeye-testsuite-2.3/
    #tar vxjf skyeye-testsuite-2.3.tar.bz2
    #cd skyeye-testsuite-2.3
    #ls
    linux rtems u-boot uClinux
    #cd uClinux
    #ls
    at91       bf533          exec_skyeye_dbct.sh s3c3410x s3c4510
    auto_test coldfire-5249 exec_skyeye.sh       s3c44b0x test_report_2007-11-15
    #cd at91
    #ls
    at91_with_framebuffer_touchscreen uclinux_cs8900a
    linux-2.6.x                        uclinux_rtl8019
    找一个测试一下吧
    #cd uclinux_cs8900a
    #ls
    linux romfs.img skyeye.conf skyeye_dbct.conf
    #skyeye -e linux
    big_endian is false.
    arch: arm
    cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
    mach info: name at91, mach_init addr 0x8057550
    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
    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 http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #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 <[email protected]>
    For further information check:
    http://www.uclinux.org/

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

    Sash command shell (version 1.1.1)
    />
    看到如上情形,运行成功
    ctrl+c退出到#
    (6)编译uClinux内核
    #tar vxzf uClinux-dist-20040408.tar.gz
    生成文件夹uClinux-dist,将其移动到/usr/src/
    #mv uClinux-dist /usr/src/
    然后进入uClinux-dist下
    #cd /usr/src/uClinux-dist/
    <1>菜单界面配置
    #make menuconfig
    选择如下:   
    --- Select the Vendor you wish to target
             (GDB) Vendor
     --- Select the Product you wish to target
              (ARMulator) GDB Products  
    (linux-2.4.x) Kernel Version
    (uClibc) Libc Version        
    [ ] Default all settings (lose changes)
    [ ] Customize Kernel Settings        
    [ ] Customize Vendor/User Settings
    [ ] Update Default Vendor Settings
    然后Esc退出
    Do you wish to save your new kernel configuration?
                   < Yes >      < No >  
    选择yes
    如果在make menuconfig后出现错误提示,则需安装libncurses5,在新立得里安装或者
    #sudo apt-get install libncurses5-dev
    安装完后再make menuconfig
    <2>图形界面配置
    #make xconfig
    选择同上
    如果出现错误提示,则需安装tck,tk两个包,在新立得中安装,也可自己下载后安装,下载地址:

    http://www.tcl.tk/software/tcltk/downloadnow85.html
    将两个包解压后得到tcl8.5.2,tk8.5.2
    #cd tcl8.5.2
    #cd unix
    #./configure --prefix=/usr/
    #make install
    同样的方法将tk装上,在/usr/bin下会看到wish8.5,因为make xconfig调用的是wish,所以我们做一个链接
    # ln /usr/bin/wish8.5 /usr/bin/wish
    然后可以make xconfig
    无论你用菜单界面还是图形界面配置成功了,我们就可以编译uClinux的内核了
    命令进入uClinux-dist
    建立内核依赖关系,只在第一次编译内核时使用
    #make dep
    ~
    ~
    ~
    经过一段时间,如果没有错,可以进行下一步了,编译内核
    #make
    完成后可以在/images中看到这么几个文件
    image.bin linux.data linux.text romfs.img
    用romfs.img生成boot.rom文件系统
    #ln -s images/romfs.img boot.rom
    在/uClinux-dist就可以得到一个boot.rom
    编写skyeye的配置文件,新建文件skyeye.conf,在其加入以下信息:
   
    cpu: arm7tdmi
    mach: at91
    mem_bank: map=M, type=RW, addr=0x00000000, size=0x00004000
    mem_bank: map=M, type=RW, addr=0x01000000, size=0x00400000
    mem_bank: map=M, type=R, addr=0x01400000, size=0x00400000, file=./boot.rom
    mem_bank: map=M, type=RW, addr=0x02000000, size=0x00400000
    mem_bank: map=M, type=RW, addr=0x02400000, size=0x00008000
    mem_bank: map=M, type=RW, addr=0x04000000, size=0x00400000
    mem_bank: map=I, type=RW, addr=0xf0000000, size=0x10000000

    完成这一步就可以在skyeye中运行我们编译的内核了
    #skyeye -e linux-2.4.x/linux
   
    big_endian is false.
    arch: arm
    cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
    mach info: name at91, mach_init addr 0x8057550
    uart_mod:0, desc_in:, desc_out:, converter:
    SKYEYE: use arm7100 mmu ops
    Loaded ROM   ./boot.rom
    start addr is set to 0x01000000 by exec file.
    Linux version 2.4.24-uc0 (wenwu@wenwu-desktop) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318         from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #2 2008年 5月        11日 星期日 9:10:23 CST
    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: 2968KB available (850K code, 180K 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-14AC3FF [VIRTUAL 1400000-14AC3FF] (RO)
    RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
    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
    Command: mount -t ext2 /dev/ram0 /var
    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 <[email protected]>
    For further information check:
    http://www.uclinux.org/

    Execution Finished, Exiting

    Sash command shell (version 1.1.1)
    />
    出现如上情形,运行成功
    (7)模拟运行自己的应用程序
    找到前面曾编译的程序Hello.c,将编译生成的BFLT格式的Hello移动到/uClinux-dist/romfs/bin中(注意在shell中用root)
    然后重新编译内核
    #make
    运行
    #skyeye -e linux-2.4.x/linux
    ```
    ```
    ```
    (省略)
    Sash command shell(version 1.1.1)
    />cd bin
    /bin>./Hello
    Hello!This is Embedded Linux!
    /bin>
    至此在ubuntu8.04上搭建uClinux编译开发环境并用skyeye进行仿真已经告一段落。

 

 

你可能感兴趣的:(linux,cache,ubuntu,command,table,protocols)