View Single Post

   
  #8 (permalink)  
Old 02-19-2008, 02:55 PM
Floyd L. Davidson
 
Posts: n/a
Default Re: GCC Compiler questions

Dave <davido@snet111nospam111.net> wrote:
> I have the tar and config file already made.


Exactly. In fact, if you have a high speed Internet connection
available, there is no real need to even keep the tar file of
your kernel sources around either, since you can download a new
one any time you want. And usually every time you start some
new project like this there will be a more recent kernel anyway.

And if you have gone to the trouble of learning how to
configure and compile a new kernel, *do* get the latest release
of whichever version you are using. You may or may not want to
try switching from 2.4 to 2.6, though I would highly recommend
it, but there is no point in recompiling an old release of
either 2.4 or 2.6. Get the latest one for whatever you use.
(That is *not* a generally true condition though! It just
happens right now that the 2.4 kernel is very mature, and the
latest release is almost guaranteed to be stable enough. With
the 2.6 kernel, unlike what happened when 2.2 and 2.4 came out,
it has been basically stable from the start and it's more a
matter of whether any given release has the features implemented
that you need. For a laptop, I doubt that anything is missing
in the latest releases.)

Also, I don't recall that you mentioned which kernel you are
using, but the 2.6 kernels can be configured to put a config.gz
pseudo file into /proc. Using that configuration certainly
makes it easy to keep track of which config file is which!

>So if I understand you
>correctly; then I could essentially use make mrproper and then edit my
>lilo config file to allow me to boot into the new image?


There is essentially *never* any reason for most people to do a
"make mrproper". It returns the kernel directory to the
condition it was in the distribution archive. Unless you are a
kernel developer, and have made changes to the source code which
need to be archived, that is a worthless condition.

If you change the kernel configuration and want to recompile, do
a "make clean", which will delete all of the *.o files and
whatever else is built using a specific configuration. Then you
do something like "make bzlilo" or "make bzimage", followed by
making and installing the modules. (But in regard to your
original query, no space is likely to be saved in doing this.
Virtually all of the files deleted are recreated one at a time,
and at the end you have exactly what you started with.)

>Im not really trying to get rid of my existing kernel I would just like
>to test out my custom kernels with a known good backup. Actually since
>i havent added anything to my existing cofiguration but only removed
>modules; is there a way to use the existing modules made during my
>initial install?


Actually, if you didn't change the configuration other than to
specify that some modules need not be built, you don't have to
do *anything* with the kernel! Just go to /lib/modules and
delete the particular modules. They won't be loaded. Or better
yet, you can leave them there (we aren't talking any really
significant amount of disk space), and comment out anything in
the /etc/rc.d scripts that causes them to be loaded.

And yes, as long as you are using the same kernel version the
modules need not be recompiled unless there has been some update
that you wish to install.

Most distributions, and Slackware is no exception, come with as
many modules as possible just so that a user who does not want
to _ever_ compile a kernel can just load a module to get added
kernel features. That is the whole point of having kernel
features in loadable modules!

--
FloydL. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@barrow.com
Reply With Quote