Kernel compiling questions?

Hello to all,

I have successfully compiled a new kernel and modules, Installed and running! My question is:

After a successful compile, can I modify options in “make config” to not include things I do not need? Will everything need to be recompiled or will it use the current output files from the previous compile, without doing a “make mrpropper”?

I ask because it took my old machine about 13 hours to compile the kernel, I am assuming I would need to recompile everything ONLY if I alter the CPU options like “subarchitecture type” or “processor family”??? As long as I don’t alter those two settings can I keep most the output from my previous compile, so it don’t take so long???

Thanks for the replies in advance!
Jorge

No. As a general rule: if you change config, you rebuild from scratch.

Here’s why. Most options like that are set by conditionals in the code. When you say “yes” and “no” during config, the makefile is altered to define, undefine or change the value on commands that are passed to the compiler during the build.

If you’re curious, open some of the source files and you’ll doubtless run across things like,


#IFDEF MY_MACHINE_IS_FAST
/* ... this stuff gets compiled ... */
#ELSE
/* ... this stuff gets compiled instead ... */
#ENDIF

#IFDEF” stands for “if defined,” and tells the compiler, “if this option is set, build it this way; otherwise (the ‘#ELSE’), do it the other way.”

How are you (or more to the point, ‘make’) going to know precisely which files are affected by your new options? Ergo, you should do a “make clean” and start over from scratch. Better fetch another cup of coffee and a magazine!!! :wink:

In my experience it won’t recompile everything, only those things related to the changes you made. But sometimes those changes will have dependencies that cause many more files to be recompiled via various C preprocessor macros. In any case, it shouldn’t take 13 hrs the second time.

Also instead of using “make config”, it is better to use “make xconfig” if you are using KDE. You will need to install the qt3-devel package. If using Gnome, you can use “make gconfig”.

I use “make menuconfig” which requires ncurses to be installed!

My machine is an old Gateway 667c, which runs at about 663mhz, it’s not really to efficient with KDE and Gnome, so I use either just X, icewm, or wmaker! It’s only got 150mb of memory so I try to avoid using x as much as possible. I have my main swap on a second drive to speed up disk access too. My main choice for an Editor is “Joe” and my preferred File Manager is “MC”!

I only intend on using it as a closet server running Apache and sendmail, maybe SSH and FTP so I can access it without a monitor/keyboard. That’s why I want as much speed out of the box as possible. I might try to run an old style BBS system, but don’t know what software is available for it nowadays!

When I first compiled, I just used the default answers for everything, that’s why it took so long! Now I am modifying it with only the hardware I have! So it shouldn’t take too long to compile now, provided I don’t make any mistakes. I am going to upgrade my main Windows XP system to Linux and say good bye to Windows altogether! I’ve been using SuSE since version 5.3, and linux since the early to mid 90’s! Before that I was using “OS9-Level II” on the old TRS-80 Color Computer 3 (6809E), which was/is very similar to linux, since 87.