LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 02-12-2004, 09:14 AM   #1
nabil_boussetta
Member
 
Registered: Oct 2003
Posts: 45

Rep: Reputation: 15
Question kernel source code


i have installed redhat enterprise 2.1 (kernel version: 2.4.18-14)
the lan card is not detected by the system
i have downloaded an rpm package which contain the driver.
the readme of the package indicate the following:

The driver requires the presence of the kernel source code
and configuring the kernel source before building the driver.
The following steps need to be done once for each kernel that is
booted. For example, if the current kernel is UP (uni-processor)
and an SMP (symmetrical-multi-processor) kernel is booted, these
steps must be performed again to configure the kernel source for
SMP before building the driver for the SMP kernel.

Red Hat installation:
If the /usr/src/linux-<kernel-version> directory does not
exist install the kernel source code per Red Hat instructions.
Once installed, follow the commands listed below to configure
the kernel source to match the running kernel.

# cd /usr/src/linux-<kernel_version>
# make mrproper
# make -e KERNELRELEASE=`uname -r` oldconfig
# make -e KERNELRELEASE=`uname -r` dep

my question is where to find the kernel source code, what version should i download ?
 
Old 02-12-2004, 09:16 AM   #2
nabil_boussetta
Member
 
Registered: Oct 2003
Posts: 45

Original Poster
Rep: Reputation: 15
sorry the kernel version is : 2.4.9-e.3
 
Old 02-12-2004, 09:42 AM   #3
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
The kernel source comes with the ES CD's. Look for an rpm called kernel-source-<version>. You will want the version to exactly match the kernel you're running.

Håkan

Last edited by hw-tph; 02-12-2004 at 09:44 AM.
 
Old 02-12-2004, 10:23 AM   #4
nabil_boussetta
Member
 
Registered: Oct 2003
Posts: 45

Original Poster
Rep: Reputation: 15
thank you, it's ok
but i'd like to know what makes the fowllowing commands

make mrproper
make -e KERNELRELEASE=`uname -r` oldconfig
make -e KERNELRELEASE=`uname -r` dep
 
Old 02-12-2004, 12:56 PM   #5
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
make mrproper will completly clean your kernel sources (erase all object files, and also config files like .config, .depend)
make oldconfig... I don't really know, but I suppose that it will generate a default .config file
make dep will check files dependency generating by your .config... This dependecies will be stored in .depend file
 
Old 02-13-2004, 03:17 AM   #6
nabil_boussetta
Member
 
Registered: Oct 2003
Posts: 45

Original Poster
Rep: Reputation: 15
another question please
why we need to install the kernel source code before installing the lan card driver
 
Old 02-13-2004, 06:57 AM   #7
jorisb
Member
 
Registered: Jan 2004
Distribution: Mandrake 10.1
Posts: 33

Rep: Reputation: 15
I'm confused too
What exactly does the Kernel contain? does it hold drivers also?
And why and when do you need to compile a new one. how is it done?
Is there a good website that explains it all?
 
Old 02-13-2004, 07:57 AM   #8
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hello Nabil_boussetta and jorisb
1) It's safer to install the kernel source before because if you compile your driver inside the kernel, you'll obviously need kernel sources. And if you compile it as a module, you'll need a kernel with loadable module support enable and various things like a proper /lib/modules/<kernel-release>/ directory.
Another reason is that driver code is processed in kernel space... so its sources need some specific kernel include to be compiled.

2) Kernel contains various things like boot process, memory management, scheduler... and a lot of drivers. Some classical like PCI, filesystems... are compiled in kernel for obvious reasons. And other like driver for usb devices or NIC can be found in kernel sources and are more likely compiled as modules.
Why compile a new kernel??? for example your mandrake provides you a kernel with a lot of useless stuff for you... So you may want to recompile it to decrease its size and improve its perf... You can also compile a new kernel, for update reasons: a security patch or the new release provides features you may need.
Here is a good website where you can find various howtos about linux and his applications
 
  


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
Where can I get the Mandrake Kernel Source code? tur third Mandriva 3 06-15-2005 04:09 AM
where to D/L kernel source code Almazick Linux - Software 6 09-03-2004 04:41 PM
Kernel source code not present cdot Linux - Wireless Networking 7 08-29-2004 01:27 AM
reading kernel source code eshwar_ind Programming 4 06-02-2004 04:18 AM
Location of kernel source code mhl Mandriva 2 11-30-2003 06:02 PM


All times are GMT -5. The time now is 03:08 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration