Steps for Linux kernel Cropping

Source: Internet
Author: User

Configure in menuconfig:
Detailed introduction to Kernel configuration options and deletions
Part 1: Delete All
Code maturity level options ---> Code maturity level options
[] Prompt for development and/or incomplete code/drivers is selected by default. This will display the code and driver that is still being developed or not completed on the settings page. no.
Part 2: delete all items except the following
General setup-> -〉
System v ipc (IPC: Inter Process Communication) is a group System call and function library that allows programs to exchange information with each other synchronously. Some programs and DOS simulation environments need it. Provides a communication mechanism for processes, which enables information exchange and synchronization between processes in the system. Some programs can run only when Y is selected, so you do not need to consider it.
Part 3: delete all items except the following
Loadable module support ---> the support for bootable modules is recommended to be added to the kernel as a module.
[] Enable loadable module support enables your kernel support module. What is the module? A module is a small piece of code. After compilation, You can dynamically Add the kernel when the system kernel is running, so as to add some features to the kernel or support certain hardware. Generally, some commonly used drivers or features can be compiled into modules to reduce the size of the kernel. You can run the modprobe command to load it to the kernel (you can also remove it when it is not needed ). The principle of compiling some features into modules is that they are not often used. In particular, drivers that are not required during system startup can compile them into modules, if the driver is used when the system starts, for example, the file system, the support of the system bus should not be compiled as a module, or the system cannot be started.
[] Automatic kernel module loading generally, if our kernel needs to use a driver or feature compiled as a module in some tasks, we need to use the modprobe command to load it before the kernel can be used. However, if you choose this option, when the kernel needs some modules, it can automatically call The modprobe command to load the required modules. This is a great feature, of course, you must choose Y.
Part 4: delete all
Block layer -----> Block Device
Part 5: delete all items except the following
Processor type and features ---> Processor type
Subarchitecture Type (PC-compatible) ---> the main purpose of this option is to enable Linux to support multiple PC standards, generally, the pc we use follows the so-called IBM compatibility structure (pc/). This option allows you to select other architectures. We generally choose PC-compatible.
Processor family (386): it will optimize each type of CPU so that it can run well and well. Generally, you can select any type of CPU. I chose 386, which saves a lot of space for the kernel.
Part 6: delete all items except the following
Power management options (ACPI, APM) ---> Power management options
[] Power Management Debug Support debugging information Support for Power Management. Do not select this option if you do not want to Debug the kernel related to Power Management.
ACPI Support ---> Advanced Power Interface Configuration Support. If BIOS Support is available, we recommend that you select this option.
[] The Button option is used to register power-based events, such as power and sleep. When you press the Button, a daemon will read/proc/acpi/event, and execute the actions defined by the user on these events, such as shutting down the system. You can select either of them based on your needs.
Part 7: delete all items except the following
Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---> Bus options
[] PCI support
PCI access mode (Any) ---> PCI peripheral device configuration. We recommend that you select Any for the strong column. The system will first use MMConfig, then use BIOS, and finally use Direct to detect PCI devices.
Part 8: delete all items except the following
Executable file formats --->
Kernel support for ELF binaries ELF is the most common binary file on open platforms. It supports different hardware platforms. Be sure to select.
Part 9: delete all items except the following
Networking options --->
[] Unix domain sockets
[] TCP/IP networking
Part 10: delete all items except the following
Device Drivers ---> Device Driver
Block devices -------> -------〉
[] Compaq SMART2 support
[] Compaq Smart Array 5xxx support
[] Loopback device support most people select N for this option because it is unnecessary. But if you want to mount the iso file, you have to choose Y. This option means that a file can be mounted into a file system. If you want to burn an optical disc, it is very likely that you can check whether the file meets the IS09660 File System Content and your requirements before burning a file. In addition, this file system can be protected. However, if you want to do this, you must have the latest mount program, which is version 2.5X or later. And if you want to add protection to this file system, you will have the des.1.tar.gz program. Note: This is not related to the network. We recommend that you compile it into a module.
[] RAM disk support
SCSI device support ---> for USB support, select
[] SCSI device support USB must be selected
[] Legacy/proc/scsi/support USB must be selected
[] To use SCSI disk support USB, You must select
SCSI Low-level drivers
[] Serial ATA (SATA) support
[] This option is required for Intel PIIX/ich sata support. Otherwise, boot files cannot be generated.
[] Via SATA support
Networking device support ---> select the NIC Driver.
Ethernet (1000 mbit)-Your my computer is a gigabit Nic, so select this
[] Broadcom Tigon3support
Input device support ---> set your mouse and keyboard
[] Provide legacy/dev/psaux device
Graphics support --->
[] Support for frame buffer devices supports Frame buffer. You must select
USB support --->
[] USB device filesystem, which seems required by a USB flash drive
[] Ehci hcd (USB 2.0) support with USB is selected and compiled into modules.
[] Ohci hcd support must be selected and compiled into modules
[] Uhci hcd (most Intel and VIA) support must be selected and compiled into modules
[] USB Mass Storage support USB flash drives are required
Select USB mouse and usb keyboard in usb Human Interface Device (full HID) support.
Select HID input layer support
/Dev/hiddev raw HID device support if you have the USB keyboard and mouse options, be sure to select
Part 1: Delete all items except the following
File systems ---> file System
Second extended fs support

