Adam Turoff on Thu, 27 Feb 2003 12:14:08 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] how kernel compiling works


On Thu, Feb 27, 2003 at 10:37:48AM -0800, Wayne Dawson wrote:
> Jesus F. Christ!  There *has* to be a better way!!!  I just sat here for a 
> GD hour answering all those f***ing prompts to recompile the kernel.

There are better ways to compile a Linux kernel (make xconfig/
make menuconfig).  Then there are other approaches:
  - wait for your vendor to come out with a new OS update (Apple, Sun, MS)
  - choose a system with a different kernel build interface (*BSD)

I'm surprised that after 10 years no one has done a BSD-ish kernel 
configuration system for Linux.  [Free]BSD Kernel configs are simple text
files that are run through the config program to generate a skeleton
structure of headers and Makefiles.  From there, compiling a new kernel
is as simple as 'make && make install':

	cd /usr/src/sys/i386/conf
	cp GENERIC MYKERNEL       [copy the generic kernel the 1st time out]
	vi MYKERNEL               [edit the kernel options]
	config MYKERNEL
	cd ../../compile/MYKERNEL
	make && make install

There are a few details hiding under the covers there.  *BSD kernels
aren't as feverishly developed as the Linux kernel; that means
there are probably fewer options to configure, and less supported
hardware/optional features (journaling filesystems, choice of
schedulers, etc.).  Also, the config options aren't very well documented
in some cases.  There's also no way to 'lint' a set of kernel options; 
you can come up with an uncompilable kernel state, so when 'make' fails,
revise your kernel configuration, reconfigure and rebuild.

Oh, and while the kernel config options aren't very heavily
documented, the GENERIC and LINT kernel configs are *very* heavily
commented.  The comments point out required dependencies and most
of the blunders that you want to avoid.

Z.

_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug