LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Makefile:24: *** Linux kernel source not found. Stop. (https://www.linuxquestions.org/questions/fedora-35/makefile-24-%2A%2A%2A-linux-kernel-source-not-found-stop-542885/)

tkmsr 04-03-2007 03:37 AM

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

PTrenholme 04-03-2007 08:15 AM

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.)

truonghq 08-26-2008 10:42 AM

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.

PTrenholme 08-26-2008 04:36 PM

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.

azsiouxboy 01-11-2011 03:29 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?

knudfl 01-12-2011 02:19 AM

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`

..


All times are GMT -5. The time now is 11:59 PM.