Linux kernel compilation details

xiaoxiao2021-03-06  27

Looked an article, collect it. Http://tristones.viaspeip.com/archives/000209.html

Linux, I am back. Both old machines can not load RH9.0. No way, still find the original RH5.1 version. The company has taken the old goods to install, and there is no problem in the LAN. Test Environment Apache, PHP, Perl, MySQL, Samba These are only slowly getting. First recompile the kernel. 5.1 The default kernel is 2.0.xx. Now Release Stability Keernel is 2.6.1 Re-compiling. Google finds a related article, and other increasing. For your own reference memo, otherwise you have to forget the next time. There is blog, it is good. Linux5.1 version KERNEL is 2.0.34, which encounters a lot of errors when upgrading to 2.6.1. There is a lot of new versions for support tools, which will cause unable to compile. There are several articles of Zt here, there is no finishing. Pile up first http://www.linuxfocus.org/chinesegb/july2002/Article252.shtml

> http://www.linuxaid.com.cn/Articles/9/3/936638314.SHTML

Upgrade to 2.4 kernel

Summary

Linux 2.4.x has a complete new network core code and supports many new technologies. In this article we first discuss the characteristics of the new kernel, then discuss how to upgrade from 2.2.x to a new core. (2002-09-02 12:36:50)

-------------------------------------------------- ------------------------------ by Wing, Source: Ideal

Linux 2.4.x has a complete new network core code and supports many new technologies. In this article we first discuss the characteristics of the new kernel, then discuss how to upgrade from 2.2.x to a new core. The Linux kernel is the core part of the operating system, which integrates various experiences and functions in the 2.3 series kernel development. Upgrading from the 2.0.x core of 2.2.x is a tricky process (this is the most important thing to me, my redhat5.1 is the 2.0.x kernel. Now I want to upgrade to 2.4.24. It is a lot of problems. A lot of tools need to be upgraded. I have started vomiting blood.), Because you need to upgrade a lot of relevant support tools. Fortunately, upgrade from 2.2.x to 2.2.4 is simple. Suppose your system has a good running 2.2.x core, first of all, up to 23m 2.4.x kernel now, you need to carefully read which new improvements and features in the new kernel before formally compiling and install new kernels to determine if you need to update Go to the new kernel. What new features are there? The biggest feature of the new kernel is the support of Intel's 64-bit processor itanium, and the Itanium processor will be launched in the second half of this year. Linux supports ITANIUM in advance is to make users smoothly transition to new processors. At the same time 2.4.x added support for IBM S / 390 systems.

PNP support for ISA devices is basically more stable, and support for USB devices has also been strengthened, and the support of PCMCIA / PC card is also more mature. There are many new features to be upgraded to 2.4.x kernel. For file systems, support for UDP will facilitate DVD and CD-RW users. But the support of DVD video playback is still not mature enough. 2.4.1 Support for Reiserfs in the kernel has some stability problems.

An important reason for upgrading to 2.4.x is the network kernel that is completely rewritten and features greatly enhanced. The NFS code has been enhanced and has fewer bugs while providing support for NFSv3. Another thing that is worth noting is to include device file system (DECFS, Device FileSystem), not like a large number of device nodes with pointing to devices before / dev directory, DEVFS automatically creates a corresponding node when a device is loaded. And / dev catalogs have classified the nodes of different devices in different sub-directory.

It can be seen that most of the improvements are for non-I386 systems. If your system needs to use enhanced ISA PNP, USB, and faster network kernels, or new Sound / Video / Video4LinUX driver, you may need to update the kernel, otherwise you'd better not update the kernel. Compilation and install the condition of the new kernel

You can download the latest version of the kernel from http://www.kernel.org/, get the new kernel to move it to the / usr / src directory, and need to ensure that the following conditions are met:

* GNU C should be at least 2.91.66 or above, and can be checked by executing the "GCC --Version" command.

* Gnu Make should be at least 3.77 or later, and can be checked by executing the "Make -Version" command.

* binutils should be at least 2.9.1.0.25 or above, and can be checked by executing the "LD -V" command.

* util-linux should be at least 2.10O or later, and can be checked by executing the "fdFormat -" command.

* MODUTILS should at least 2.4.0 or later, and can be checked by executing the "Insmod -V" command.

* E2FSProgs should be at least 1.19 or more, and can be checked by executing the "Tune2FS --Version" command.

* PCMCIA-CS should be at least 3.1.21 or above, and can be checked by executing the "Cardmgr -V" command.

* PPP should be at least. 4.0 or above, can be checked by executing the "PPPD -Version" command.

* ISDN4K-Utils should be at least 3.1beta7 or above, and can be checked by executing the "ISDNCTRL 2> & 1 | Grep Version" command.

If you find that any software is lower than the required version, you will need to download a new version of http://www.freshmeat.net to install, in general, if the current system is 2.2.x, it can meet the demand except for MODUTILS.

First delete the / usr / src / linux before compiling the new kernel, then decompress the source code, and create a new Linux symbol link point to the new kernel source directory:

# RM / USR / SRC / Linux

# tar xzpvf linux-2.4.3.tar.gz

# mv Linux Linux-2.4.3

(After some version of the Tar in the future, it may be directly version good folder name)

# ln -s / usr / src / linux-2.4.3 linux

Make sure that "/ usr / include / asm", / "/ usr / include / linux", and / "/ usr / include / scsi" is a link to the kernel source code. Both the subdirectory ASM, Linux, and SCSI are the true incrude subdirectory required by the chain to the source code directory, the real incrude subdirectory required for the computer architecture. Such as: ASM points to "/ USR / SRC / Linux / include / ASM-I386", etc. If there is no such link, you need to manually create, follow the steps below [Root @ Deep] # CD / USR / include /

[root @ deep] # rm -rf asm Linux scsi [root @ desk] # ln -s / usr / src / linux / include / asm-i386 ASM [root @ desk] # ln -s / usr / src / linux / INCLUDE / Linux Linux [root @ deep] # ln -s / usr / src / linux / include / scsi SCSI

This is a very important part of the configuration. After deleting the ASM, Linux, and SCSI directories under "/ usr / include", create a new link to the directory of the same name in the new kernel source code directory. These header files contain important header files that ensure that the kernel is properly compiled. Next, you need to compile the kernel:

# Make Dep Clean Modules Modules_Install Bzimage

Copy new kernel file / "/ usr / src / linux / arch / i386 / boot / bzimage" to the startup directory, and change to the appropriate name:

[root @ deskp] # CP / usr / src / linux / arch / i386 / boot / bzimage

/BOOT /VMLINUZ-2.4.3

Copy "/usr/src/linux/system.map" to the launch directory and set the appropriate name:

[root @ Deep] # cp /usr/src/linux/system.map /boot/system.map-2.4.3

Enter the launch directory to point to the link file / "vmlinuz" and /""system.map "in the directory to the new kernel:

[root @ deskp] # CD / boot

[root @ deep] # ln -fs vmlinuz-kernel.version.number VMLinuz

[root @ deep] # ln -fs system.map-kernel.2.4.3

The link file VMLinuz and System.map points to the relevant files of the new kernel, because if there is no new link, the LILO program automatically uses the old kernel by default.

Delete the file in the launch directory:

[root @ deskp] # rm -f module-info

[root @ deskp] # rm -f initrd-2.2.12-20.img

"Module-Info" links the module directory of the old kernel of the system. Since the new kernel is now installed, we do not need to keep this file. File / "initrd-2.2.12-2 "is included in the RAM disk image required to initialize the system before the disk can be used. This file is only generated when the system is installed in the system of SCSI devices. Since it is generated here, it is a single (non-modular) new kernel. So even if the system has a SCSI device, this file can still be deleted safely.

Finally, edit "/etc/lilo.conf" joined the new kernel as the boot option:

Step 1: Edit the file "lilo.conf" file (vi /etc/lilo.conf) Do appropriate modification on "Image = / boot /":

[root @ Deep] # vi /etc/lilo.conf

example:

Boot = / dev / sda

MAP = / boot / map

INSTALL = / boot / boot.b

Prompt

TIMEOUT = 00

Restricted

Password = somepasswd

Image = / boot / vmlinuz-2.4.3

Label = Linux

root = / dev / sda6

Read-only

Step 2: Update modifications to lilo.conf.

[root @ deep] # / sbin / lilo -v

Lilo Version 21, [Copyright 1992-1998 WERNER Almesberger

Reading boot sector from / dev / sda

Merging with /boot/boot.b

Boot image: /boot/vmlinuz-2.4.3added Linux *

/BOOT /BOT.0800 EXITS? NO Backup Copy Made.

Writing boot sector.

Then you can restart your machine to enjoy a new feeling of the 2.4.x kernel.

Resource link

Kernel.org

Linux Software / Tools At Freshmeat

Compiling the linux kernel

Other articles by amit chattopadhyay

-------------------------------------------------- -------------------------------------- Basic compilation

My current version of Linux is: Redhat Linux Advance Server 2.1, the kernel version is 2.4.9-E3. The latest stable kernel is now downloaded 2.4.22. The machine has a dual operating system: Linux and Windows 2003 Server. Use the Gurb multi-start management program. Before the start of the compilation, it is recommended to make a detailed statistics on the hardware in Windows, including hardware types, manufacturers, chip versions, etc., especially notebooks, and brands, because many parts are OEM other manufacturers, It is recommended to record it to use the kernel. First go to www.kernel.org to download a kernel file, now the latest stable version is 2.4.22

1. Put the kernel source package Linux-2.4.22.tar.bz2 copy to / usr / src directory: #CP Linux-2.4.22.tar.bz2 / usr / src # CD / USR / SRC

2. Using the following command unto the compressed package # bzip2 -d linux-2.4.22.tar.bz2 # tar -xvf Linux-2.4.22.tar

3. Enter the working directory used in later compile: #CD /USR/SRC/LINUX-2.4.22

Of course, it can be unfained with Gzip and other decompression software under xwindows, and it is used up and WinZIP or WinRAR. This is the sorrow of Windows without learning. 6. # Make Mrproperty

This command guarantees that there is no incorrect .o file in the source code directory (ie the object file, which is generated when compiling C language, the purpose is to use the use of LINK when compiling into the executable code) and the mutual relying on the file. First time Compiling the original downloaded source package does not need this command, but if you use these source code multiple times, you must first run this command. 7. Start compile the kernel 7.1. Compile the kernel under x window:

7.1.1 # Make Xconfig

If you compile in text mode: #make menuconfig

You can see a graphical interface, but I feel comfortable under xwindows, at least not to make you press N times.

The following is a detailed description of the main profile of the kernel:

1.code maturity level Options: code maturity level.

1.1.Prompt for development and / or incomplete code / drivers. In the world of Linux, there are many people develop support from Driver and strengthen its core every day. However, some Driver has not yet entered a stable stage. But the author welcomes everyone else to test these Driver and propose some BUGS. Many reference books say that this is the function of developers think it is not very stable. But I personally think that this is an option that should be selected. The system is N, I suggest that it chooses Y because it will increase performance. 2.Loadable Module Support: Support for modules.

2.1.enable loadable module support. Starting the functionality of the additional module, the system defaults to Y, it is recommended to select this feature. 2.2.set Version Information On All Module Symbols. Usually, after we update the core version, the module is to be re-compiled. This option can be used for a version of the kernel to be used in another kernel, but it is usually not used, it can be not selected, the system defaults to Y. 2.3. Keernel Module Loader. Let the kernel have the ability to load the required module during startup, and the suggestion is recommended. Note: The fs of the Partition coming up in Mount, Device Driver remember to come into kernel, can't make it Modules. Please don't exaggerate to in order to completely modulate, I forget to enter the EXT2FS and IDE DIRVER Compiler in Kernel. Usually, if possible, compile the kernel code into a loadable module because this makes the kernel smaller and more stable. caveat! Don't compile the code from the file system to the loading module. If you make this error, compile the code of the file system (File System) into the loading module, the result will be the kernel unable to read it. Your own file system. The kernel then cannot load its own profile - some obviously necessary things necessary to start Linux normally. I rarely use the loadable module: Although the kernel file will make the kernel file be large, I like my kernel to talk directly to the hardware, this is just my own preference.

3.Processor Type and Features: Processor Types and Features

3.1.Processor Family. It is optimized for each CPU, so choose the correct CPU. Otherwise, there is a certain impact on the performance of the machine. However, if your GCC compiler is 2.7.0. Then you can only select 386 or 486. Usually the "/ dev / cpu" option is higher, most users do not need to choose it. It should be noted that the CPU that cannot be selected than your CPU type, otherwise it may not work properly. 3.2.High Memory Support. Only when your computer has more than 1GB memory. So "High Memory Support" is usually not used. 3.3.math emulation. This interrogation requires the L1NUX core analog math floating point assembler. If there are 486dx, AMD, and Pentium machines, this option is not to be selected because they have built-in floating point arithduates. The system defaults to N. 3.4.mttr (Memory Type Range Register) Support. This allows for faster communication in PCI or AGP buss. Since all systems are now connected to the PCI or AGP bus, you usually need to choose "mtrr": anyway, open this option is usually safe - even if your machine does not use the PCI or AGP bus. 3.5.Symmetric Multi-Processing Support. Support This option ensures that the kernel can load multiprocessors in best mode. If there is a plurality of CPUs on the compiled computer. General users choose N. 3.6.mutiquad Numa System. Usually requires multiprocessors, but it is usually closed. 4.General Setup: General kernel options. 4.1. Networking support.linux network support, suggestions, otherwise it may cause the kernel to be unable to compile. 4.2. PCI support. All systems now use the PCI bus, the system defaults to Y. 4.3. PCI Access Mode.pci Access Mode. Alternative to BIOS, Direct and Any, choose ANY. 4.4. Support for Hot-Pluggabel Devices Support. Support is not too good, you can not choose. 4.5. Pcmcia / cardbus support ------> pcmcia / cardbus support. There is a PCMCIA. /N4.6. System V IPC. If you want to compile DOSEMU (DOS Simulator), it is a function library that synchronizes each program (Process) and can exchange data from each other, and some system calls, it is recommended to select Y. 4.7. Sysctl support. Unless you have less memory, you should start this feature, enable this option, the kernel will be 8K, but you can change the parameters of the kernel without having to turn it back. The above three is related to process processing / IPC calls, mainly in both SYSTEM V and BSD style. If you are not using BSD, follow the default. 4.9. Kernel core (/ proc / kcore /) format. The current Linux release is in ELF format as their "kernel core format". 4.10. Kernel support for a.out binaries.a. The OUT execution file is an old ancient executable code for comparative early UNIX systems. Linux was originally also using this code to execute the program, until the executable code of the ELF format, more Yu more program code becomes an ELF code with the advantages of the ELF format. The future will be completely replaced. OUT format of executable code.

However, because many programs have not been replaced, I have to choose Y, wait for a day, all the programs become ELF's world, then disable. 4.11. Power Management Support. 4.12. Advanced Power Management BIOS Support. Advanced power management BIOS support. This is usually used on a laptop, if you have APM's BIOS, support power-saving equipment (with battery), then you can choose this, the average person is N to avoid Some problems that may happen. There are eight options. The ATX motherboard requires these two options to switch off the computer (Turn Off The Computer, including turning off). 5.Memory Technology Devices (MTD): Configure storage devices. 5.1. Memory Technology Devices (MTD) Support. You need this option to enable Linux to read a memory (Flash Card). Flash cards are usually used for digital cameras. With this option, Linux can read flash cards (from special devices such as card reader), and save pictures as .jpg format. Unless you make sure you need it, don't open it: If you find yourself, you can add it later. 6. Parallel Port Support: Configure parallel port. 6.1. Parallel Port Support. If you don't plan to use it, don't choose. 7.plug and play configuration: Plug and Play support. 7.1. Plug and playSupport. Almost everyone has a plug-and-play device, so it is necessary to support this option. Opening this option allows the kernel to automatically configure plug and playing devices and allow them to be available in the system. Sometimes you need to open "Plug & Play OS" in the BIOS, otherwise Linux (Of course Windows is also the same) unable to configure plug and play devices. 7.2. Isa Plug & Play Support. The ISA card (ISA Card) running in plug-and-play mode. For example, the AWE64 sound card. If you have this device, you can choose Y. 8. Block Devices: Block Equipment Support. 8.1. Normal PC Floppy Disk Support. Most people want to use floppy, so this option should be Y

8.2. Xt Hard Disk support. Supports XT's antique hard drive, this is something IBM computer era, if you have this very old hard drive. So you can make it core or have a module. Most people this options are selected n. 8.3. Loopback Device Support. This option means that a file can be hung into a file system. If you want to burn the disc, you are likely to see if this file is in line with the contents of the IS09660 file system before you burn a file, whether you meet your needs. Moreover, this file system can be protected. However, if you want to do this, you must have the latest Mount programs, version is above version 2.5X. And if you want to protect this file system, you must have DES.1.tar.gz. 9.Multiple Devices Driver Support: Multi-device Drive Support. Normal Linux users typically do not need RAID (inexpensive redundant disk arrays) or LVM support. Ordinary users choose Y. 10.Networking Options: Network Options. 10.1. Packet Socket. Select "Y", you need this option to communicate with the NIC without need to implement a network protocol in the kernel. Here I can make some simplicity: Under normal circumstances, open this option. Most options are closed unless you need special support. 10.2. TCP / IP Networking. Select "Y", the kernel will support TCP / IP protocol. It is recommended that the user chooses Y. 10.3. IP: Multicasting. The so-called multicasting is a group broadcast. It is a protocol at a video conference. If you want to send a network package (network data), the same data will be sent to ten machines. You can send ten machines to ten machines in a row, or send it at the same time, and then let ten machines receive at the same time. Of course, the latter is better than the former, because the video conference requires that it is best to receive the same information at the same time, so if you have a similar need, this option will open. At the same time, you must also find relevant software.

11.Telephony Support: Telephone support. 11.1.Linux Telephony Support. This option is only useful when you use a phone card in your computer, such as calling on the Internet. Most ordinary users don't have a phone card, so this option is not needed. 12.Ata / IDE / MFM / RLL Support: Configure support for ATA, IDE, MFM, and RLL. 12.1. ATA / IDE / MFM / RLL Support. Almost everyone needs these protocols unless your machine has only a SCSI hard disk without any other type of hard drive. Therefore, most users should open it. Click on the column below it will have a menu with more detailed configuration options. Draw them carefully: they are extremely important! 12.2.enHanced IDE / MFM / RLL Disk / CDROM / TAPE / FLOPPY Support. Option is required for each person using the IDE / ATAPI interface. Includes hard drives, tape drives, ZIP disks, optical drives (CDROMs), and recorders (CD-R (W)). Basically all current computers (Translator Note: It refers to PC) all use the IDE / ATAPI interface, so this option must be opened. 12.3. Include IDE / ATA-2 Disk Support. Options are required when supporting the hard drive. So this option must also be opened unless your machine is a pure SCSI system. Others use the default options, if you use a relatively special device, such as PCMCIA, etc., you can find the appropriate options inside.

13. SCSI Support: Support for SCSI devices. 13.1. SCSI Support. If you have a SCSI card, you certainly need to open the relevant options. This screenshot only shows when you select "SCSI Emulation Support" 13.2. SCSI DISK Support. Refers to the hard disk, if there is a SCSI hard disk, then you will choose this option. 13.3. SCSI Tape Support. Refers to the tape machine, if you have SCSI tape drive, then you will choose this option. 13.4. SCSI CDROM Support. Refers to CDROM, if you have a SCSIDA drive, this must be selected. 13.5. SCSI generic support. Refers to something about SCSI, maybe you have a SCSI scanner or a bulk machine, or other about SCSI, you have to select this. Moreover, in addition to this, you must also prepare software on these equipments. 13.6. Probe A11 LUNS ON Each SCSI Device. Usually most of this option will not choose. We will give an example. If your SCSI optical drive is the kind of multi-piece, it is a CD-ROM, but it can put a few pieces of optical discs at a time. This kind of we call LUN. I2O Device Support: Configure I2O device support. 13.7. Verbose SCSI Error Reporting (kernel size = 12k). If you think your SCSI hardware is equipped with some questions, try to understand the error message it appears. Then you can select this option Y, Linux core will tell you about your SCSI (if any). However, it will increase the core about 12kb. 13.8. SCSI Low-Level Drivers. The following is a total of 30 SCSI cards, you can choose the SCSI card according to the needs. 14.I2O Device Support: I20 device support. 14.1. I2O Device Support. If you have an I2O interface, you must choose this option. Most people don't, if you haven't, you can close it directly. /N15.Network Device Support: Network device support. /N15.1. Network Device Support. Network device support. The above is selected, and now the device is now, it is impossible to know that the content is certain. Fortunately, it is probably classified, with Arcnet equipment, Ethernet (10 or 100 mbit), Ethernet (1000Mbit), Wireless Lan (Non-Hamradio), Token Ring Device, Wan Interface, PCMCIA Network Device Support, Best Class. I use 10 / 100m Ethernet, it seems that I only need to choose this. Still 10 / 100m Ethernet device is familiar, the content is much, you can see the realteck RTL-8139 PCI Fast Ethernet Adapter Support I used, in order to avoid trouble, compiled into the kernel, do not choose M, choose Y . Patience, usually you can find your own network card. If not, you have to go to the manufacturer to drive. 15.2. Dummy Net Driver Support. If there is a SLIP or PPP transport protocol, then open this.

15.3. PPP (Point-to-Point) Support. Point-to-point protocol. 15.4. Slip (SERIAL LINE) Support. This is a communication protocol that the Modem family is used. You must obtain an IP address through a server (called ISP), then use this IP address to simulate the Ethernet network, use the TCP / IP program of. /N15.5.1. Ethernet (10 or 100Mbit). If you use the network card, then this option must be Y, otherwise the following will not appear. Or you have a network card, then you should also choose Y. As usually used, it is a NE2000 compatible card. /N15.5.2. EISA, VLB, PCI and On Board Controllers. Select the network card, including the type directly attached to the motherboard. If you choose Y, you will list other network cards to make you choose, these cards are rarely used for the average person. So most people are selected. /N15.5.3. Pocket and portable adaptors. Usually on portable computers, this type of network card (pocket type), because the volume is very small in installation and removal, so the notebook related computer This network card is often used. 15.5.4. Token Ring Driver Support.Token Ring is a network on IBM. It is called token ring network, and the Ethernet is very similar. If you want to use the Token Ring network card to connect to this network, then choose Y, the average person chooses N. 15.5.5. ARCNET Support. This is also a network card, usually in general, so I choose N. 16.Amateur Radio Support: Configure amateur broadcast support. 16.1. Amateur Radio Support. If you want to use amateur broadcast support, you should open this option and open the corresponding driver. Most people do not need this option. 17.IRDA (Infrared) Support: Configure infrared (wireless) support. 17.1. Irda (Infrared) Support. If you have wireless devices, such as wireless mouse or wireless keyboard, you should open this option. Most desktop machines do not need this option.

18.ISDN SUBSYSTEM: Configure ISDN. 18.1. Isdn Support. If you use the ISDN to access the Internet, this is indispensable. 19.OLD CD-ROM Drivers (NOT SCSI, Not IDE): Configure old CDROM. In the 486 and 386 machines, CDROM is not connected by a hard disk IDE (ATAPI) controller, but through a sound card or a special board. Use these old CDROMs to select the corresponding driver. This option is much more than in the current system.

20.Nput Core Support: This option provides USB support for one of the most important features in the 2.4.x core. Input Core Support is a layer (Layer) between the kernel and some USB devices. If you have one of the USB devices, you must open the "Input Core Support" option. Now all the motherboards have a USB interface, so you should open it in principle.

21.Character Devices: Character Device. 21.1. Virtual Terminal. Select "Y", the kernel will support the virtual terminal. 21.2. Support for console on Virtual Terminal. Select "Y", the kernel can use a virtual terminal as the system console. 21.3. Standard / Generic (DUMB) Serial Support. Select "Y", the kernel will support the serial port. Selection of standard sequence interfaces. If you are using the SERIAL mouse (most people use this), or modem, this must be selected. Most people choose Y. 21.4. Support for console on serial port. Select "Y", the kernel can use a serial port as the system console. 21.5. I2C support.i2c is a low-speed serial bus protocol used in a pHILIPS highly driven microcontrol application. If you want to choose the following Video for Linux, this must be selected. 21.6. Mice. Bus, serial port, PS / 2, C & T 82C710 Mouse Port, PC110 Digitizer Pad ------ as needed. 21.6.1. Ps / 2 mouse (Aka "Auxiliary Device") Support. If the user is using the PS / 2 mouse, the option should select "Y". /N21.7. JOYSTICKS. Handle. Even if you drive the handle under Linux, it is not too big, and the game is too small. While called Cards, this can be implemented by pure software, of course, has hardware. If you choose this, you will create a file called WatchDog under your / dev, which can record your system's operation, until the system restarts for about 1 minute. With this file, you can recover the status before the system is restarted. /N24. Console Drivers: Configure the console driver. 24.1. VGA Text Console. Options Start the character mode in VGA mode. Most people need it, so this mysterious loves you often open. Only some 386 computers do not have a VGA compatible graphics card, and select this option no problem for the current most computers. 24.2. Video Mode Selection Support. The resolution of the character mode can be used when the startup is started. If you want a line to have more words, this usually provides you with convenience, but usually you don't have to open them. The following two options are experimental properties, I suggest you close them. 25. Sound Sound: Sound Card Driver. In this section, you can configure the sound card. If your distribution is used by the kernel's standard sound card driver, you must choose the sound card you use correctly. 26.USB Support: Configure USB support. 27. Keernel Hacking: Configure the "kernel Hacking" option. This is simple: don't open! Make Depmake Bzimage (i to be capitalized) make cleanmake modulesmake modules_install // Generate /Lib/Modules/2.4.22

DEPMOD -A Check that there is no resolved Symbol in the kernel, which is a dependency between modules so that you can properly locate the module when you start a new kernel. If you don't see any return information after entering this command, then you have succeeded in the compilation process. Copy BZImage to Bootcp / USR / SRC / Linux / Arch / i386 / Bzimage / Boot

Generate an initrd img file under / boot: / ncd / bootmkinitrd initrd-2.4.22.img 2.4.22 then configure grub.conf file

Default = 0

TIMEOUT = 10

SplashImage = (HD0, 6) /grub/splash.xpm.gz

Password # $$$ 43 & * fsklfs4 $

Title Red Hat Linux Adance Sever 2.1 (2.4.9-E3)

Root (HD0, 6)

Kernel /Vmlinuz-2.4.9-e3 Ro root = / dev / hda8initrd /initrd-2.4.9-e3title dosrootnoverify (HD0, 0)

// Red part is my added content / NTITLE Red Hat Linux Adance Sever 2.1 (2.4.22) root (HD0, 6) kernel /VMLinuz-2.4.22 ROOT = / dev / hda8initrd /initrd-2.4.22.imgchainLoader 1

Start 2.6, more make install commands, can reduce Make Dep, make clean, etc. Specific reference.

In fact, the most critical places in compiling the kernel is to configure the kernel. I generally configure the kernel with make menuconfig. / n Configuration 2.6.0 Core If your motherboard is an Intel chip, you can get a satisfactory kernel with the default formulation. The approach is to choose to save when Make MenuConfig leaves. / n The difficulty here is that the PCI, if your hard disk is the IDE, you must choose your motherboard on the South Bridge chip. If SCSI is to choose your SCSI card model. / N is also a network card, the sound card chip model, their model you can use LSPCI to find something like mine. / N

sh-2.05a # /sbin/lspci00:00.0 Host bridge: ServerWorks CNB20LE Host Bridge (rev 05) 00: 00.1 Host bridge: ServerWorks CNB20LE Host Bridge (rev 05) 00: 02.0 PCI bridge: Intel Corp. 80960RP [i960 RP Microprocessor / Bridge] (rev 01) 00: 02.1 I2O: Intel Corp. 80960RP [i960RP Microprocessor] (rev 01) 00: 04.0 Ethernet controller: 3Com Corporation 3c985 1000BaseSX (SX / TX) (rev 01) 00: 08.0 PCI bridge: Digital Equipment Corporation Decchip 21152 (REV 03) 00: 0E.0 VGA Compatible Controller: ATI TECHNOLOGIES INC 3D Rage Iic (REV 7A) 00: 0F.0 ISA Bridge: ServerWorks OSB4 South Bridge (REV 4F) 00: 0F.1 Ide interface: ServerWorks OSB4 IDE Controller02: 04.0 EtherNet Controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (REV 05) 02: 05.0 Ethernet Controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (REV 05) 03 : 02.0 PCI Bridge: Intel Corp. 80960RM [I960RM Bridge] (REV 01) 03: 08.0 Ethernet Controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (REV 08) You just choose all your PCI correct. If you use the default, you can use the Make Install. . It is convenient. / N 2.4.21 You can use make install

These steps are now doing Make Install.

#Make dep (Make sure the key file is in the correct location) 2.5. * - 2.6.0 is not required. In fact, 2.4. * Some kernels are not needed. / N #make clean (make sure all related files are in the latest version)

#Make zimage (the kernel in the form of compression)

When you need a kernel to support more peripherals and functions, the kernel may become large, at which time you can compile the large kernel:

#Make bzimage

The compiled time is related to factors such as the hardware conditions of the machine and the configuration of the kernel. Take the author's 64MB memory classifier 300 as an example, compile core nuclear once a generally takes more than 20 minutes. The location of the core obtained is in / usr / src / linux / arch / i386 / boot directory, of course, it is assumed that the user's CPU is X86. / n If you select the loading module, after compiling the kernel, you should compile the selected module:

#MAKE MODULE (Module Select)

#Make module-install (transfer the compiled module to the system standard location)

The module is located in /lib/modules/x.y.z in the standard directory in the system, and the following X.y.z is the version number. For security reasons, it is best to back up / lib / modules before running #make modules-install. The module is usually a file with an extension .o, using command #lsmod to list the module of the current kernel. / N I usually make Dep; make Make Bzimage; Make Module; Make Module-Installcp /usR/src/linux2.6.0-test2/Arch/i386/boot/bzimage /boot/vmlinuz-2.6.0-test2

Cp /usr/src/linux-2.6.0-test2/system.map /boot/system.map-2.6.0-test2

These make installs can be done.

The rest is modified /etc/lilo.conf

vi /etc/lilo.conf

Add a new kernel. Sometimes Make Install has been modified by this. / N is my lilo.confprompttimeout = 50DEFAULT = LinuxBoot = / dev / sdamap = / boot / mapinstall = / boot / boot.bmessage = / boot / messageelinear

Image = / boot / vmlinuz-2.4.18-3smplabel = linuxinitrd = / boot / initrd-2.4.18-3smp.imgread-onlyroot = / dev / sda6

Image = / boot / vmlinuz-2.6.0-test2Label = linux-2.6.0-test2initrd = / boot / initrd-2.6.0-test2.imgread-onlyRoot = / dev / sda6

Run /NSH-2.05A# LILO to regenerate LILO

转载请注明原文地址:https://www.9cbs.com/read-65062.html

New Post(0)