LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-24-2001, 05:26 PM   #1
vinaypai
LQ Newbie
 
Registered: Jun 2001
Location: Bombay, India
Distribution: Redhat 7.0
Posts: 16

Rep: Reputation: 0
Question Kernel Compilation issues


Hi folks,
1. I've downloaded (and built (successfully(more-or-less))) the Linux 2.4.1 kernel. I chose to include everything in the kernel image, even if it can be made into a module. Is this a bad thing? If so, why? If not, why does the documentation say that you "build essential drivers into the kernel and compile the rest as modules".

2. The documentation recommends using gcc 2.95.3 (or thereabouts... don't remember exactly which version). Is there a problem using a later (stable) build of gcc to build my kernel, like the newly-released gcc 3.0?
 
Old 06-25-2001, 02:41 AM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
The reason is..

Most people don't need everything, They might later on but not now. Later they can load a module if the kernel will support it. If you change out something in your system like a soundcard or nic if it is a module then the new card can be loaded as a module and the one you took out unloaded. This is why it is a good idea to load some of your nonessential hardware as a module.

So if you think you will need it later choose the module option. If you know you will never need it why fatten up the kernel.

For example, I have no plan to go out and buy a Gravis Ultrasound card so why put it in the kernel.

The smaller it is the faster.


Last edited by DavidPhillips; 06-25-2001 at 02:51 AM.
 
Old 06-25-2001, 11:59 AM   #3
vinaypai
LQ Newbie
 
Registered: Jun 2001
Location: Bombay, India
Distribution: Redhat 7.0
Posts: 16

Original Poster
Rep: Reputation: 0
When I said everything, I didn't mean every blessed thing the kernel sources contain. I meant everything relevant to my hardware and what I plan to use (eg. I chose not to include NFS support, etc.). I don't add new hardware everyday, and when I do, I'm sure I can spend the 15 mins it takes to recompile.

Wouldn't loading modules etc. etc. impose extra overhead over having it simple compiled into the kernel?
 
Old 06-25-2001, 12:17 PM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
There is an overhead to loading a module but if you're looking to save memory then its probably worth it, although the amount you'll save won't be amazing compared to the available memory in a modern system.

As for smaller being faster I'm not sure - someone said this a little while ago (can't remember who) on the forum and I asked them to justify this (becuase I'm curious not because I'm trying to catch them out!) but don't think I got a response. I don't see why a kernel with code in it that isn't used would be slower than a kernel that doesn't have the code there - the only advantage I can see is really clear is the memory saving. Any justification DavidPhillips?

I tend to just chuck the things I deem as non-essential in as modules and let them autoload... Saying this if you miss something like floppy support I've had problems in the past where I've lost access to the partition holding my modules and then needed to gain access to the floppy disk for something to do with the repair, but couldn't as the module wasn't there

cheers.

Jamie...
 
Old 06-25-2001, 02:01 PM   #5
GonzoJohn
Member
 
Registered: Jun 2001
Location: Louisville, KY USA
Distribution: RedHat and Debian
Posts: 89

Rep: Reputation: 15
To answer your question with another question:

How big was the compiled kernel you installed?

If it's over 1 MB, you can do a lot better.
 
Old 06-25-2001, 02:37 PM   #6
vinaypai
LQ Newbie
 
Registered: Jun 2001
Location: Bombay, India
Distribution: Redhat 7.0
Posts: 16

Original Poster
Rep: Reputation: 0
~ 950 KB bzImage

Inclusive of every driver I want.
 
Old 06-26-2001, 12:04 AM   #7
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Saw your post Jamie

They did reply later in same thread, Quoted Redhat Service or something like that, it said it's faster© I would think they should know, but I am still pretty new to linux© You have a point©

I did see it in the Linux Bible that it was faster©

Maybe it is just for boot, since the modules are always loaded if you only build in the ones you use anyway©



I have a fast computer now with lots of ram and it probably does not matter much©
 
Old 06-26-2001, 03:06 AM   #8
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Re: Saw your post Jamie

Quote:
Originally posted by DavidPhillips
They did reply later in same thread, Quoted Redhat Service or something like that, it said it's faster© I would think they should know, but I am still pretty new to linux© You have a point©

I did see it in the Linux Bible that it was faster©

Maybe it is just for boot, since the modules are always loaded if you only build in the ones you use anyway©
Thanks for the input, I might have a hunt around the web later and see if I can turn up anything specific. Hadn't really considered the boot time but yeah, a smaller kernel would uncompress and load faster so thats one point where is makes sense.

cheers.

Jamie...
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compilation issues aunquarra Linux - Newbie 1 11-19-2005 03:32 PM
Kernel Compilation issues Dr Croubie Linux - General 3 06-09-2005 05:40 AM
linux compilation issues.. nkshirsagar Linux - General 0 12-07-2004 12:18 AM
Myth TV compilation issues (again! yay!) ikataii Linux - Software 2 10-28-2004 03:23 AM
MusEScore 0.1pre2 compilation issues stev160 Linux - Software 0 07-15-2004 09:59 AM


All times are GMT -5. The time now is 07:09 PM.

Main Menu
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