Reasons to recompile your Linux kernel
1.You’ve bought some new hardware and want support for it in Linux.
2.You want to access features of Linux that have been turned off.
3.Something is fishy in your operating system.
4.You want to show off to all your friends and brag about how you are a (false) Linux guru.
5.You have nothing better to do.
6.You really want to.
Compiling the Linux kernel isn’t all that difficult really, but it is admittedly time consuming.
I will divide this tutorial into three parts:
1. Pre-configuration
2. Configuration
3. Post-Configuration
I have used kernel version 2.6.12. This tutorial is specific to 2.6.12 though other kernels in 2.6.x are probably similar. Download the latest version of the Linux kernel from www.kernel.org
I have tried this on two Linux distros :
1. A 32 bit PCQ Linux 2004 (Fedora core based)
2. FC3 – 64 bit. Sadly I was unsuccessful here as I will later explain.
Target Audience:
I have also assumed that the computer in question is a (possibly) dual boot home PC. This document is not really suitable for advanced users. Laptop users should also avoid messing around with their kernel too much – previous versions (2.4.x) have been known to irreparably damage laptops when not configured properly.
The configuration process depends a lot on the hardware you are using.
My setup is:
AMD 64 3200+
512 MB DDR 400 RAM
Nvidia nforce3 150 based motherboard.
Onboard sound Realtek ALC 658 (which, unfortunately is not easily configured in Linux)
ATI Radeon 9600 pro.
Silicon Image 3512A (SATALink)
(Some of you may have seen my previous guide over here. This one, I hope, is more accurate and comprehensive.)
Pre-Configuration
1. Visit www.kernel.org and download the latest stable kernel (at the time of writing it was 2.6.12).
2. Copy the downloaded kernel to /home/USERNAME
3. Uncompress the kernel
4. bunzip2 linux-2.6.12.tar.bz2 if you have the bzipped format
5. gunzip linux-2.6.12.tar.gz if you have downloaded the gzipped format
6. tar –xvf linux-2.6.12.tar
7. Change to the linux directory: cd linux-2.6.12
8. Make mrproper to remove any old configuration files or object files.
i. make mrproper
9. If you want to use an older configuration file then copy it over to .config. If you want a reference configuration file then you can use the config file in the appropriate subdirectory of ~/linux-2.6.12/arch. Actually, if you do nothing, the reference config file is read from the appropriate arch directory.
10. Issue one of four commands
make oldconfig (asks you to add new options as yes/no/module –not recommended)
make menuconfig (uses a terminal not unlike your bios screen)
make xconfig (uses GUI)
make config (first edit .config then run this command – very advanced users only)
Personally I go with make menuconfig. It simple in its design and easy to understand considering that there are well over a thousand options distributed under various subheadings.
If you run a system with KDE running, use make xconfig (issue it from xterm or any other terminal emulator, not the console). It looks quite attractive.
You may run in to problems with this in some cases, try make gconfig for GNOME based GUIs.
Post Configuration
In interests of not scaring the hell out of you, I will tell you the post-configuration section first. Firstly, check the dependencies (whether you have all the tools you need). Information on that can be found in ./Documents/changes.txt file. If you have a distro running any 2.6.x kernel it should be fine.
1. After running one of the make *config methods and saving the .config file you have to make the kernel (actual compilation process).
2. The command is: make.
3. Beware - the above command can take a little while. On my computer it took 6 or 7 minutes (on the 64 bit distro) and 18 minutes on the 32 bit PCQ Linux (there is some sort of bug in that, INIT keeps on restarting itself). It may take longer on slower computers. Don’t worry if it throws up warning messages. These are to do with the Linux source code and there is nothing you can do about them (unless, say, you are a Linux kernel developer).
4. change to root: su
5. Copy the image to /boot directory: cp /home/USERNAME/linux-2.6.12/arch/i386/boot/bzImage /boot/vmlinuz-2.6.12
6. If you are compiling on some architecture other than i386 (e.g. x86_64), replace the i386 above with the appropriate architecture.
7. Install the modules by issuing the command: make modules_install .
8. Copy the system map to /boot directory by issuing the command: cp /home/USERNAME/linux-2.6.12/System.map /boot/System.map-2.6.12
(NOTE: needed only for 3rd party boot managers)
9. Change to the /boot/grub directory : cd /boot/grub
10. Edit grub.conf and include the following lines:
title KingKrool’s Linux kernel 2.6.12
root (hdx, y)
kernel /boot/vmlinuz-2.6.12 ro root=/dev/hdpn
The first line is the title to appear in the Grub screen.
The second line gives the drive on which grub is installed. x and y must be replaced with the appropriate values. Eg. For the second logical drive on the first physical drive x = 0, y = 1. This is not fixed though. The best way would be to boot into Linux (using the old kernel) and use the hardware browser (in System tools of RH /FC distros). Depending on your installation there will be two or three linux partitions. If there are three the smallest will be the boot partition, the largest partition is root and third is swap. If there are two then the larger one is boot+root and second is swap.
If the label given is /dev/hdb3 then x = 1, y = 2.
The third line gives the kernel location. If you have a dedicated boot partition then /boot is not necessary in the path, otherwise the full path is required (i.e. all paths are relative to /boot). In root=dev/hdpn p and n are from above.
If the drive was listed as /dev/hda8 then p = a n = 8 (copy as is).
The simplest way to configure the kernel is to copy the existing code for any Linux kernel and just make a few modifications to the kernel image path.
If you have compiled support for the filesystem of the root partition as a module then you will have to add the following line at the end (4th line)
initrd (/boot)/initrd-2.6.12.img
(/boot) is used only if boot and root partitions are the same.
The file intrd-2.6.12.img has to be made by issuing the command
/sbin/mkinitrd /boot/intird-2.6.12.img `kernel version` where `kernel version` is 2.6.12 to which you append the string (if any) entered in local version.
Even if you have not compiled the FS as a module, it is still recommended to create an initrd – it is needed on several distributions, and will be necessary in the future due to the deprecation of devfs in the kernel (just take my word for it).
Save the file and exit. Reboot your computer and you are ready to use the new kernel!
Remember to leave the old kernel entries intact, that way if you have problems, you can always go back to the old kernel.
CONFIGURATION
NOTES:
Kernel modules are small pieces of compiled code which can be inserted in the running kernel, rather than being permanently built into the kernel. You use the "modprobe" tool to add (and sometimes remove) them.
Only some options can be compiled as modules. In menuconfig, they are marked < >. Press M to compile as a module. In xconfig, click multiple times. A tick means compiled in, a dot means module.
The [….] (eg. [EXPERIMENTAL]) refers to the option name as seen in the .config file. It will be prefaced by CONFIG_ (eg. CONFIG_EXPERIMENTAL=y). Just a little bit of trivia.
Code Maturity Level Options
Prompt for development and/or incomplete code/drivers
[EXPERIMENTAL]
Purpose: You have the option of using experimental (alpha-test) drivers and obsolete drivers.
Suggestion – exclude. However, if you are sure of what you are doing you can include it. This is only for developers or people who have an excellent idea of their hardware configuration. NOTE: you might need to enable this for SATA as explained at the end of the configuration section.
Select only drivers expected to compile cleanly
[CLEAN_COMPILE]
Purpose: If the previous option was selected, then this one appears. Select this
option when you do not even want to see the option to configure known broken drivers.
Suggestion – this option should not even show up, as, in general, the previous option should not have been included.
General setup
Local version - append to kernel release
Purpose: Append an extra string to the end of your kernel version.
This will show up when you type uname.
Select this and type in a string (up to 64 characters)
Suggestion – If you want to customize your OS, including this will really earn you geek points with your techie friends.
Support for paging of anonymous memory
[SWAP]
Purpose: Allows the kernel to have more virtual memory than RAM using swap files or swap devices.
Suggestion – Definitely build this in. If you have loads of RAM you might avoid this, but it is in general a bad idea to try to exist without a swap file. Exclude it on embedded systems, or real time systems only.
System V IPC
[SYSVIPC]
Purpose: This is a feature from the Unix background that Linux has come from. Required for many programs.
Suggestion – build in. There are many common programs that require IPC (inter process communication) provided by this feature.
BSD Process Accounting
[BSD_PROCESS_ACCT]
Purpose: Allows user level programs to specify that process accounting information be stored.
Suggestion – build in.
BSD Process Accounting version 3 file format
[BSD_PROCESS_ACCT_V3]
Purpose: This one show up only if you included the previous option.
Suggestion – leave it out for now.
Sysctl support
[SYSCTL]
Purpose: Allows modification of certain kernel parameters on the fly.
Suggestion – build in. In case of rescue disks it can be left out.
Auditing support
[AUDIT]
Purpose: Required by various kernel subsystems such as SELinux.
Suggestion – build in. It probably won't hurt.
Enable system-call auditing support
[AUDITSYSCALL]
Purpose: Enable low-overhead system-call auditing infrastructure. (appears only if previous option was selected)
Suggestion – might as well build this one in too.
Kernel Userspace Events
[KOBJECT_UEVENT]
Purpose: enables the kernel userspace event layer.
Suggestion – build in.
Kernel .config support
[IKCONFIG]
Purpose: This option enables the complete Linux kernel ".config" file
contents to be saved in the kernel. This information can be extracted from the kernel image file with the script scripts/extract-ikconfig It can also be extracted from a running kernel by reading /proc/config.gz if enabled.
Suggestion – built in. Makes it easier to compile your kernel the next time as you can just load the previous .config and select the changes.
Enable access to .config through /proc/config.gz
[IKCONFIG_PROC]
Purpose: This option enables access to the kernel configuration file through
/proc/config.gz.
Suggestion – build in.
Configure standard kernel features (for small systems)
[EMBEDDED]
Purpose: This is for non standard kernels.
Suggestion – leave it out.
Loadable Module Support
Enable loadable module support
[MODULES]
Purpose: Allows you to build a modular kernel. If you don't want to use modular kernels exclude it. Generally it is a good idea to keep it as you can then build a smaller (and faster) kernel this way.
Suggestion – build in.
Module Unloading
[MODULE_UNLOAD]
Purpose: Enables module unloading facility. All modules may not be able to make use of this feature (though that will not cause any errors).
Suggestion – build in.
Source checksum for all modules
[MODULE_SRCVERSION_ALL]
Purpose: Used by module developers.
Suggestion – leave it out.
Automatic Kernel Module Loading
[KMOD]
Purpose: Allows certain parts of the kernel to automatically load kernel modules using modprobe. It’s probably a good idea to include this unless you are sure of what you are doing.
Suggestion – build in.
Processor type and features
Subarchitecture type – Select PC Compatible (unless you are running non x86 systems)
Processor Family – Your processor should be automatically detected, but do scroll down the list to make sure that it has been selected correctly. Previously AMD64 was detected as K7 rather than K8 (in 2.6.6). Make sure that you choose the correct case (you can safely choose a lower level but never select a configuration higher than your own). Failure to make a proper choice can lead at best to a loss of features and at worst a kernel that fails spectacularly.
Generic x86 support
[X86_GENERIC]
Purpose: Includes Optimizations for processors other than the one selected.
This is required only if you wish to distribute the kernel you have compiled to machines of another architecture.
Suggestion – exclude.
HPET timer support
[HPET_TIMER]
Purpose: Uses the new HPET timer for the kernel's internal timing rather than the venerable 8254 (Anyone who has done a microprocessor techniques course will tell you that the 8254 was made way back in the late 70s and is still in use). It is safe to include this feature as it is only enabled if the platform supports it.
Suggestion – build in.
Provide RTC interrupt
[HPET_EMULATE_RTC]
Purpose: Related to the previous option but there is no documentation on the feature.
Suggestion – leave it out, I guess. It appears to have to do with emulating the real time clock (provided by/using?) the HPET (I infer this from the name).
Symmetric multi-processing support
[SMP]
Purpose: This enables support for systems with more than one CPU (symmetric multiprocessor systems).
Suggestion – if you have more than one processor in your system include this.
This is required to use the hyper-threading feature on processors that support the feature.
Preemptible Kernel
[PREEMPT]
Purpose: Allows low priority processes to be preempted even while in kernel mode (For further explanation read up about the linux process management from a good book).
Suggestion – built in for desktop systems, RTS or embedded.
Preempt The Big Kernel Lock
[PREEMPT_BKL]
Purpose: This option reduces the latency of the kernel by making the
big kernel lock preemptible (what does that mean?). This arises from the previous option.
Suggestion – build in.
Local APIC support on uniprocessors
[X86_UP_APIC]
Purpose: Allows uniprocessors with a local APIC to use this APIC. It can be safely enabled with no slowdown even if it is not present (some of you may have seen an option in the bios dealing with this).
Suggestion – build in.
IO-APIC support
[X86_UP_IOAPIC]
Purpose: this option appears only if you have selected the last one.
Suggestion – Similar to the last option and can be built in. If you have an SMP, it is likely that you will require this.
Machine Check Exception
[X86_MCE]
Purpose: Returns errors to the kernel if the processor detects an error (overheating etc)
Suggestion – built in is a safe option for everyone except Pentium users. Some older Pentiums (Pentium 1s) have a design flaw and report false MCE events. So Pentium users should be cautious while enabling this option. 386s and 486s do not have this feature, so in such cases this option can be excluded (it is still safe to enable it though).
Check for non-fatal errors on AMD Athlon/Duron Intel Pentium 4
[X86_MCE_NONFATAL]
Purpose: Similar to above, but returns errors specific to these processors.
Suggestion – module.
Check for P4 thermal throttling interrupt
[X86_MCE_P4THERMAL]
Purpose: Prints a message whenever the P4 enters thermal throttling.
Suggestion – user's choice.
Toshiba Laptop Support
[TOSHIBA]
Purpose: Useful only on Toshiba Laptops having a Toshiba bios.
Suggestion – exclude unless your system satisfies the above criterion.
Dell Laptop Support
[I8K]
Purpose: Useful only on the Dell Inspiron 8000.
Suggestion – exclude unless your system satisfies the above criterion.
Enable X86 board specific fixups for reboot (X86_REBOOTFIXUPS)
Purpose: This enables chipset and/or board specific fixups to be done
in order to get reboot to work correctly.
Suggestion - Currently, the only fixup is for the Geode GX1/CS5530A/TROM2.1. Combination. Others should exclude.
/dev/cpu/microcode – IA32 CPU microcode support.
[MICROCODE]
Purpose: If you say Y here and also to "/dev file system support" in the
'File systems' section, you will be able to update the microcode on
Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II,
Pentium III, Pentium 4, Xeon etc.
Suggestion – exclude. I have never heard of anyone ever using this.
/dev/cpu/*/msr – Model specific register support
[X86_MSR]
Purpose: Enables privileged processes access to MSRs.
Suggestion – module.
/dev/cpu/*/cpuid – CPU information support
[X86_CPUID]
Purpose: Access to the x86 CPUID instruction.
Suggestion – module.
High memory support
[NOHIGHMEM / HIGHMEM4G / HIGHMEM64G]
Suggestion – If you have not more than 1GB RAM then say “offâ€.
1- 4 GB then select 4GB
Up to 64 GB then select 64 GB. (Only on systems supporting PAE!)
Allocate 3rd level page tables from high memory.
[HIGHPTE]
Purpose: Setting this option will put user space page tables in high memory.
This avoids the waste of low memory space in systems having large amount of RAM.
Suggestion – build in. This option appears only if you have selected the previous option.
Math Emulation
[MATH_EMULATION]
Purpose: Emulates a math coprocessor on systems which do not have one.
Suggestion – exclude, unless you are running a 386 or 486SX without a coprocessor (unlikely).
MTRR support
[MTRR]
Purpose: Memory Type Range Registers may be used to control access to AGP and PCI buses. Improves performance of video cards.
Suggestion – build in.
Boot from EFI support
[EFI]
Purpose: This option has a meaning only on IA64 systems.
Suggestion – exclude.
Enable seccomp to safely compute untrusted bytecode
[SECCOMP]
Purpose: This kernel feature is useful for number crunching applications
that may need to compute untrusted bytecode during their
execution.
Suggestion – build in.
1.You’ve bought some new hardware and want support for it in Linux.
2.You want to access features of Linux that have been turned off.
3.Something is fishy in your operating system.
4.You want to show off to all your friends and brag about how you are a (false) Linux guru.
5.You have nothing better to do.
6.You really want to.
Compiling the Linux kernel isn’t all that difficult really, but it is admittedly time consuming.
I will divide this tutorial into three parts:
1. Pre-configuration
2. Configuration
3. Post-Configuration
I have used kernel version 2.6.12. This tutorial is specific to 2.6.12 though other kernels in 2.6.x are probably similar. Download the latest version of the Linux kernel from www.kernel.org
I have tried this on two Linux distros :
1. A 32 bit PCQ Linux 2004 (Fedora core based)
2. FC3 – 64 bit. Sadly I was unsuccessful here as I will later explain.
Target Audience:
I have also assumed that the computer in question is a (possibly) dual boot home PC. This document is not really suitable for advanced users. Laptop users should also avoid messing around with their kernel too much – previous versions (2.4.x) have been known to irreparably damage laptops when not configured properly.
The configuration process depends a lot on the hardware you are using.
My setup is:
AMD 64 3200+
512 MB DDR 400 RAM
Nvidia nforce3 150 based motherboard.
Onboard sound Realtek ALC 658 (which, unfortunately is not easily configured in Linux)
ATI Radeon 9600 pro.
Silicon Image 3512A (SATALink)
(Some of you may have seen my previous guide over here. This one, I hope, is more accurate and comprehensive.)
Pre-Configuration
1. Visit www.kernel.org and download the latest stable kernel (at the time of writing it was 2.6.12).
2. Copy the downloaded kernel to /home/USERNAME
3. Uncompress the kernel
4. bunzip2 linux-2.6.12.tar.bz2 if you have the bzipped format
5. gunzip linux-2.6.12.tar.gz if you have downloaded the gzipped format
6. tar –xvf linux-2.6.12.tar
7. Change to the linux directory: cd linux-2.6.12
8. Make mrproper to remove any old configuration files or object files.
i. make mrproper
9. If you want to use an older configuration file then copy it over to .config. If you want a reference configuration file then you can use the config file in the appropriate subdirectory of ~/linux-2.6.12/arch. Actually, if you do nothing, the reference config file is read from the appropriate arch directory.
10. Issue one of four commands
make oldconfig (asks you to add new options as yes/no/module –not recommended)
make menuconfig (uses a terminal not unlike your bios screen)
make xconfig (uses GUI)
make config (first edit .config then run this command – very advanced users only)
Personally I go with make menuconfig. It simple in its design and easy to understand considering that there are well over a thousand options distributed under various subheadings.
If you run a system with KDE running, use make xconfig (issue it from xterm or any other terminal emulator, not the console). It looks quite attractive.
You may run in to problems with this in some cases, try make gconfig for GNOME based GUIs.
Post Configuration
In interests of not scaring the hell out of you, I will tell you the post-configuration section first. Firstly, check the dependencies (whether you have all the tools you need). Information on that can be found in ./Documents/changes.txt file. If you have a distro running any 2.6.x kernel it should be fine.
1. After running one of the make *config methods and saving the .config file you have to make the kernel (actual compilation process).
2. The command is: make.
3. Beware - the above command can take a little while. On my computer it took 6 or 7 minutes (on the 64 bit distro) and 18 minutes on the 32 bit PCQ Linux (there is some sort of bug in that, INIT keeps on restarting itself). It may take longer on slower computers. Don’t worry if it throws up warning messages. These are to do with the Linux source code and there is nothing you can do about them (unless, say, you are a Linux kernel developer).
4. change to root: su
5. Copy the image to /boot directory: cp /home/USERNAME/linux-2.6.12/arch/i386/boot/bzImage /boot/vmlinuz-2.6.12
6. If you are compiling on some architecture other than i386 (e.g. x86_64), replace the i386 above with the appropriate architecture.
7. Install the modules by issuing the command: make modules_install .
8. Copy the system map to /boot directory by issuing the command: cp /home/USERNAME/linux-2.6.12/System.map /boot/System.map-2.6.12
(NOTE: needed only for 3rd party boot managers)
9. Change to the /boot/grub directory : cd /boot/grub
10. Edit grub.conf and include the following lines:
title KingKrool’s Linux kernel 2.6.12
root (hdx, y)
kernel /boot/vmlinuz-2.6.12 ro root=/dev/hdpn
The first line is the title to appear in the Grub screen.
The second line gives the drive on which grub is installed. x and y must be replaced with the appropriate values. Eg. For the second logical drive on the first physical drive x = 0, y = 1. This is not fixed though. The best way would be to boot into Linux (using the old kernel) and use the hardware browser (in System tools of RH /FC distros). Depending on your installation there will be two or three linux partitions. If there are three the smallest will be the boot partition, the largest partition is root and third is swap. If there are two then the larger one is boot+root and second is swap.
If the label given is /dev/hdb3 then x = 1, y = 2.
The third line gives the kernel location. If you have a dedicated boot partition then /boot is not necessary in the path, otherwise the full path is required (i.e. all paths are relative to /boot). In root=dev/hdpn p and n are from above.
If the drive was listed as /dev/hda8 then p = a n = 8 (copy as is).
The simplest way to configure the kernel is to copy the existing code for any Linux kernel and just make a few modifications to the kernel image path.
If you have compiled support for the filesystem of the root partition as a module then you will have to add the following line at the end (4th line)
initrd (/boot)/initrd-2.6.12.img
(/boot) is used only if boot and root partitions are the same.
The file intrd-2.6.12.img has to be made by issuing the command
/sbin/mkinitrd /boot/intird-2.6.12.img `kernel version` where `kernel version` is 2.6.12 to which you append the string (if any) entered in local version.
Even if you have not compiled the FS as a module, it is still recommended to create an initrd – it is needed on several distributions, and will be necessary in the future due to the deprecation of devfs in the kernel (just take my word for it).
Save the file and exit. Reboot your computer and you are ready to use the new kernel!
Remember to leave the old kernel entries intact, that way if you have problems, you can always go back to the old kernel.
CONFIGURATION
NOTES:
Kernel modules are small pieces of compiled code which can be inserted in the running kernel, rather than being permanently built into the kernel. You use the "modprobe" tool to add (and sometimes remove) them.
Only some options can be compiled as modules. In menuconfig, they are marked < >. Press M to compile as a module. In xconfig, click multiple times. A tick means compiled in, a dot means module.
The [….] (eg. [EXPERIMENTAL]) refers to the option name as seen in the .config file. It will be prefaced by CONFIG_ (eg. CONFIG_EXPERIMENTAL=y). Just a little bit of trivia.
Code Maturity Level Options
Prompt for development and/or incomplete code/drivers
[EXPERIMENTAL]
Purpose: You have the option of using experimental (alpha-test) drivers and obsolete drivers.
Suggestion – exclude. However, if you are sure of what you are doing you can include it. This is only for developers or people who have an excellent idea of their hardware configuration. NOTE: you might need to enable this for SATA as explained at the end of the configuration section.
Select only drivers expected to compile cleanly
[CLEAN_COMPILE]
Purpose: If the previous option was selected, then this one appears. Select this
option when you do not even want to see the option to configure known broken drivers.
Suggestion – this option should not even show up, as, in general, the previous option should not have been included.
General setup
Local version - append to kernel release
Purpose: Append an extra string to the end of your kernel version.
This will show up when you type uname.
Select this and type in a string (up to 64 characters)
Suggestion – If you want to customize your OS, including this will really earn you geek points with your techie friends.
Support for paging of anonymous memory
[SWAP]
Purpose: Allows the kernel to have more virtual memory than RAM using swap files or swap devices.
Suggestion – Definitely build this in. If you have loads of RAM you might avoid this, but it is in general a bad idea to try to exist without a swap file. Exclude it on embedded systems, or real time systems only.
System V IPC
[SYSVIPC]
Purpose: This is a feature from the Unix background that Linux has come from. Required for many programs.
Suggestion – build in. There are many common programs that require IPC (inter process communication) provided by this feature.
BSD Process Accounting
[BSD_PROCESS_ACCT]
Purpose: Allows user level programs to specify that process accounting information be stored.
Suggestion – build in.
BSD Process Accounting version 3 file format
[BSD_PROCESS_ACCT_V3]
Purpose: This one show up only if you included the previous option.
Suggestion – leave it out for now.
Sysctl support
[SYSCTL]
Purpose: Allows modification of certain kernel parameters on the fly.
Suggestion – build in. In case of rescue disks it can be left out.
Auditing support
[AUDIT]
Purpose: Required by various kernel subsystems such as SELinux.
Suggestion – build in. It probably won't hurt.
Enable system-call auditing support
[AUDITSYSCALL]
Purpose: Enable low-overhead system-call auditing infrastructure. (appears only if previous option was selected)
Suggestion – might as well build this one in too.
Kernel Userspace Events
[KOBJECT_UEVENT]
Purpose: enables the kernel userspace event layer.
Suggestion – build in.
Kernel .config support
[IKCONFIG]
Purpose: This option enables the complete Linux kernel ".config" file
contents to be saved in the kernel. This information can be extracted from the kernel image file with the script scripts/extract-ikconfig It can also be extracted from a running kernel by reading /proc/config.gz if enabled.
Suggestion – built in. Makes it easier to compile your kernel the next time as you can just load the previous .config and select the changes.
Enable access to .config through /proc/config.gz
[IKCONFIG_PROC]
Purpose: This option enables access to the kernel configuration file through
/proc/config.gz.
Suggestion – build in.
Configure standard kernel features (for small systems)
[EMBEDDED]
Purpose: This is for non standard kernels.
Suggestion – leave it out.
Loadable Module Support
Enable loadable module support
[MODULES]
Purpose: Allows you to build a modular kernel. If you don't want to use modular kernels exclude it. Generally it is a good idea to keep it as you can then build a smaller (and faster) kernel this way.
Suggestion – build in.
Module Unloading
[MODULE_UNLOAD]
Purpose: Enables module unloading facility. All modules may not be able to make use of this feature (though that will not cause any errors).
Suggestion – build in.
Source checksum for all modules
[MODULE_SRCVERSION_ALL]
Purpose: Used by module developers.
Suggestion – leave it out.
Automatic Kernel Module Loading
[KMOD]
Purpose: Allows certain parts of the kernel to automatically load kernel modules using modprobe. It’s probably a good idea to include this unless you are sure of what you are doing.
Suggestion – build in.
Processor type and features
Subarchitecture type – Select PC Compatible (unless you are running non x86 systems)
Processor Family – Your processor should be automatically detected, but do scroll down the list to make sure that it has been selected correctly. Previously AMD64 was detected as K7 rather than K8 (in 2.6.6). Make sure that you choose the correct case (you can safely choose a lower level but never select a configuration higher than your own). Failure to make a proper choice can lead at best to a loss of features and at worst a kernel that fails spectacularly.
Generic x86 support
[X86_GENERIC]
Purpose: Includes Optimizations for processors other than the one selected.
This is required only if you wish to distribute the kernel you have compiled to machines of another architecture.
Suggestion – exclude.
HPET timer support
[HPET_TIMER]
Purpose: Uses the new HPET timer for the kernel's internal timing rather than the venerable 8254 (Anyone who has done a microprocessor techniques course will tell you that the 8254 was made way back in the late 70s and is still in use). It is safe to include this feature as it is only enabled if the platform supports it.
Suggestion – build in.
Provide RTC interrupt
[HPET_EMULATE_RTC]
Purpose: Related to the previous option but there is no documentation on the feature.
Suggestion – leave it out, I guess. It appears to have to do with emulating the real time clock (provided by/using?) the HPET (I infer this from the name).
Symmetric multi-processing support
[SMP]
Purpose: This enables support for systems with more than one CPU (symmetric multiprocessor systems).
Suggestion – if you have more than one processor in your system include this.
This is required to use the hyper-threading feature on processors that support the feature.
Preemptible Kernel
[PREEMPT]
Purpose: Allows low priority processes to be preempted even while in kernel mode (For further explanation read up about the linux process management from a good book).
Suggestion – built in for desktop systems, RTS or embedded.
Preempt The Big Kernel Lock
[PREEMPT_BKL]
Purpose: This option reduces the latency of the kernel by making the
big kernel lock preemptible (what does that mean?). This arises from the previous option.
Suggestion – build in.
Local APIC support on uniprocessors
[X86_UP_APIC]
Purpose: Allows uniprocessors with a local APIC to use this APIC. It can be safely enabled with no slowdown even if it is not present (some of you may have seen an option in the bios dealing with this).
Suggestion – build in.
IO-APIC support
[X86_UP_IOAPIC]
Purpose: this option appears only if you have selected the last one.
Suggestion – Similar to the last option and can be built in. If you have an SMP, it is likely that you will require this.
Machine Check Exception
[X86_MCE]
Purpose: Returns errors to the kernel if the processor detects an error (overheating etc)
Suggestion – built in is a safe option for everyone except Pentium users. Some older Pentiums (Pentium 1s) have a design flaw and report false MCE events. So Pentium users should be cautious while enabling this option. 386s and 486s do not have this feature, so in such cases this option can be excluded (it is still safe to enable it though).
Check for non-fatal errors on AMD Athlon/Duron Intel Pentium 4
[X86_MCE_NONFATAL]
Purpose: Similar to above, but returns errors specific to these processors.
Suggestion – module.
Check for P4 thermal throttling interrupt
[X86_MCE_P4THERMAL]
Purpose: Prints a message whenever the P4 enters thermal throttling.
Suggestion – user's choice.
Toshiba Laptop Support
[TOSHIBA]
Purpose: Useful only on Toshiba Laptops having a Toshiba bios.
Suggestion – exclude unless your system satisfies the above criterion.
Dell Laptop Support
[I8K]
Purpose: Useful only on the Dell Inspiron 8000.
Suggestion – exclude unless your system satisfies the above criterion.
Enable X86 board specific fixups for reboot (X86_REBOOTFIXUPS)
Purpose: This enables chipset and/or board specific fixups to be done
in order to get reboot to work correctly.
Suggestion - Currently, the only fixup is for the Geode GX1/CS5530A/TROM2.1. Combination. Others should exclude.
/dev/cpu/microcode – IA32 CPU microcode support.
[MICROCODE]
Purpose: If you say Y here and also to "/dev file system support" in the
'File systems' section, you will be able to update the microcode on
Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II,
Pentium III, Pentium 4, Xeon etc.
Suggestion – exclude. I have never heard of anyone ever using this.
/dev/cpu/*/msr – Model specific register support
[X86_MSR]
Purpose: Enables privileged processes access to MSRs.
Suggestion – module.
/dev/cpu/*/cpuid – CPU information support
[X86_CPUID]
Purpose: Access to the x86 CPUID instruction.
Suggestion – module.
High memory support
[NOHIGHMEM / HIGHMEM4G / HIGHMEM64G]
Suggestion – If you have not more than 1GB RAM then say “offâ€.
1- 4 GB then select 4GB
Up to 64 GB then select 64 GB. (Only on systems supporting PAE!)
Allocate 3rd level page tables from high memory.
[HIGHPTE]
Purpose: Setting this option will put user space page tables in high memory.
This avoids the waste of low memory space in systems having large amount of RAM.
Suggestion – build in. This option appears only if you have selected the previous option.
Math Emulation
[MATH_EMULATION]
Purpose: Emulates a math coprocessor on systems which do not have one.
Suggestion – exclude, unless you are running a 386 or 486SX without a coprocessor (unlikely).
MTRR support
[MTRR]
Purpose: Memory Type Range Registers may be used to control access to AGP and PCI buses. Improves performance of video cards.
Suggestion – build in.
Boot from EFI support
[EFI]
Purpose: This option has a meaning only on IA64 systems.
Suggestion – exclude.
Enable seccomp to safely compute untrusted bytecode
[SECCOMP]
Purpose: This kernel feature is useful for number crunching applications
that may need to compute untrusted bytecode during their
execution.
Suggestion – build in.