Http://blog.csdn.net/lzj1980/archive/2008/07/04/2612016.aspx
Linux-2.6.25 kernel compilation simple process notes:
1). Download kernel http://www.kernel.org/pub/Linux/kernel/
2). Tar xvzf Linux-2.6.25.tar.gz-C/usr/src
CD/usr/src
Ln-s Linux-2.6.25 Linux
CD Linux
Make mrproper # Make Sure You Have No stale. O files
Make menuconfig # generate a. config file
General setup->
[*] Prompt for development and/or incomplete code/drivers # enabling this option will allow many more options for Kernel configuration. However, you must enable this option because you need to use some features under development.
(Websrv) local version-append to kernel release # Add a compilation purpose string, which can be seen at uname-.
[*] Support for paging of anonymous memory (SWAP) # This is a virtual memory that uses swap partitions or swap files.
[*] BSD process accounting # allow the user process to access the kernel and write account information to the file
[*] Optimize for size # Make GCC use the-OS parameter instead of the-O2 parameter to optimize the compilation to obtain a smaller kernel. It is recommended that you choose.
[*] Symmetric Multi-processing support # This option should also be selected for hyper-threading CPU. If this option is not selected on a single CPU machine, it will be faster.
[*] Preemptible kernel # make the application reliable even when the kernel is under high load. It is recommended that you choose
(1) Maximum number of CPUs (2-255) # maximum number of supported CPUs
[*] Machine check exception # notify the kernel when the CPU detects a system fault (for example, the CPU is overheated)
Loadable module support->
[*] Enable loadable module support
[*] Automatic kernel module loading # When the kernel needs some modules, it can automatically call The modprobe command to load the required modules
Processor type and features->
(X) subarchitecture type (PC-compatible)-> # It enables Linux to support multiple PC standards and allows you to select some other architectures. We generally choose PC-compatible.
Processor family (Pentium-Pro)-> CPU options here for your CPU model, select the appropriate options.
(X) Pentium-4/celon (P4-based)/Pentium-4 M/Xeon # Choose based on your CPU
[] Generic x86 support # maximum compatibility with x86 series CPUs. If your CPU can be found in the list above, you do not need to select it.
[] Symmetric Multi-processing support # multi-processor options are supported. If it is a single CPU, you must disable it.
<*> Check for non-fatal errors on AMD athlon/duron/Intel Pentium 4 # check for possible problems on the machine, if a non-fatal error occurs, it will be automatically repaired and recorded. This will help you find out the cause of the problem.
High memory support (4 GB)->
(X) off my PC is 1 GB memory, and it cannot be increased to 4 GB memory _^
Power Management Options (ACPI, APM)->
ACPI (Advanced Configuration and Power Interface) support->
<*> The button captures power, sleep, and lid (I don't know what the button is), determines whether to press the button, and performs the corresponding action.
<*> ACPI support for video cards integrated on the board may not work for some boards.
[*] CPU frequency scaling # This option allows you to change the CPU clock speed to reduce the clock speed when the CPU is low-load or battery, thus saving power.
[*] Thermal zone # most desktops and laptops support this function. If you do not select this option, you may burn the processor.
Bus options (PCI, PCMCIA, Eisa, MCA, Isa)->
[] ISA support # No more than ISA
Pccard (PCMCIA/carloud) support-> # This option is optional for non-notebook
Make
Make modules_install
Make install
# Cp ARCH/i386/boot/bzimage/boot/linux2625
VI/boot/GRUB/grub. conf # modify the corresponding configuration
Reboot
It seems that the new kernel compilation is much more convenient than before. The previous steps such as make bzimage make modules are all done in make step. In the past, the CP kernel and system are required. map, modify grub. make install all the conf steps!
Note:
(1) CAT/proc/version # view the version and the number of compilations
(2) name the new core
Open/usr/src/Linux/makefile. Note that there is a variable extraversion at the beginning that can be customized. Modify this variable. For example, if it is changed to "extraversion =-LVS", the compiled core version number is displayed as 2.4.20-LVS. A meaningful name will help you manage multiple Linux cores.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/lzj1980/archive/2008/07/04/2612016.aspx