Static Driver Loading Issue


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Static Driver Loading Issue
# 8  
Old 07-02-2012
Presently I am just trying to install a simple char driver or say a simple kernel module.

---------- Post updated 07-03-12 at 12:41 AM ---------- Previous update was 07-02-12 at 09:39 PM ----------

Thanks vbe for the inputs.
What if I want just to get the driver module loaded at boot time without building it in the kernel?
How to go about it?
# 9  
Old 07-02-2012
You will have to build your driver so that is a loadable kernel module. To get you started, I suggest you read Linux Loadable Kernel Module HOWTO
# 10  
Old 07-06-2012
There is some problem in static loading of driver which is leading to confusion.
To load the driver statically I followed two ways Process 1) and Process 2).
Earlier I had followed:
Process 1)
The steps are:
1) I built my char driver named demochardrv.ko.
2) I copied the driver in /lib/modules/2.6.34.12/kernel/drivers/char/.
3) I made an entry of it in /etc/modules.
4) Reboot.

But these 4 steps were not working earlier and I did not see my driver in lsmod.

So apart from the above steps I followed the other way:
Process 2)
The steps are as:
1) I added the driver details in file "/lib/modules/2.6.34.12/build/drivers/char/Kconfig":
config DEMOCHARDRV
tristate "TEST DEMO DRIVER'
default n
help
TEST STATIC INSTALL DRIVER

2) I added the driver details in "/lib/modules/2.6.34.12/build/drivers/char/Makefile":
obj-$(CONFIG_DEMOCHARDRV) += demochardrv.o

3) Copied the driver files in /lib/modules/2.6.34.12/build/drivers/char/.
4) Edited the .config file and added CONFIG_DEMOCHARDRV=y.
5) Fired make menuconfig and selected(with either * / M) my driver.
6) Did make, make modules, make modules_install and make install.
7) Reboot

Now the driver was loading at boot time even if I was not selecting it in menuconfig.

To resolve the issue in Process 2 I removed the entry made in /etc/modules. But now the driver was not loading at all.
So I removed the Process 2 steps and again followed Process 1 steps and driver is loading at boot time now.
Now Process 1 is working.
But Process 2 is not working alone and it need additional steps of Process 1.

So I am confused as to which process are correct.
Can anybody pls provide some inputs?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

IHS connector related loading issue

I am getting the following error on loading the connector DLL in IHS 8.5 on AIX 7.1 bash-4.2# /usr/32bit/IBM/HTTPServer/bin/apachectl start httpd: Syntax error on line 902 of /usr/32bit/IBM/HTTPServer/conf/httpd.conf: Cannot load /usr/<company_name>/IHS85/lib/libApache22Connector.a into... (3 Replies)
Discussion started by: George47
3 Replies

2. IP Networking

Node switched itself from static to DHCP on reboot issue

I'm trying to figure out what circumstances would cause an Open Solaris 11.2 host to switch itself from a static to a DHCP ip address upon reboot. This has only happened once but is a cause for some concern as this machine will be part of a web server pool. Nothing has changed on the LAN that... (2 Replies)
Discussion started by: SmokeyJoe
2 Replies

3. Red Hat

Linux ODBC driver issue

Hi Gurus, I have a odbc in Linux. when I run command ldd. I got following result: # ldd DWora26.so linux-vdso.so.1 => (0x00007fff26355000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc31e70a000) librt.so.1 => /lib64/librt.so.1 (0x00007fc31e501000) ... (1 Reply)
Discussion started by: ken6503
1 Replies

4. Linux

rpm packaging issue for unixodbc driver manager

Hi All, I am trying to make rpm package for unixODBC driver manager 2.3.0 using below spec file. During rpmbuild i am getting the error. Can you pls advice how we can overcome this issue %define name unixODBC %define ver 2.3.0 %define prefix /usr %define sysconfdir /etc %define libdir... (2 Replies)
Discussion started by: kamauv234
2 Replies

5. Hardware

Difference between platform driver,codec driver and Machine driver

In general terms what are the differences platform driver,codec driver and Machine driver? (1 Reply)
Discussion started by: rupeshkp728
1 Replies

6. Windows & DOS: Issues & Discussions

VxWorks - W2003 issue loading file from NFS share

We recently replaced an existing Windows Server 2000 with a Windows Server 2003. The server‘s primary function is file/print in our development environment. One of the directories is shared using NFS. All compiled software is kept in this share (we use C & C++). The generated “.out” and “.ndb”... (0 Replies)
Discussion started by: BigBuff52
0 Replies

7. IP Networking

I need HELP to Set up Coyote Linux router with 1 static IP & 64 internal static IP

hello, i need help on setting my coyote linux, i've working on this for last 5 days, can't get it to work. I've been posting this message to coyote forum, and other linux forum, but haven't get any answer yet. Hope someone here can help me...... please see my attached picture first. ... (0 Replies)
Discussion started by: dlwoaud
0 Replies

8. Solaris

By loading I have received the following issue: BAD PBR SIGN.

Hi folks. By disk cloning on Solaris x86, I used a command dd. I pulled out the source and inserted the new disk. By loading I have received the following issue: BAD PBR SIGN. :( (5 Replies)
Discussion started by: wolfgang
5 Replies

9. UNIX for Dummies Questions & Answers

Exception while loading DB2 driver Class.forName("com.ibm.db2.jcc.DB2Driver")

Hi... I m working on UNIX z/OS. Actually i have to pass the parameters from the JCL to java-db2 program thru PARM. I am able to pass the arguments but the problem occured is, it is throwing an exception while loading the db2 driver as 'Javaclassnotfound:com.ibm.db2.jcc.DB2Driver'... (0 Replies)
Discussion started by: Sujatha Gowda
0 Replies

10. UNIX for Dummies Questions & Answers

Red Hat 7.2 GUI not loading & Connection issue

Please Help Let me start off by saying that I am a total idiot when it comes to unix. Please, if you would care to reply keep this in mind. Thank you. I have been attempting to get my unix machine online to no avail. I have the rest of the house networked with 3 other windows machines into a... (1 Reply)
Discussion started by: kmer
1 Replies
Login or Register to Ask a Question