lkml.org 
[lkml]   [2004]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectProblem in module loading automatically at boot time
Date
From

Hi,

I have written a small driver program called hello.c.

************************************************************************
***************
#include <linux/module.h>

MODULE_LICENSE("GPL");

int init_module(void)
{
printk("<1>" "Hello world\n");
return 0;
}

void cleanup_module(void)
{
printk("<1>good bye\n");
}

************************************************************************
****************

I compiled the above program with cc -DMODULE -D__KERNEL__
-I/usr/src/linux2.4/include -O2 -c hello.c

I am using Red Hat Linux 7.3 with kernel version of 2.4.18-3.
It works fine when I load it with insmod from root prompt.

Now, I want to make it load automatically at boot time.
For that I have used the following steps.

---> I copied the hello.o file in the
/lib/modules/2.4.18-3/kernel/drivers/block

---> I run the depmod command. It included the above path in
/lib/modules/2.4.18-3/modules.dep file.

---> I added "alias hello1 hello" entry into /etc/modules.conf file.

When I reboot the machine after the above changes, my driver is not
loaded and an error message is printed as follows.

---> depmod: *** Unresolved symbols in
/lib/modules/2.4.18-3/kernel/drivers/block/hello.o


Could anyone suggest me, if I am missing anything here?

Srinivas G


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.163 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site