From: "Richard B. Johnson" <root@chaos.analogic.com>
To: "Srinivas G." <srinivasg@esntechnologies.co.in>
Cc: linux-kernel@vger.kernel.org,
"Surendra I." <surendrai@esntechnologies.co.in>,
Subramanyam B <subramanyamb@esntechnologies.co.in>
Subject: Re: Problem in module loading automatically at boot time
Date: Fri, 11 Jun 2004 12:59:16 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.53.0406111255020.746@chaos> (raw)
In-Reply-To: <1118873EE1755348B4812EA29C55A9722AF3A5@esnmail.esntechnologies.co.in>
On Fri, 11 Jun 2004, Srinivas G. wrote:
>
> 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
>
Maybe `depmod -e ...` would tell you what symbols are missing??
Then, after you observe that, try including <linux/kernel.h>,
and <linux/module.h>, like you are supposed to do.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.
next prev parent reply other threads:[~2004-06-11 17:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-11 15:44 Srinivas G.
2004-06-11 16:59 ` Richard B. Johnson [this message]
2004-06-12 8:45 Srinivas G.
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=Pine.LNX.4.53.0406111255020.746@chaos \
--to=root@chaos.analogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivasg@esntechnologies.co.in \
--cc=subramanyamb@esntechnologies.co.in \
--cc=surendrai@esntechnologies.co.in \
/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
all inboxes | Powered by JetHome®