Ext2 extended attributes

Ext2 POSIX Access Control Lists

Ext2 Security Labels
Ext3 journalling file system support

Ext3 extended attributes

Ext3 POSIX Access Control Lists

Ext3 Security Labels and above must be selected. linux Standard File System
Kernel automounter support automatically mounts the Kernel. Of course, select
Kernel automounter version 4 support (also supports v3)
DOS/FAT/NT Filesystems --->
Dos fat fs support
MSDOS fs support
VFAT (Windows-95) fs support
NTFS file system support
Native language support. Here we can only support English and Chinese.
[] Nls iso 8859-1 is required. This is about USB flash disk mounting.
CD-ROM/DVD Filesystems ---> This is about mounting the ISO file, you can choose.
ISO 9660 CDROM file system support
Part 1: Delete All
Instrumentation support
Part 1: Delete All
Kernel hacking ---> cracking core? Not a zombie.
Part 1: Delete All
Security options --->
Part 1: Delete All
Cryptographic options ---> This is the core option that supports encryption.
Part 1: Delete All
Library routines --->
Kernel configuration
There are many Kernel configuration methods, such as make config, make xconfig, make menuconfig, and make oldconfig. Their functions are the same. The differences can be seen by name, only make oldconfig refers to the current settings of the system (. /. config) as the default value. Here, make menuconfig is used.
It should be noted that the larger the number of unnecessary drivers, the larger the kernel, not only the slow running speed and high memory usage, but also other problems in a few cases. The procedure is as follows:
First, make sure that the shell is bash.
$ Make menuconfig
Some default symbols have the following meanings:
Y: Load
N: Do not load
M: loaded as a module
You can configure the following options:
1) code maturity level option code maturity
Prompt for development and/or incomplete code/drivers [N/y/?]
If you are interested in testing some modules that have not yet been finalized in the kernel, select y. Otherwise, select N. Do you want to know more details? The online help (below? ), N indicates the default value in uppercase.
2) processor type and features
Processor family (386,486/cx133, 586/K5/5x86/6x86, Pentium/K6/TSC, PPro/6x86MX) [PPro/6x86MX]
[] Is the default value. We can select the value based on the uname command execution result described above. If this parameter is greater than 386, the generated kernel cannot be started on the 386 host.
Math emulation (CONFIG_MATH_EMULATION) [N/y/?]
Need to perform coprocessor simulation? Normal machines return n. If the machine already has a Hardware Co-processor, the kernel will still use the hardware, while ignoring the math-emulation of the software, which will make the kernel become slower.
MTRR (Memory Type Range Register) support (CONFIG_MTRR) [N/y/?]
Image writing speed can be improved in Pentium, Pro/Pentium II systems.
Using Ric multi-processing support (CONFIG_SMP) [Y/n/?]
If your machine has multiple processors, select y. Select the following Enhanced Real Time Clock Support
3) loadable model support: supported modules
Enable loadable module support (CONFIG_MODULES) [Y/n/?]
It is best to select y. Otherwise, many modules that are only for dynamic loading will not be available.
Set version information on all symbols

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: 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.