LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-08-2012, 12:13 PM   #1
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Rep: Reputation: Disabled
how to change default path for library in fedora 16.


I am using fedora 16,and i have downloaded some code for keyboard driver from net, but while compiling them i got following error:


i8k.c:22:26: fatal error: linux/module.h: No such file or directory
compilation terminated.
 
Old 08-08-2012, 01:03 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Probably not a PATH issue.

? Did you do # yum install kernel kernel-devel
.... and reboot ?
 
Old 08-08-2012, 01:39 PM   #3
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
i did this too..but still same problem.(though i already had dat kernel version which gets installed after this command.now i have two copies of same dir.)

some of the file which are included are:

#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/miscdevice.h>
#include <linux/major.h>
#include <linux/ioport.h>
#include <linux/fcntl.h>
#include <linux/init.h>
#include <linux/poll.h>



linux/interrupt.h: No such file or directory
compilation terminated.
 
Old 08-08-2012, 02:15 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
OK, which driver is it about ? ?

A file name, and a download link, please.


( 'make' / Makefile will usually use the "build" link pointing to
/usr/src/kernels/`uname -r`/, i.e. /lib/modules/`uname -r`/build ,
and easily find linux/files.h in /usr/src/kernels/`uname -r`/include/.
So unless it's a poor Makefile, things should work OK.)

.
 
Old 08-08-2012, 02:25 PM   #5
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
its from github.(i am newbie to device driver.)
pls download the code from below link.

https://github.com/ronaflx/keyboard_driver
Thanks
 
Old 08-08-2012, 03:45 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Fedora 16 :
Make sure that you are booting into the new kernel-3.4.7-1.
Can be checked with the command : uname -r


Keyboard_driver :
1) git clone https://github.com/ronaflx/keyboard_driver.git
2) cd keyboard_driver/
3) make : And the kernel module 'kbd_drv.ko' is created OK.

.
 
Old 08-09-2012, 01:45 AM   #7
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
Thanks its its compiling now (after downloading the code againg though with few warnings ), but now when i am tryng to insert it by "insmod ./kbd_drv.ko" command it gives some error.


"insmod: error inserting 'kbd_drv.ko': -1 Device or resource busy"

i am no where near to understand the problem with it.
Thanks
 
Old 08-09-2012, 01:54 AM   #8
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Rep: Reputation: 11
Cool friend.....
"insmod: error inserting 'kbd_drv.ko': -1 Device or resource busy"

indicates that the driver is already running as a part of kernel. check out with 'lsmod' command. I hope you'll find it
 
Old 08-09-2012, 02:12 AM   #9
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
If it should be with the same name as "kbd_drv" then its not there in lsmod.i searched it in dmesg also but dint found it.
 
Old 08-15-2012, 06:23 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 7
Quote:
"insmod: error inserting 'kbd_drv.ko': -1 Device or resource busy"
Device .. busy : The keyboard is using another kernel module.
You will have to disable that module ( modprobe -r <module> )
before you can use a different one.

Additionally, the keyboard uses an xorg.x11 module :
/usr/lib/xorg/modules/input/kbd_drv.so

.
 
Old 08-15-2012, 06:53 AM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Moved: This thread is more suitable in Linux - Kernel and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to change default file path when opening or saving a file bassplayer69 Slackware 4 11-18-2011 05:27 PM
How to change (add to) library search path at runtime on Linux cwhite102 Programming 8 01-12-2011 12:58 AM
How to set Shared library's default path Ashok_mittal Linux - Newbie 3 01-28-2008 01:58 AM
How to change the default PATH value marc1978 Linux - General 6 02-28-2006 06:09 AM
cant change default os in fedora jt1020 Fedora 2 12-12-2005 12:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration