分类:
2009-07-02 12:57:05
skyeye搞了挺长时间了 可是网络总不通~~~作为第一篇文章 其实挺无奈...
这是我在学校作项目时对skyeye使用时的总结,很简单的,但是使用时参考了很多网上的资料,最终还是落了个网络不通...但好歹有点东西,纪念一下,自勉。
Red Hat Linux 9.0下skyeye-
1、 复制arm-elf-tools-20011219.tar.gz arm-elf-tools-20030314.sh skyeye-
2、 运行arm-elf-tools-20030314.sh:./ arm-elf-tools-20030314.sh在/usr/local/bin下生成arm-elf-gcc等系列文件。
3、 解压skyeye-
./configure
make
make install
查看/usr/local/bin,多出一项skyeye,这就是我们启动skyeye的命令文件。之后可在任何目录下运行skyeye。
注:若把./configure改为./configure --target=arm-elf --prefix=/usr/local,
则在/usr/local/bin目录下的skyeye命令文件为arm-elf-skyeye.不推荐这样配置。
此时运行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.
***********************************************************************
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
Bug report: skyeye-developer@lists.gro.clinux.org
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
s
s
s
s
ep7312
lh79520
ep9312
cs89712
sa1100
pxa_lubbock
pxa_mainstone
at91rm92
s
s
sharp_lh
ns9750
-------- BlackFin architectures ----
bf533
bf537
以下为编译uClinux内核步骤:选用源代码为uClinux-dist-20040408.tar.gz
复制uClinux-dist-20040408.tar.gz到/root/skyeye,解压后生成uClinux-dist目录。
进入uClinux-dist,编译内核:
make xconfig
在Target Platform Selection选项卡中选择:
Vendor/Product: GDB/ARMulator
Kernel Version: linux-2.4.x
Libc Version: uClibc
然后选择save and exit
make dep
make
此时在/uClinux-dist/linux-2.4.x目录下会生成可执行文件linux
在/uClinux-dist/images/会生成romfs.img等文件。
在uClinux-dist目录下建立仿真AT91的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=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
保存退出
这个时候就可以用skyeye来调试运行kernel了。
在uClinux-dist目录下运行:
skyeye -c skyeye.conf -e linux-2.4.x/linux
注:-c 和-e选项分别用来指明skyeye.conf和linux内核映像文件,-e选项不可省略,
skyeye.conf若在当前目录下,-c选项可省略。
如果去掉,如skyeye linux-2.4.x/linux,会出现如下错误:
…
SKYEYE:Error in mem_read_word, no bank found, NumInstrs 5017, mem_read_word addr = 4e
SKYEYE:Error in mem_read_word, no bank found, NumInstrs 5018, mem_read_word addr = 4e70 no bank
SKYEYE:Error in mem_read_word, no bank found, NumInstrs 5019, mem_read_word addr = 4e74 no bank
SKYEYE:Error in mem_read_word, no bank found, NumInstrs 5020, mem_read_word addr = 4e78 no bank
…
注:本次选用源代码为uClinux-dist-20040408.tar.gz,交叉编译工具为arm-elf-tools-20011219.tar.gz。试过uClinux-dist-20080808.tar.bz2,好像需要arm-linux-tools交叉编译工具,待补。
补充:
要支持网络功能,GDB/ARMulator无能为力……
需选择GDB/Skyeye,在uClinux-dist-20040408.tar.gz里无这个选项,在uClinux-dist-20041215.tar.gz里有这个选项,不知为什么。
以后改用uClinux-dist-20041215.tar.gz来实验。
实验待补。