Hi all,

Relevant background
--------------------------

I want to use DFB on a MIPS simulator I am working on. I am using (actually a
simulator of-, something akin to QEMU) an embedded MIPS24K processor and a
2.6.10 kernel with a working framebuffer device (that is, fbcon works for
instance). 

Since this is only a simulator (an exact one, but still) I have to build and
install DFB and the example programs to a mounted filesystem image, instead of
the default directory which is /usr/local, however once I mount the filesystem
as root in the simulator, DFB should think it's indeed installed in the default
/usr/local. 

Note I cannot compile and install DFB from within the simulator (for one thing,
it's too slow, and I'm going to modify DFB to add graphics acceleration in my
platform, so I'll have to build many times, and this is out of the question).

I was unable to make this work (telling the configure script to install to
/mnt/usr/local makes the dynamic linking to be to /mnt/use/local/lib during run
time, where it should link to /usr/local/lib and this is just one example of
why installing to a non-defulat directory doesn't work). Should this be
possible after all? / anyone managed to do this? – please explain how.

So instead, basically, I'm cross-compiling from an x86_64-linux system (AMD
Opteron) to my MIPS, and I install the build locally to /usr/local. I then
manually copy the files created by the installation to the mounted filesystem,
links and all.

The problem
---------------

This seems to compile and install properly but when I try to run any DFB program
(dfbinfo, df_dok, etc') I get the following:

# dfbinfo

     =======================|  DirectFB 1.0.0-rc2  |=======================
          (c) 2001-2006  United Cultures of Earth - go for outer space!
          (c) 2000-2004  Convergence (integrated media) GmbH
        ----------------------------------------------------------------

 (*) DirectFB/Core: Single Application Core. (2007-01-23 07:00) 
fb_ioctl - 1
fb_ioctl - 2
(!) [  206:    0.000] --> Caught signal 1 (sent by pid 211, uid 0) <--
Killed

Using strace I saw that the problem is in VT code, specifically when doing a
certain ioctl on tty0: (here the strace output)
fb_ioctl - 1
ioctl(3, 0x460f, 0x7fff7740)            = 0
fstat(3, {st_mode=S_IFCHR|0644, st_rdev=makedev(29, 0), ...}) = 0
fb_ioctl - 2
ioctl(3, 0x4610, 0x7fff77d8)            = 0
ioctl(4, 0x5606, 0x1)                   = 0
ioctl(4, 0x5607, 0x1)                   = 0
nanosleep({0, 40000000}, NULL)          = 0
open("/dev/tty1", O_RDWR)               = 5
write(5, "\33[?1;0;0c\0", 10)           = 10
ioctl(5, 0x4b3a, 0x1)                   = 0
ioctl(4, 0x5471)                        = -1 ENOTTY (Inappropriate ioctl for
device)
ioctl(5, 0x5480)                        = 0
rt_sigaction(SIGRT_9, {SIG_DFL}, {SIG_DFL}, 16) = 0
rt_sigaction(SIGRT_10, {SIG_DFL}, {SIG_DFL}, 16) = 0
ioctl(5, 0x5602, 0x7fff78a8)            = 0
old_mmap(NULL, 8388608, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2af47000
mprotect(0x2af47000, 4096, PROT_NONE)   = 0
clone(child_stack=0x2b7466d0,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED,
parent_tidptr=0x2b746b78, tls=0x2b74df80, child_tidptr=0x2b746b78) = 223
sched_yield(….
(!) [  223:    0.000] --> Caught signal 1 (sent by pid 223, uid 0) <--
)                           = 0
+++ killed by SIGKILL +++

I forced the code not to initialize VT as if config->vt was "false", but I have
no idea how this will affect DFB.

Another problem I have is that afterwards, when initializing the input drivers,
I get:

# /usr/local/bin/dfbdump

     =======================|  DirectFB 1.0.0-rc2  |=======================
          (c) 2001-2006  United Cultures of Earth - go for outer space!
          (c) 2000-2004  Convergence (integrated media) GmbH
        ----------------------------------------------------------------

serial8250: too much work for irq53
SK: before dfb_core_create(..)
(*) DirectFB/Core: Single Application Core. (2007-01-23 07:00) 
Kernel massgae:::
Inside fb_mmap
Kernel massgae:::
fb->fb_mmap
Inside HZ300FB mmap
mapping the frambuffer
(*) Direct/Thread: Running 'PS/2 Input' (INPUT, 272)...
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(!) [  269:    0.000] --> Caught signal 11 (at 0x4, invalid address) <--

And with strace:
…
write(2, "\0\0\0\0\0\0\0\0ct/Thread: Running \'PS/2"..., 56(*) Direct/Thread:
Running 'PS/2 Input' (INPUT, 210)...
) = 56
write(2, "(*) DirectFB/Input: IMPS\0\0\0\0\0\0\0\0"..., 52(*) DirectFB/Input:
IMPS/2 Mouse 1.0 (directfb.org)
) = 52
munmap(0x39c64000, 270272)              = 0
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
open("9*0", O_RDWR)          = -1 ENOENT (No such file or directory)
munmap(0x39c20000, 278336)              = 0
open(" f* ", O_RDONLY)                 = -1 ENOENT (No such file or directory)
open("/dev/input/js0", O_RDONLY)        = -1 ENOENT (No such file or directory)
munmap(0x39bdc000, 267776)              = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
syscall(0x107e, 0x7fff7710, 0x7fff7790, 0x7fff7b98, 0, 0, 0x2abf6fe8, 0) = 207
gettimeofday({0, 0}, NULL)              = 0
write(2, "(!) [  207:    0.000] --> Caught"..., 42(!) [  207:    0.000] -->
Caught signal 11) = 42
write(2, " (at 0x4, invalid address) <--\n", 31 (at 0x4, invalid address) <--

(I have no joystick connected, nor do I have kernel support for one, nor do I
want one. Id prefer if were possible to work without input at all at least for
starters)
 
More required background information
-----------------------------------------------

As can be seen from the above, I am using the latest (1.0 RC2) DFB sources tar,
and the latest examples sources tar (0.9.25) [maybe this is what I'm doing
wrong? if these are not expected to match that is]. I configured, maked and
installed DFB with the following:

./configure --build=x86_64-unknown-linux-gnu --host=mipsel-montavista-linux
CC=mipsel-montavista-linux-gcc
CFLAGS=-I/opt/montavista/pro/devkit/lsp/mips-malta-mips2_fp_le/linux-2.6.10_dev/include/
CPPFLAGS=-I/opt/montavista/pro/devkit/lsp/mips-malta-mips2_fp_le/linux-2.6.10_dev/include/
--disable-sdl --enable-shared --disable-freetype -with-gfxdrivers=none

make
make install

And the examples with the following:

./configure --build=x86_64-unknown-linux-gnu --host=mipsel-montavista-linux
CC=mipsel-montavista-linux-gcc
CFLAGS=-I/opt/montavista/pro/devkit/lsp/mips-malta-mips2_fp_le/linux-2.6.10_dev/include/
CPPFLAGS=-I/opt/montavista/pro/devkit/lsp/mips-malta-mips2_fp_le/linux-2.6.10_dev/include

make
make install

I then copied, as I've said above, all files created by the installs to
/mnt/usr/local/ with -a, edited the /etc/ld.so.conf, and ran my simulator with
this filesystem mounted.

Your help would be greatly appreciated. ("go for outer space!")
S


_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to