Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1140502
  • 博文数量: 322
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 3276
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-17 09:21
文章分类

全部博文(322)

文章存档

2010年(155)

2009年(167)

我的朋友

分类: 嵌入式

2010-05-02 12:32:07

一、操作系统的安装
       选个自己熟悉的linux操作系统,本人花了几天时间,测试不少了linux,例如:Redhat AS 的多个版本,Cent OS,Ubuntu等。但这些都不支持romfs系统文件格式,所以本人推荐使用 Fedora 版本的linux。

二、相关文件下载
1> skyeye: (也可下载新版的)。
2> arm开发环境: (也可下载新版的)。
3> 如果要测试你的环境是不是ok了,是不是可以正常的使用skyeye来模拟arm开发板,那么下面的软件是必须的


4> 我们要安装uClinux 那么这个包就必须下下来



二//--------------------------------------------------------------------------
安装arm tool   //找到这个文件的目录,然后执行,如果有提示:tail +43 错误,请修改源文件的 tail 命令 加上一个 -n 参数再重新执行该文件。
[root@localhost ~]# ./ arm-elf-tools-20040427.sh
编译源文件:
[root@localhost ~]# arm-elf-gcc -Wl,-elf2flt -o test test.c
看清楚了,W后面的是个小写的L,不是数字1哦

安装skyeye

1> 解压缩

[root@localhost ~]#tar zxvf /root/cache/skyeye-1.2.4_Rel.tar.gz

修改个名字,skyeye
[root@localhost ~]# mv skyeye-1.3.0_rc1/ skyeye

[root@localhost ~]#cd skyeye/

[root@localhost skyeye]# ./configure --target=arm-elf --prefix=/usr/local
[root@localhost skyeye]# make lib

[root@localhost skyeye]# make

[root@localhost skyeye]# make install_lib

[root@localhost skyeye]# make install
如果编译失败,使用make命令的时候可以加入一些选项参数,例如:
不允许DBCT
$make NO_DBCT=1
不支持LCD
$make NO_LCD=1
不支持BFD库
$make NO_BFD=1
不支持网络设备
$make NO_NET=1

[root@localhost skyeye]# make clean
[root@localhost skyeye]# make NO_DBCT=1

耐心等待一下,我的计算机大概两分钟就ok了,直到下面的出现就表示ok了

Make lib (to compile the third party library under third-party directory.)

Make (to compile the package. Optionally, type `make check' to run any self-tests that come with the package.)

Make intall_lib (to install the libraries under third-party directory.)

Make install (to install the programs and any data files and documentation.)

这样就安装成功了。

装好之后,在/opt/skyeye有以下目录:

说明如下:

Bin目录存放了skyeye的二进制程序,描述如下:

  mknandflashdump : 用来制作nandflash的镜像文件

  skyeye :skyeye的命令行应用程序。

  Prof_convert:对数据文件进行解析

  uart_instance: 被skyeye调用的应用程序,功能为通过一个xterm终端来显示串口的输出。

include目录存放了skyeye开发插件时所用到的头文件,这些头文件定义了skyeye提供的API函数的原

型。

info目录存放了info格式的文档,暂时没有提供。

Lib目录存放了skyeye的核心库libcommon.so和其他一些以动态库存在的插件。

testsuite目录存放了一个简单的测试用例,用来演示skyeye的一些功能。

 


查看一下/usr/local/bin 目录下面时候有skyeye可执行文件,如果没有,就把刚才编译安装的那个文件复制到usr/local/bin 目录下面即可
[root@localhost skyeye]# skyeye -h
------------------------- SkyEye -V1.3 ---------------------------
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了


解压缩testsuite到这个目录
[root@localhost skyeye]# tar xvjf skyeye-testsuite-2.3.tar.bz2
[root@localhost skyeye]# cd skyeye-testsuite-2.3/
[root@localhost skyeye-testsuite-2.3]#
[root@localhost skyeye-testsuite-2.3]#  ls
linux   rtems   u-boot   uClinux
[root@localhost skyeye-testsuite-2.3]# cd linux/ep9312/2.6.x/

OK我们进到具体的目录了,我们现在测试一下看能不能把基本的测试跑起来
运行下面的命令
[root@localhost skyeye-testsuite-2.3]# skyeye -e vmlinux -c skyeye.conf
简单的说一下,-e表示指定加载什么文件为内核,-c表示什么文件是配置文件
好,我们看一下

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 (skyeyeuser@debian) (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:




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了

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