|
我的linux系统参数如下:
uname -a:
Linux tux 2.6.10-gentoo-r6y #12 SMP Tue Aug 9 08:55:07 GMT 2005 i686 Intel(R) Pentium(R) M processor 1400MHz GenuineIntel GNU/Linux
gcc --version:
gcc (GCC) 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
libc.so.6:
Compiled by GNU CC version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1).
Compiled on a Linux 2.6.11 system on 2005-08-05.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
Native POSIX Threads Library by Ulrich Drepper et al
The C stubs add-on version 2.1.2.
GNU Libidn by Simon Josefsson
BIND-8.2.3-T5B
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
我按readme步骤编译skyeye0.9.8时,sim/arm/dbct/tb.c出错,出错信息如下:
>./configure --target=arm-elf --prefix=/opt/skyeye
>make
.......(一些编译信息)
make[2]: Entering directory `/home/chc/skyeye_work/skyeye/sim/arm'
gcc -c dbct/tb.c -o tb.o -DHAVE_CONFIG_H -DDEFAULT_INLINE=0 -DMODET `pkg-config gtk+-2.0 --cflags` -I -I./../../include/gdb -I. -I. -I../common -I./../common -I../../include -I./../../include -I../../bfd -I./../../bfd -I../../opcodes -I./../../opcodes -I../../intl -I./../../intl -I./../../include/gdb -g -O2
dbct/tb.c: In function `tb_find':
dbct/tb.c:554: error: unable to find a register to spill in class `DIREG'
[code:1]
dbct/tb.c:554: error: this is the insn:
(insn:HI 455 1419 456 34 0xb7b0170c (parallel [
(set (reg:SI 2 ecx [164])
(const_int 0 [0x0]))
(set (reg/f:SI 1 edx [163])
(plus:SI (ashift:SI (reg:SI 2 ecx [164])
(const_int 2 [0x2]))
(reg/f:SI 1 edx [163])))
(set (mem:BLK (reg/f:SI 1 edx [163]) [0 A8])
(const_int 0 [0x0]))
(use (reg:SI 0 eax [166]))
(use (reg:SI 2 ecx [164]))
(use (reg:SI 19 dirflag))
]) 459 {rep_stossi} (insn_list 453 (insn_list 454 (nil)))
(expr_list:REG_DEAD (reg:SI 19 dirflag)
(expr_list:REG_DEAD (reg:SI 0 eax [166])
(expr_list:REG_UNUSED (reg:SI 2 ecx [164])
(expr_list:REG_UNUSED (reg/f:SI 1 edx [163])
(nil))))))
[/code:1]
dbct/tb.c:554: confused by earlier errors, bailing out
make[2]: *** [tb.o] Error 1
make[2]: Leaving directory `/home/chc/skyeye_work/skyeye/sim/arm'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/chc/skyeye_work/skyeye/sim'
make: *** [all-sim] Error 2
我看了一下,发现是sim/arm/dbct/tb.c里面的两个memset调用导致gcc出错。
我就对tb.c做了如下修改,绕过这个gcc的错误:
457c457,462
< memset(state->mem.tbt[bank_num], 0, state->mem.rom_size[bank_num] / TB_LEN * sizeof(tb_t));
---
> //memset(state->mem.tbt[bank_num], 0, state->mem.rom_size[bank_num] / TB_LEN * sizeof(tb_t));
> do{
> void* p=state->mem.tbt[bank_num];
> size_t l=state->mem.rom_size[bank_num] / TB_LEN * sizeof(tb_t);
> memset(p,0,l);
> }while(0);
1285c1290,1295
< memset(tbt_table, 0, TB_TBT_SIZE);
---
> //memset(tbt_table, 0, TB_TBT_SIZE);
> do{
> void* p=tbt_table;
> size_t l=TB_TBT_SIZE;
> memset(p,0,l);
> }while(0);
这样就成功编译出skyeye0.9.8.
接着make install
然后解压skyeye-binary-testutils-1.2.0,
进入目录skyeye-binary-testutils-1.2.0/ep7312/ep7312_with_framebuff
er_touchscreen_minigui
运行:
skyeye vmlinux-8-332
(SkyEye) tar s
cpu info: armv4, arm720t, 41807200, ffffff00, 1
mach info: name ep7312, mach_init addr 0x81887f0
lcd info: turn on lcd!
dbct info: turn on dbct!
"dbct" option parameter error!
SKYEYE: use arm7100 mmu ops
Loaded ROM ./ywcromfs-minigui.img
dbct translate block use memory 0x03ffee56 bytes.
Connected to the simulator.
(SkyEye) lo
Loading section .init, size 0x12000 vma 0xc0028000
Loading section .text, size 0x1212d0 vma 0xc003a000
Loading section __ex_table, size 0x900 vma 0xc015b2d0
Loading section .data, size 0xe483 vma 0xc015c000
Start address 0xc0028000
Transfer rate: 10551960 bits in <1 sec.
(SkyEye) r
.........(kernel加载信息,lcd窗口正常打开,看到arm linux的文字图案)
Sash command shell (version 1.1.1)
/> /bin/same/same
MiniGUI: in src/main/main.c: main()
MiniGUI: in src/kernel/init.c: InitGUI()
pid 11: failed 11
/>
如果将skyeye.conf中dbct:state=on改为dbct:state=off,则上述的same游戏可以在lcd窗口中正常出现.[/code] |
|