Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: linux-fbdev-users@lists.sourceforge.net
Cc: directfb-users@directfb.org, directfb-dev@directfb.org,
	linux-mips@linux-mips.org, uclinux-dev@uclinux.org
Subject: Re: [Linux-fbdev-users] Updated:Error opening framebuffer device/Unknown symbol
Date: Thu, 25 Oct 2007 11:14:04 +0200	[thread overview]
Message-ID: <20071025091404.GH16774@lug-owl.de> (raw)
In-Reply-To: <eea8a9c90710250155h7534fdfajf7193921575e96fe@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2161 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2007-10-25  9:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25  8:55 Updated:Error opening framebuffer device/Unknown symbol kaka
2007-10-25  8:55 ` kaka
2007-10-25  9:09 ` Manuel Lauss
2007-10-25  9:14 ` Jan-Benedict Glaw [this message]
2007-10-25 14:15 ` Shane McDonald
2007-10-25 14:15   ` Shane McDonald
2007-10-25 15:56 ` Markus Gothe
2007-10-25 16:03   ` Kevin D. Kissell
2007-10-25 16:03     ` Kevin D. Kissell
2007-10-25 18:25 ` [directfb-users] " gxk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071025091404.GH16774@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=directfb-dev@directfb.org \
    --cc=directfb-users@directfb.org \
    --cc=linux-fbdev-users@lists.sourceforge.net \
    --cc=linux-mips@linux-mips.org \
    --cc=uclinux-dev@uclinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox