Hi,
I cross-compile grx for an embedded system, too. I think that there is a mistake in the config files, and it always assumes that there is a svga hardware present. You can simply edit fdrivers\ftable.c and comment out the drivers you don't use, although it is more elegant if you:
- make your own makefile (grx\src\makefile.custom) that is a copy of makefile.lnx. I don't like to modify the standard one - in this makefile add CCOPT += -DONLY_FRAMEBUFFER - in the file src\fdrivers\ftable.c replace the line #if !defined(__XWIN__) && !defined(__WIN32__) with #if !defined(__XWIN__) && !defined(__WIN32__) && !defined(ONLY_FRAMEBUFFER)
I hope this helps. If it doesn't or you have more questions, don't hesitate to contact me privately.
Josu Onandia
-----Mensaje original----- De: Ant Allen [SMTP:aallen@race-technology.com] Enviado el: jueves 11 de marzo de 2004 23:42 Para: grx@gnu.de Asunto: Problem cross-compiling with only framebuffer driver
Hi,
I'm now trying to cross-compile grx for use on an embedded xscale platform. I'm using arm-linux-gcc 2.95.3.
I've disabled svgalib and am compiling for the linux framebuffer with makefile.lnx.
The first problem I hit was libgrx.h referencing /sys/byteorder.h. This seemed to be asm related so I simply commented out that line in the source.
Next problem is src/makefile.lnx lists various graphics drivers such as ega.c egavga.c etc etc. As I'm compiling for the framebuffer only I commented these out in the makefile.
Everything now seems to compile, but I get a problem when linking - see below.
Can anyone suggest a solution?
Ideally I'd like to test out the cross-compilation with some either the grx demo or with the examples from the documentation. How far from this am I?
All help greatly appreciated. Ant
make[1]: Entering directory `/usr/local/src/grx246/src' arm-linux-gcc -c -O1 -Wall -DLFB_BY_NEAR_POINTER -pipe -DFRAMEBUFFER_DRIVER -I. -I./include -I../include utilprog/modetest.c -o utilprog/modetest.o arm-linux-gcc -o ../bin/modetest utilprog/modetest.o ../lib/unix/libgrx20.a -lm utilprog/modetest.o: In function `main': utilprog/modetest.o(.text+0xf54): undefined reference to `GrKeyRead' ../lib/unix/libgrx20.a(ftable.o)(.data+0x0): undefined reference to `_GrFrameDriverEGAVGA1' ../lib/unix/libgrx20.a(ftable.o)(.data+0x4): undefined reference to `_GrFrameDriverEGA4' ../lib/unix/libgrx20.a(ftable.o)(.data+0x8): undefined reference to `_GrFrameDriverSVGA4' ../lib/unix/libgrx20.a(ftable.o)(.data+0xc): undefined reference to `_GrFrameDriverSVGA8' ../lib/unix/libgrx20.a(ftable.o)(.data+0x10): undefined reference to `_GrFrameDriverVGA8X' ../lib/unix/libgrx20.a(ftable.o)(.data+0x14): undefined reference to `_GrFrameDriverSVGA16' ../lib/unix/libgrx20.a(ftable.o)(.data+0x18): undefined reference to `_GrFrameDriverSVGA24' ../lib/unix/libgrx20.a(ftable.o)(.data+0x1c): undefined reference to `_GrFrameDriverSVGA32L' ../lib/unix/libgrx20.a(ftable.o)(.data+0x20): undefined reference to `_GrFrameDriverSVGA32H' ../lib/unix/libgrx20.a(ftable.o)(.data+0x2c): undefined reference to `_GrFrameDriverSVGA24_LFB' ../lib/unix/libgrx20.a(ftable.o)(.data+0x30): undefined reference to `_GrFrameDriverSVGA32L_LFB' ../lib/unix/libgrx20.a(ftable.o)(.data+0x34): undefined reference to `_GrFrameDriverSVGA32H_LFB' ../lib/unix/libgrx20.a(ftable.o)(.data+0x48): undefined reference to `_GrFrameDriverRAM24' ../lib/unix/libgrx20.a(ftable.o)(.data+0x4c): undefined reference to `_GrFrameDriverRAM32L' ../lib/unix/libgrx20.a(ftable.o)(.data+0x50): undefined reference to `_GrFrameDriverRAM32H' collect2: ld returned 1 exit status make[1]: *** [../bin/modetest] Error 1 make[1]: Leaving directory `/usr/local/src/grx246/src' make: *** [libs] Error 2
Thank you very much for your help. It works!
I now have the grx demos running on my embedded arm platform!
Thanks again Ant
On Friday 12 Mar 2004 10:33 am, Josu Onandia wrote:
- make your own makefile (grx\src\makefile.custom) that is a copy of
makefile.lnx. I don't like to modify the standard one
- in this makefile add CCOPT += -DONLY_FRAMEBUFFER
- in the file src\fdrivers\ftable.c replace the line #if !defined(__XWIN__) && !defined(__WIN32__) with #if !defined(__XWIN__) && !defined(__WIN32__) &&
!defined(ONLY_FRAMEBUFFER)