LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-03-2007, 03:37 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
Makefile:24: *** Linux kernel source not found. Stop.


I don't know how to compile a new driver for kernel
for a NIC card etc
I read many README files they mention names of some files and say to compile the source code
what I understood from this was
gcc some_driver.c
but how to make a object file out of that to be used

Some forums have similar threads but I did not got an answer to my question

I did not have a configure file
but thinking that this is how it works issued following commands as root
./configure
make
that gave me error
Makefile:24: *** Linux kernel source not found. Stop.
the directory where I am doing it has a sc92031.c source file a Makefile a readme.txt and a file that is not having name in human readable format
it begins with some thing lile ??

but that name does not comes correctly


In fact If have no makefile, juste c-code.
so if i just compile the c-code,

I am getting a lot of errors

If compile is ok, how can i configure manually my device ?
and how to use
object file as a module with modprobe / insmod
 
Old 04-03-2007, 08:15 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
In order to compile a kernel driver, it driver needs to “know” how to access kernel resources. You must, therefore, have the header files which provide that information on your system when you do the compilation.

Do a sudo yum install kernel-headers-`uname -r` (Those are backquotes around the uname -r command to tell the shell to use the output from the command in place of the command in backquotes. On American English keyboards, the backquote is usually the top left key. If you can’t find the backquote key you can either run the uname -r command and type the output — which is just your kernel information — in by hand, or try the $(uname -r) alternative syntax.)

Once the make works, a sudo make install should install the driver for you. (Again, assuming that the package is in the standard format.) Typically, a ./configure —help or make —help will list the configuration and compilation options available for you to use.

Note: I’ve shown the commands that need root permission to run as having a sudo command preceding them. If you have not set up the sudo command for your userid, then you’ll need to log in as root to run those commands. (Look at man sudo for information on setting up sudo.)
 
Old 08-26-2008, 10:42 AM   #3
truonghq
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Rep: Reputation: 0
try to install ethernet card driver

Hi gentleman,

I tried to install the driver for the ethernet card ATHEROS AR8121 from the source. This error happens " Make file: 63 *** Linux kernel source not found. Stop".
Could you please help me how to settle this problem?

Thanks,

Truong.
 
Old 08-26-2008, 04:36 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
If you're using a distribution that supports the yum (Yellow-dog Update Manager), what did you fail to understand in the above post?

If you're using some other distribution, please don't keep the distribution name secret from us. Different distributions use different update managers.

In any case, you must install your specific kernel headers and development packages before you can compile and install any device drivers. And you must update those headers, re-compile, and re-install those drivers every time you update your kernel.

And, did you check for a pre-compiled madwifi driver in your distribution's repositories? Unless you're using x86_64 (i.e., 64 bit) hardware and OS, most distribution will have a pre-compiled, up-to-date, madwifi driver in their repositories.

Last edited by PTrenholme; 08-26-2008 at 04:40 PM.
 
Old 01-11-2011, 03:29 PM   #5
azsiouxboy
LQ Newbie
 
Registered: Jan 2011
Posts: 4

Rep: Reputation: 0
Hi! I am also running FC13 and having the same issue. However I tried to do the kernel headers and since I am not online I just did the rpm. It said nothing to do. Any other thoughts I did try and make and make install but I do not know where it puts the drivers so am I just pwn3d?
 
Old 01-12-2011, 02:19 AM   #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
Post # 5 : In Fedora, the package 'kernel-headers' provides
/usr/include/linux/<headers>, etc., i.e. not what you are missing.
(linux-headers-* for Debian/Ubuntu provides /usr/src/linux ! )


The Fedora package required to build 3rd party drivers is :

kernel-devel-`uname-r`

..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Makefile.rules not found during kernel compile anilbh Fedora 1 02-21-2006 09:27 AM
Help!! Make file:62: *** Linux source not found. Stop. harlemno1 Linux - Newbie 6 03-04-2005 04:22 AM
Linux Kernel Source Tree Not found pzearfoss Linux - General 6 12-28-2004 02:16 PM
Linux kernel source not found error RH 7.2 Accelet Linux - Hardware 2 08-04-2004 02:26 PM
Makefile:66: *** Cannot find a kernel config file. Stop NHBlacklabs Linux - Newbie 7 03-25-2004 04:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 04:50 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