linux-mips
[Top] [All Lists]

Re: [Linux-fbdev-users] Updated:Error opening framebuffer device/Unknown

To: linux-fbdev-users@lists.sourceforge.net
Subject: Re: [Linux-fbdev-users] Updated:Error opening framebuffer device/Unknown symbol
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Date: Thu, 25 Oct 2007 11:14:04 +0200
Cc: directfb-users@directfb.org, directfb-dev@directfb.org, linux-mips@linux-mips.org, uclinux-dev@uclinux.org
In-reply-to: <eea8a9c90710250155h7534fdfajf7193921575e96fe@mail.gmail.com>
Mail-followup-to: linux-fbdev-users@lists.sourceforge.net, directfb-users@directfb.org, directfb-dev@directfb.org, linux-mips@linux-mips.org, uclinux-dev@uclinux.org
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <eea8a9c90710250155h7534fdfajf7193921575e96fe@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.13 (2006-08-11)
On Thu, 2007-10-25 14:25:40 +0530, kaka <share.kt@gmail.com> wrote:
> 
> Thanks for the overhelming responses.
> I was able to remove the problem of Unknown symbols by linking the proper
> libraries. Now the problem got reduced to the following messages.
> 
> # insmod brcmstfb.ko
> brcmstfb: Unknown symbol printf
> brcmstfb: Unknown symbol malloc
> brcmstfb: Unknown symbol free
> insmod: cannot insert `brcmstfb.ko': Unknown symbol in module (2): No such
> file or directory
> #

You cannot use printf(), malloc() and free() in your driver. This is
kernel code, not userland. Kernel has similar functions (printk(),
various memory-allocating functions and kfree()), but keep in mind
that they may behave a bit differently.

> for the above problem i had tried to link "libgcc.a " but those symbols are
> also undefined in it also.

This may not be correct for all cases. libgcc.a is compiled for the
target the compiler is targeted to. In unfortunate cases, there may be
opcodes used in libgcc that are not available in your CPU...

> RECAP:
> While running  the cross compiled directFB example on MIPS chip,*
> We tried to install the framebuffer driver(command given above) after
> creating the node fb0.

You'd post your driver's sources. That way, we'd suggest improvements
to correctly adapt it to Linux's APIs.

> APPROACH:
> Actually the code of frambuffer driver consists of usual kernel framebuffer
> code and properitiary graphics lib code.
> The properitiary graphics lib code is using malloc,print and free from <
> stdlib.h> and that is why those symbols are coming undefined.

stdlib.h functionality is not per se available. You either need to
implement the missing parts, or rework the stuff to use the proper
kernel interfaces (which is what I recommend.)

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:           Ich hatte in letzter Zeit ein bißchen viel Realitycheck.
the second  :               Langsam möchte ich mal wieder weiterträumen können.
                             -- Maximilian Wilhelm (18. Mai 2006, #lug-owl.de)

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>