Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264153AbUFKRD0 (ORCPT ); Fri, 11 Jun 2004 13:03:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264270AbUFKRCV (ORCPT ); Fri, 11 Jun 2004 13:02:21 -0400 Received: from chaos.analogic.com ([204.178.40.224]:3456 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S264229AbUFKQ73 (ORCPT ); Fri, 11 Jun 2004 12:59:29 -0400 Date: Fri, 11 Jun 2004 12:59:16 -0400 (EDT) From: "Richard B. Johnson" X-X-Sender: root@chaos Reply-To: root@chaos.analogic.com To: "Srinivas G." cc: linux-kernel@vger.kernel.org, "Surendra I." , Subramanyam B Subject: Re: Problem in module loading automatically at boot time In-Reply-To: <1118873EE1755348B4812EA29C55A9722AF3A5@esnmail.esntechnologies.co.in> Message-ID: References: <1118873EE1755348B4812EA29C55A9722AF3A5@esnmail.esntechnologies.co.in> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1982 Lines: 73 On Fri, 11 Jun 2004, Srinivas G. wrote: > > Hi, > > I have written a small driver program called hello.c. > > ************************************************************************ > *************** > #include > > 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 , and , 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. - 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/