Linux Kernel Compilation

Source: Internet
Author: User
Article title: Linux Kernel Compilation details 2. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
5. Memory Technology Device (MTD)
  
MTD device support. Optional.
  
6. Parallel port support
  
Serial port support. If you do not want to use the serial port, do not select it.
  
7. Plug and Play configuration
  
Plug-and-play is supported. Although plug-and-play in Linux is not as good as that in Windows currently, you can choose it. in this way, you can unplug the mouse and try plug-and-play in Linux.
  
8. Block devices
  
Block device support. You have to select one based on your own situation. here is a brief description:
  
Normal PC floppy disk support: General PC floppy disk support. This should be required.
  
XT hard disk support:
Compaq SMART2 support:
  
Mulex DAC960/DAC1100 pci raid Controller support: For RAID images.
  
Loopback device support:
Network block device support: supported by Network block devices. If you want to access the Internet neighbors, choose.
  
Logical volume manager (LVM) support: Logical volume management support.
  
Multiple devices driver support: supports Multiple device drivers.
  
RAM disk support: ramdisk support.
  
9. Networking options
  
Network options. The network protocol is configured here. There is too much content. I will not introduce it one by one. let's take a look at it. if you have some knowledge about network protocols, you should be able to understand it. If you are too lazy to check the network, use the default option (you must select the TCP/IP networking option.
  
Let's take a look at TCP/IP, ATM, IPX, DECnet, Appletalk ...... Many protocols are supported, IPv6 is also supported, Qos and/or fair queueing is also supported, and kHTTPd is also supported, but these are still in the experimental phase.
  
10. Telephony Support
  
Phone support. What is this? Let me check the help. it turns out that Linux supports phone cards, so that you can use a common phone to provide voice services on an IP address. Remember, the phone card has nothing to do with modem.
  
11. ATA/IDE/MFM/RLL support
  
This is supported by hard disks, optical drives, tapes, and floppy disks with many interfaces. use the default options. if you use special devices, such as PCMCIA, find the corresponding options.
  
12. SCSI support
  
Support for SCSI devices. I don't have a SCSI device, so I don't need to select it. if you use a SCSI hard drive, optical drive, tape, and other devices, you can find them yourself.
  
13. what is IEEE 1394 (FireWire) support? I have never seen any earlier version. let's look at the help. I used to use Fireware hardware to improve the performance of the serial bus. I did not select it.
  
14. I2O device support
  
This is not clear. in the help section, it is said that the I2O Interface Adapter is required to support this function. it is used in intelligent Input/Output (I2O) system interfaces and hardware is required.
  
15. Network device support
  
Network device support. I have selected the protocol above. now I have to select a device. as you can imagine, the content must be much more. Fortunately, it is probably classified into ARCnet devices, Ethernet (10 or 100 Mbit), Ethernet (1000 Mbit), and Wireless LAN (non-hamradio), Token Ring device, Wan interfaces, and PCMCIA network device support.
  
I use 10/100 M ethernet. it seems that I only need to select this one. Or 10/100 M Ethernet device familiar, although the content is much, at a glance can see my RealTeck RTL-8139 PCI Fast Ethernet Adapter support, in order to avoid trouble, compiled into the kernel is good, if M is not selected, select Y. Be patient. Generally, you can find your own network card. If not, you have to go to the vendor to get the driver.
  
16. Amateur Radio support
  
If you don't understand it, you should configure amateur wireless broadcasting. no, no.
  
17. IrDA (infrared) support
  
This requires infrared support.
  
18. ISDN subsystem
  
If you use ISDN to access the internet, this is essential. I have done it myself.
  
19. old CD-ROM drivers (not SCSI, not IDE) do really thoughtful, the original those non SCSI/IDE ports who are still using the drive AH, choose it, anyway, I am using the IDE CD-ROM, don't choose this.
  
20. Character devices
  
Character device. This content is too much. use the default settings first, and modify the content as needed. Let's introduce the main categories:
  
I2C support: I2C is a low-speed serial bus protocol used in micro-control applications promoted by Philips. This option is required if you want to select the following Video For Linux.
  
Mice: Mouse. Now you can select bus, serial port, PS/2, C & T 82C710 mouse port, and PC110 digitizer pad as needed.
  
Joysticks: handle. Even if you drive the handle in Linux, it doesn't make much sense, and there are too few games.
  
Watchdog Cards: Although it is called Cards, it can be implemented with pure software, and of course there are hardware. If you select this option, a file named watchdog will be created under your/dev, which can record the running status of your system, it takes about 1 minute to restart the system. With this file, you can restore the system to the state before restart.
  
Video For Linux: audio/Video cards are supported.
  
Ftape, the floppy tape device driver:
  
PCMCIA character device support:
  
21. File systems
  
File system. There are too many contents. the old method is to modify the content based on the default options. This section describes the following items:
  
Quota support: Quota can limit the maximum disk space available to each user, which is very effective when multiple users share a single host.
  
Dos fat fs support: Supports the format of dos fat files, including FAT16 and FAT32.
  
ISO 9660 CD-ROM file system support: the disc uses the ISO 9660 file format.
  
NTFS file system support: ntfs is the file format used by NT.
  
/Proc file system support:/proc file system is a channel provided by Linux for users to interact with the system. it is recommended that you select it. otherwise, some functions cannot be correctly executed.
  
There are also three other categories: Network File Systems, Partition Types, and Native Language Support ). It is worth mentioning that there are two types of Network File Systems: NFS and SMB, respectively, Linux and Windows, access each other's File Systems in the form of Network neighbors, and select as needed.
  
22. Console drivers
  
Console driver. Generally, you can use the VGA text console, the standard 80*25 text console.
  
23. Sound
  
Sound card driver. If you can find the sound card driver in the list, it is naturally best, otherwise you will try OSS.
  
24. USB supprot
  
USB support. Many USB devices, such as the mouse, modem, printer, and scanner, can be supported in Linux and can be selected as needed.
  
25. Kernel hacking
  
With this configuration, you can do some work even when the system crashes. Common users do not need this function.
  
After the configuration is complete, save the disk and exit. of course, you can save the current configuration file so that you can save the effort to configure it again next time.
  
   Compile
  
After complicated configuration, you can wait for a cup of tea. Compilation-related commands include the following:
  
# Make dep
# Make clean
# Make zImage
# Make bzImage
# Make modules
# Make modules_install
# Depmod-
  
The first command, make dep, actually reads the configuration file generated during the configuration process to create the dependency tree corresponding to the configuration, so as to determine which need to be compiled and which do not need to be; run the second command make clean to delete the files left in the previous step to avoid some errors. run the third command make zImage and the fourth command make bzImage to fully compile the kernel, both of them use gzip to compress the kernel. The difference is that make bzImage can generate a larger kernel, for example, if you use the make zImage command to compile the kernel of version 2.4.0, the system too big error message will appear. We recommend that you use the make bzImage command.
  
The following three commands are necessary only when you answer Enable loadable module support (CONFIG_MODULES) in the configuration process, make modules and make modules_install generate the corresponding modules and copy the modules to the required directories.
  
Strictly speaking, the seventh command has nothing to do with the compilation process. it is used to generate dependencies between modules. after you start the new kernel, the module can be correctly located when the module is loaded using the modprobe command.
  
   Update
  
After the above steps, we finally get the new kernel version. To be able to use the new kernel version, we also need to make some changes:
  
# Cp/usr/src/linux/System. map/boot/System. map-2.4.0test8
# Cp/usr/src/linux/arch/i386/bzImage/boot/vmlinuz-2.4.0test8
  
The above two files are newly generated during compilation. Next, modify the two links System. map and vmlinuz under/boot to point them to the new kernel file:
  
# Cd/boot; rm-f System. map vmlinuz
# Ln-s vmlinuz-2.4.0test8 vmlinuz
# Ln-s System. map-2.4.0test8 System. map
  
Then modify/etc/lilo. conf:
  
# Vi/etc/lilo. conf
  
Add the following section:
  
Image =/boot/vmlinuz-2.4.0test8
Label = linux240
Read-only
Root =/dev/hda2
  
The root =/dev/hda2 line must be modified as needed. Run:
  
#/Sbin/lilo-v
  
Make sure that you have edited/etc/lilo. conf correctly. now restart the system:
  
# Shutdown-r now
  
Press the TAB key and enter linux240 when LILO appears after the machine is restarted. our new kernel plays a role. enjoy it.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.