[uClibc]insmod problem

Erik Andersen andersen at codepoet.org
Thu Jan 9 15:27:30 UTC 2003


On Thu Jan 09, 2003 at 03:35:45PM +0100, Igor Trevisan wrote:
> Hi,
> 
> I'm using uClibc-0.9.16 and Busybox-0.60.5 compiled for an arm-linux
> platform.

You will want to update your uClibc version, since 0.9.16
has a bug preventing applications from running properly on
arm-linux.

> I have to write the driver for a simple rele device and I was starting
> with a very simple demo:
> 
> *********************** frrele.c *********************************
> #define MODULE
> #include <linux/module.h>
> #include <linux/kernel.h>
> //#include <linux/modversions.h>
> 
> int init_module(void)
> {
>  printk("<1>Initializing rele module...\n");
> 
>  return 0;
> }
> 
> void cleanup_module(void)
> {
>  printk("<1>Goodbye from rele module...\n");
> }
> **************************** eof *********************************
> 
> I compiled it with 
> arm-uclibc-gcc -c frrele.c, I moved frrele.o into
> the target  File System and finally I tried to use insmod to install
> the new module.
> This is what I obtain...
> 
> # insmod ./frrele.o
> Using ./frrele.o
> insmod: unresolved symbol printk
> #
> 
> What's wrong?!

Well, for starters, pretty much everything.  Kernel modules do
not use the system C library.  I highly recommend you go out to
your closest bookstore and buy a copy of the Linux Device Drivers
book.  It will give you the help you need to get started.

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list