Makefile:24: *** Linux kernel source not found. Stop.
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.)
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?
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.
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?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
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 :
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.