|
楼主 |
发表于 2006-4-14 21:39:10
|
显示全部楼层
Skyeye Installation Notes
Author: Jiang Jiang
E-mail: [email protected]
Blog:http://blog.csdn.net/jznsmail
1.Introduction
SkyEye is an Open Source Software Project(GPL Licence).The goal of SkyEye is to provide an integrated simulation environment in Linux and Windows.SkyEye environment simulates typical Embedded Conputer Sysytems, such as Linux, uClinux, uC/OS-II and can analyze or debug in source level.
The latest version of SkyEye is skyeye-1.2-RC6.tar.bz2.You can download the source code and related packages from http://www.skyeye.org.Now the following hardwares can be simulated by SkyEye:
CPU Core:
ARM7TDMI
ARM720T
StrongARM
XScale
Blackfin
Application CPU:
ATMEL AT91X40
PHILIPS LPC2xxxx
Samsung s3c4510b
Samsung s3c44b0
Cirrus Logic EP7312
sharp LH79520
Cirrus Logic EP9312
cs89712
sa1100
xscale pxa250 lubbock developboard
xscale pxa270 mainstone developboard
at91RM9200
s3c2410x
s3c2440
sharp lh7a400 developbaord
NetSilicon ns9750
Philips LPC2210
Memory:
RAM
ROM
FLASH
Peripheral:
Timer
UART
NIC chip
LCD
TouchScreen
2.Installation of SkyEye
Now we install skyeye by the latest version of SkyEye(skyeye-1.2.RC6).
The configuration of host computer is:
Operating System: Fedora Core 2 Linux(2.4.x)
GCC Version: 3.3.2
arm-elf-gcc Version: 2.95.3 20010315
First, download the arm-elf-tools, which contain arm-elf-gcc, arm-elf-ld etc, from www.uClinux.org and install it as following:
$su -c './arm-elf-tools-20030315.sh'
$password:
After installation of arm-elf-tools, we can enter the download directory of SkyEye(Our directroy is /home/jelly/download/).
$cd ~/download
$ls
skyeye-1.2-RC6.tar.bz2
Second,decompress the compressed package of SkyEye
$tar jxvf skyeye-1.2-RC6-tar.bz2
Enter the directory of SkyEye
$cd skyeye-v1
The last, compile the source code of SkyEye by 'make' command.After compiling,the executable file of SkyEye will be created in binary directory.
The Option argument fo make command is following:
To compile the bianry as static, which allows for easy distribution:
$make STATIC=1
To disable DBCT do the following:
$make NO_DBCT=1
To disable compiling with the LCD do the following:
$make NO_LCD=1
To disable compiling the BFD library do the following:
$make NO_BFD=1
To disable compiling the network device support do the following:
$make NO_NET=1
If successful compiling,the executable file of skyeye will be created in the binary directory. You can use '-h' option argument for more help information.
$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.
-d in GDB Server mode (can be connected by GDB).
-c config-file the skyeye configure file name.
-h This Help Display
-v This shows arch and cpu supported
------------------------------------------------------------------
-e specify the kernel file name(ELF executable format)
-d in GDB server debug mode(can be connected by GDB)
-c specify skyeye configure file name
-h display help information
-v display the architectrue and cpu supported information.(But when we used this option, the terminal displaied "Unknown option '-v'".We are puzzled.I think it haven't implemented in this version)
3.Compiling uClinux Kernel
First, download the latest version of uClinux compressed pakcage from www.uclinux.org and decompress.
$tar xvzf uClinux-dist-xxxxxxxx.tar.gz
Enter the directory of uClinux-dist and use configuration command to configure kernel.
Following is the available configuration command:
make xconfig - configuration mode with GUI
make menuconfig - menu configuration mode with terminal
$make xconfig
In the Target Platform Selection Option Table:
Vendor/Product: select GDB/ARMulator
Kernel Version: select linux-2.4.x
Libc Version: select uC-libc
Click save and exit button for saving and exiting
To build dependence and compile kernel, file system to do following:
$make dep; make
If no error message display on terminal, the following files will be created in images directory.
image.bin, linux.data, linux.text. romfs.img, uClinux-dist/linux2.4.x/linux
romfs.img - file system image
uClinux-dist/linux2.4.x/linux - kernel image
If we wanna simulate the uClinux kernel, we must create a configuration file named 'skyeye.conf'.
For example, we can create skyeye.conf file as following:
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=images/romfs.img
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
lcd: state=on
Saving and exiting
Now, we can use skyeye to run this uClinux kernel as following:
$~/download/skyeye-v1/binary/skyeye -e linux-2.4.x/linux
The detial informtion will be dispaly on terminal, as following:
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x80727e0
can't find device module: (null)
SKYEYE: use arm7100 mmu ops
Loaded ROM images/romfs.img
exec file "linux-2.4.x/linux"'s format is elf32-little.
load section .init: addr = 0x01000000 size = 0x0000a000.
load section .text: addr = 0x0100a000 size = 0x000c5ca0.
load section .data: addr = 0x010d0000 size = 0x00008320.
not load section .bss: addr = 0x010d8320 size = 0x00022198 .
not load section .debug_abbrev: addr = 0x00000000 size = 0x00039846 .
not load section .debug_info: addr = 0x00000000 size = 0x016b812f .
not load section .debug_line: addr = 0x00000000 size = 0x00378ef3 .
not load section .debug_pubnames: addr = 0x00000000 size = 0x0000b40d .
not load section .debug_aranges: addr = 0x00000000 size = 0x000022e0 .
start addr is set to 0x01000000 by exec file.
Linux version 2.4.19-uc1 ([email protected]) (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/)) #1 五 4#1 五 4月 7 23:41:40 CST 2006
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... 12.97 BogoMIPS
Memory: 4MB = 4MB total
Memory: 3036KB available (791K code, 170K 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-145DBFF [VIRTUAL 1400000-145DBFF] (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: 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)
/>
Description detail of configure files:
The memmap.conf and skyeye.conf are all skyeye's hardware configure files.The memmap.conf is for skyeye-v0.2.5-.The skyeye.conf is for skyeye-v0.2.5+.
cpu: specify CPU type,For example:arm7tdmi,arm720t etc.
mach: develop board type,For example:at91, ep7312 etc.
mem_bank: memory bank
map=M means rom or ram, map=I means mapped IO space
type=RW means can be read and written,type=R means read only.
addr=0x00000000 means the mem bank's beginning address.
size=0x10000000 means the mem bank's memory size.
files=romfs.img is the filesystem image files
net: Network configure
state=on/off means simulated NIC is wired or not
mac=0:4:3:2:1:f means the mac address in simulated NIC
ethmod=tuntap/vnet means the virtual driver used in host environment
hostip= means the ip address in host environment to interactive with skyeye
For example:net: state = on, mac=0:4:3:2:1:f, ethmod=tuntap, hostip=10.0.0.1
uart: Serial port configure
fd_in= specify the input file description in simulated UART
fd_out= specify the output file description in simulated UART
For example:uart: fd_in=/dev/ttyS0, fd_out=/dev/ttyS1
Then use a terminal connect host's COM1 port, you can see the output and input character in the
teminal.
LCD:LCD configure
state = on/off means enable or disable the LCD simulated
4.SkyEye debug
You can add '-d' option argument enable skyeye debug when run skyeye.
For example:
$skyeye -e linux -d
Then the gdb server listen on 12345 port for debuging
Use another terminal connect target's 12345 port.
$arm-elf-gdb linux
(gdb)target remote 127.0.0.1:12345
Now, you can debug remote program as native gdb.
5.Reference Documentation
1.skyeye source code
2.SkyEye User Manual http://skyeye.sourceforge.net/wiki/UserManual
3.skyeyelcdts http://gro.clinux.org/frs/download.php/789/SkyEyelcdtouchscreen4gro.pdf
4.skyeyeinternal http://gro.clinux.org/frs/download.php/719/skyeyeinternal-0.6.8.pdf
5.hardwaredoc4skyeye http://gro.clinux.org/frs/download.php/835/hardwaredoc4skyeye.tar.bz2 |
|