-
April 7th, 2003, 02:18 AM
#1
Junior Member
Linux Kernel Basics.. Recompiling?
I have a few questions, or a need for an explanation. I've been using linux now since I was 17 ish and I am 23 now. I've done quite a bit of programming too... I'm very well versed in many problems and the operations of linux, even went to college for a while with linux courses.. but one thing I have yet to do myself is re-compile a Kernel...
What I understand, or think I understand, is that recompiling is using the source headers etc to recompile the standard kernel with the sources for your current kernel module configuration, to create a newer, tighter kernel binary with the support all built in... as in..
The vmlinuz, whatever your kernel's file for whatever distro your using now contains your network drivers, sound card drivers, scsi/raid drivers or whatever you got, in the main re-compiled binary....
As opposed to the original distro's kernel reaching to the kernel modules, probing and/or setting up all the modules automagikally or with user defined parameters, and loading them into memory...
Again, this is what I observe on a daily basis, hehe.. so I could be wrong. Since linux uses protected memory, that means that a kernel module crashing wouldn't cause the kernel itself to bail out... but, as long as you've tested yoru system, and you know it won't fail, then compiling the modules into the binary kernel from source up wouldn't be a problem.. but if it did screw up, your kernel would go bunk.... teets up...
If someone can like, verify that I'm not totally crazy, and that this is indeed what re-compiling accomplishes, hehe, that would rule.
If someone can also give me a quick rundown of what is nessacary before and after a compile, that would be cool. I have installed new outta the box kernels, and stuff... many times. I am very familiar with Debian and RedHat installations, the two opposite ends, the coke and pepsi as it were of linux distros.. I have for instance, upgraded a debian 2.4.x to a 2.4.20 or whatever kernel, but, that's basically exchanging packages, updating a few symlinks.. all done with binary packages, pre-compiled and stuff... redhat was even sillier, and offered no learning experience at all. At least Debian, you can take apart what is happening easier...
Anyways, any insight/help would rule.... thanks guys. This site.. is an amazing resource.
Ryan
-
April 7th, 2003, 04:38 AM
#2
Senior Member
Um first of all wrong forum but what ever, as to your question, tho I'm under the impression that that is one reason to recompile, its not the only reason, for instance if you want a newer kernel with out downloading a whole new Distro upgrade, you can get newer source, also you can custom fit the kernel to your needs a little more anal-retentively. You can choose to load certain things as moduals and other things directly in the kernel. Basically recompiling can be whatever you want it to be, well other than a pile of pancakes or say a winning lotto ticket.
www.kernel.org is a good place to start, and google can always be an aid if you get lost.
Hvae fun recompiling, i always have.
what is love but contempt for hate?
-
April 7th, 2003, 11:20 AM
#3
Junior Member
Well.. thanks for your help...
I put this under tutorials hoping that the responses would serve others as well as me. I am familiar with the linux kernel, and an OS's kernel in general, the function it serves.. I was looking for a little help.. I understand that's what this is all about...
But yes.. I understand that.. The kernel options.. say... adding and removing modules for different hardware.. tweaking to run faster.. cleaning it up.. adding and removing USB support.. legacy hardware support.. And I have done the same.. installed a new kernel without upgrading a distro.. I just never had to recompile, as most distros offer a few versions of a bloated basic set binary kernel and their sources versions based on what chip you run etc...
Thanks for the information.... Anyone else out there have some stories that would start this as being useful? That last post was basically a shot at me, made me feel stupid, and almost got me banned. The question I asked, was again, what are the steps nessacary to recompile a new kernel from source? For someone who hasn't done it a million times?
Ryan
So that I stop receiving negative points from people just reading it and dinging me...
Does anyone know a way to move this attempt to start a tutorial as is to a different area,
other than newbie tutorials?
-
April 7th, 2003, 11:49 AM
#4
Post moved to appropriate forum.
-
April 7th, 2003, 12:00 PM
#5
Junior Member
Yep, Recompile recompile
Not the right forum, but thats been said.
If your point is why you need to recompile.
If you need to recompile it would be becoz you need a new distro onto your desktop or you want to get rid of unwanted things from your kernal. The modules that bundle inside the kernel tightly are released as sources when you download a new patch/ or a distribution.
Lets say
accept() support for TCP-style SCTP sockets or cleanups in net/compat.c.....
or buffer overwrites ....
Make sure you need a new kernel (it's always good)
The first thing to keep in mind before you do this action is to make sure that you have a backed up copy of the previous kernel.. Just in case
After the upgrade, you'll obviously know if the things u needed the upgrade to work did or not
Suggestion: make sure you join the mailing list vger.kernel.org.
Also compile the kernel a few times and patch it and you'll get used to it. Won't miss a chance then. The first one is the toughest. Make sure you read the changelog of the new kernel distribution
--------------------
100% Microsoft free
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|