实验环境
u Vmware6.5, 2CPU.
u FC4: kernel 2.6.11-1.1369_FC4smp
u skyeye-1.2.5_REL.tar.gz
u arm-linux-tools-20070808.tar.gz
u uClinux-dist-20080808.tar.bz2
u files in /home/linuxuser/skyeye dir
据说RHEL5.2(2.6.18-92.el5)也可以支持,但是FC10(2.6.27.5-117.fc10.i686)肯定是不行的,会打印如下错误信息:
Bus read error, can not find corresponding bankfor addr 0x18250,pc=0x18250
Bus read error, can not find corresponding bankfor addr 0x18254,pc=0x18254
Bus read error, can not find corresponding bankfor addr 0x18258,pc=0x18258
Bus read error, can not find corresponding bankfor addr 0x1825c,pc=0x1825c
Bus read error, can not find corresponding bankfor addr 0x18260,pc=0x18260
skyeye-1.2.7_rc1.tar.bz2也不能支持
安装arm-elf-tools
1.纠正arm-elf-tools安装文件错误
arm-elf-tools-20030314.sh里有错误,用emacs纠正。
修改line 39:
tail +${SKIP} ${SCRIPT} | gunzip | tar xvf -
改为:
tail -n +${SKIP} ${SCRIPT} | gunzip | tar xvf -
If this error has not been fixed, it willshows
如果错误没有纠正,会打印如下错误:
tail: 。。。。“+43”。。。。。
gunzip: stdin: not in gzip format
2.执行sh脚本
cd /home/linuxuser/skyeye
chmod a+x arm-elf-tools-20040427.sh
./arm-elf-tools-20040427.sh
安装完毕后用which测试是否成功
[root@localhost skyeye]# whicharm-elf-gcc
/usr/local/bin/arm-elf-gcc
安装arm-linux-tools
将arm-linux-tools-20070808.tar.gz解压到/home/linuxuser/ skyeye. 会得到/home/linuxuser/skyeye/usr folder.
exportPATH=$PATH:/home/linuxuser/skyeye/usr/local/bin
安装skyeye
解压skyeye-1.2.5_REL.tar.gz到/home/linuxuser/skyeye,进入该文件夹,执行:
./configure
make
make install
编译uclinux
记得编译前先exportarm_linux_tools
#tar jxvfuClinux-dist-20080808.tar.bz2
#cd uClinux-dist
#make menuconfig
其中的选项为:
Vendor/Product: GDB/Skyeye
Kernel Version: linux-2.6.x
Libc Version: uClibc
选完保存后执行make就行了。
在skyeye上运行uclinux
在/home/linuxuser/skyeye/uClinux-dist新建一个文件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/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
lcd: state=on
输入命令skyeye -elinux-2.6.x/linux,结果应该如下:
[root@work uClinux-dist]# skyeye-e linux-2.6.x/linux
Your elf file is little endian.
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x805eb60
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm7100 mmu ops
......
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
GDB/ARMulator support by <davidm@snapgear.com>
For further information check:
http://www.uclinux.org/
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/>
skyeye.conf的位置可以用-c选项来指定,比如:
skyeye -e linux-2.6.x/linux –c{$path}skyeye.conf
可能出现的一些错误
mapcs-32 –malignment-traps error
kernel 2.4.x会出现-mapcs-frame错误,-mapcs-frame的含义是对所有函数都生成一个遵从ARM程序调用标准的堆栈帧,即使在正确执行代码无需严格这么做时。使用此开关时指定“-fomit-frame-pointer”将不产生叶函数的堆栈帧。缺省情况下是“-mno-apcs-frame”。
-mapcs
与“-mapcs-frame”相同。
-mapcs-26
产生使用26比特程序计数器的处理器代码,遵从APCS 26比特选项的函数调用标准。此开关替代了编译器早期版本中的“-m2”和“-m3”开关。
-mapcs-32
产生使用32比特程序计数器的处理器代码,遵从APCS 32比特选项的函数调用标准。此开关替代了编译器早期版本中的“-m6”。