Configure From Scratch
There are two nice graphical configuration utilities: menuconfig, and xconfig. menuconfig is ncurses-based, so you don’t need X. xconfig in 2.6 requires Qt and X. Let’s use xconfig, because it is sleek and fast, and completely redesigned for 2.6:
$ make xconfig
This will putter and mutter for a bit, then spit out a menu. Have your printouts handy because now you have to select the right drivers for your hardware, decide what features your kernel will have, and whether to load drivers as modules, or build them into the kernel. menuconfig and xconfig generate loads of information — read all of it. Many things will be selected by default. The worst thing that can happen by saying “yes” too many times is you’ll enable features that won’t be used. This is not a bad thing. In contrast, if you leave something out that you need, you may need to rebuild the kernel. Here are few things which should be built into the kernel:
- module support
- a.out binaries, ELF binaries, and MISC binaries
- VGA text console
- All filesystems you’ll be using, such as ext2/3, ReiserFS, JFS, XFS, loopback, vfat, NTFS, udf, etc.
These depend on your hardware; whatever you select should be built into the kernel, not a loadable module:
- IDE, ATA, and ATAPI Block Devices
- SCSI support (note that the 2.6 kernel does not need IDE-SCSI, so if you have no SCSI devices, you can omit this)
- USB support
- Any on-board controllers
- Sound support
These are OK to have as loadable modules:
- NIC drivers
- Netfilter/iptables
- USB drivers
- sound card drivers
There are help files on almost every item.
Building The Kernel And Modules
Once you’ve finished and saved your configuration, 2.6 builds the kernel and modules all in one step:
$ make
On a slow system, this will take awhile. Go take a nice walk. Then come back and gaze upon your new kernel image, it should be ~/src/arch/i386/boot/bzImage (or whatever your architecture is).
You can have several versions of gcc installed, and select the one you want to use this way:
$ make CC=gcc-2.95
To view a whole raft of “make” targets, run make help first. When it’s done, modules must be installed by the superuser:
# make modules_install
You will find your shiny new modules in /lib/modules/2.6.3.
This article was originally published on CrossNodes.