LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-24-2006, 01:22 PM   #1
Black Hawk
Member
 
Registered: Mar 2006
Distribution: Ubuntu 7.10
Posts: 38

Rep: Reputation: 15
Getting kernel source


I'm trying to recompile my kernel. How can I get the source code for the kernel?. Can I just download it from www.kernel.org or do I need a special source package for debian?

Thanks in advance

Merry Christmas
 
Old 12-24-2006, 01:36 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Both will do.
 
Old 12-24-2006, 04:43 PM   #3
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Not quite. Debian has special patches applied to the kernel, not exactly sure whatfor. So using a vanilla kernel from the kernel.org guys might not work on your system. So, use the Debian kernel sources if you want to re-compile against your Debian kernel.
 
Old 12-24-2006, 04:49 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
I've used a number of vanilla kernel sources from kernel.org on my Debian machine without a problem. It may help that I'm using this page as my guide to recompilation; I couldn't say. See section 7.1.1 for "the Debian Way".

http://www.debian.org/doc/manuals/re...kernel.en.html
 
Old 12-24-2006, 04:52 PM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Never had a problem with vanilla kernels on Debian. If you need some extra functionality you can patch vanilla sources too.
 
Old 12-24-2006, 06:40 PM   #6
restless
Member
 
Registered: Feb 2003
Location: Belgium
Distribution: Debian
Posts: 166

Rep: Reputation: 31
yeah i'm using a vanilla kernel aswell 2.6.17 is going it for me.. for some reason 2.6.19 is giving me probs for my wifi card when compiling..

just copy the .config from your /boot and then do makemenuconfig .config you and you'll be fine

just a tip tho.. use kpkg. there is a sticky explaining it all very well.
 
Old 12-24-2006, 07:09 PM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by restless
just copy the .config from your /boot and then do makemenuconfig .config you and you'll be fine
Hold your horses! If you use .config from an older version you must run make oldconfig. And even this is does not guarantee anything. Best way to do it is to configure your kernel from scratch. Yes, it will take long. Yes, it involves lots of reading. But in the end you will be awarded with stable and fast OS.
 
Old 12-24-2006, 07:28 PM   #8
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Does this look familiar? Either use "touch" to create the file in your kernel source include/linux directory, or just delete the line from ah_osdep.c. You could also switch to madwifi-ng. I don't think that version has the dependency.
Code:
/data/madwifi/madwifi-0.9.2/ath/../hal/linux/ah_osdep.c:44:26: error: linux/config.h: No such file or directory
 
Old 12-24-2006, 07:35 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
"Hold your horses! If you use .config from an older version you must run make oldconfig."

"MUST"? I think not. I've switched from 2.4 through several versions of 2.6 up to, now, 2.6.19.1. I've tried running make oldconfig a few times, but there's always so much noise to deal with that I just stop it and run make menuconfig to deal with it. That's not to say that make oldconfig isn't a good idea though, as you will be presented with all the new options and can delete them on the fly. I just found it overwhelming at first, as I was being asked a bunch of questions and didn't have a clue whether I wanted the new stuff or not.
 
Old 12-24-2006, 07:44 PM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by Quakeboy02
"Hold your horses! If you use .config from an older version you must run make oldconfig."

"MUST"? I think not. I've switched from 2.4 through several versions of 2.6 up to, now, 2.6.19.1. I've tried running make oldconfig a few times, but there's always so much noise to deal with that I just stop it and run make menuconfig to deal with it. That's not to say that make oldconfig isn't a good idea though, as you will be presented with all the new options and can delete them on the fly. I just found it overwhelming at first, as I was being asked a bunch of questions and didn't have a clue whether I wanted the new stuff or not.
What a childish approach. Here you described how not to build a kernel. You do not know what you built in and what not. You get a bloated kernel. Your kernel will contain lots of unnecessary drivers which possibly conflict with each other. Something you actually may want is not compiled in because you even do not know it exists.

What i wrote in my previous post comes from kernel developers. Now you probably say developers don't know a thing about it?
 
Old 12-24-2006, 08:03 PM   #11
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
"What i wrote in my previous post comes from kernel developers. Now you probably say developers don't know a thing about it?"

I'm sure they know a lot about it. But, name-dropping doesn't infer any god-like abilities on yourself. There is a lot to say about JUST DOING things in this world. Yes, it may be childish, as compared to taking a university course first. But, you know what: you do actually manage to get things done, and you learn the consequences of doing it the wrong way in the process. At this point, I don't think there's much left I could get rid of in my kernel. Perhaps, but it's not due to lack of trying - or from not running "make oldconfig" and getting an output that I simply wasn't prepared to deal with because I was in the early learning stage.

I love elitists of all stripes. But, they do usually need a bit of ketchup to go down smoothly.

Happy Christmas.
 
Old 12-24-2006, 08:12 PM   #12
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Yes, you can drive around a blind corner 60 mph every day and say: dude, you are stupid if you slow down here, see, nothing has happened to me. You can compile your kernels how you want, sure. OP here may be not that scruffy though.

Merry Christmas to everybody.
 
Old 12-24-2006, 08:13 PM   #13
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
"You can compile your kernels how you want, sure."

Too true. And yet, there's always someone out there like you who feels a personal responsibility to call me names. Well done!
 
Old 12-24-2006, 08:35 PM   #14
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by Quakeboy02
Too true. And yet, there's always someone out there like you who feels a personal responsibility to call me names.
So you admit there's something wrong with you?

Seriously, these forums here are for helping people with their Linux questions and problems. We better keep up the quality.
 
Old 12-24-2006, 08:48 PM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Running "make oldconfig" will pickup any changed features in the new kernel. You can go back and make further changes if you want, but normally you already did that configuring your last kernel version.
 
  


Reply

Tags
kernel, source



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
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
Debain kernel source or Linux kernel source? kushalkoolwal Debian 4 11-28-2005 01:56 PM
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 05:42 PM
difference between "pure" kernel source, and .deb packaged kernel source microsoft/linux Debian 1 06-19-2005 10:28 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM

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

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