Specific steps for Linux kernel cropping

Source: Internet
Author: User
Tags posix

Configure in Menuconfig:


Details of kernel configuration options and deletions
Part I: Delete all
Code maturity levels Options---> Codes maturity level option
[]prompt for development and/or incomplete code/drivers is selected by default, which displays code and drivers that are still being developed or not yet completed in the Setup interface.
The second part: except the following options, all other delete
General setup-〉
System V IPC (Ipc:inter process Communication) is a group of systems calls and function libraries that allow programs to exchange information synchronously. It is required for some programs and for the DOS simulation environment. Provides a communication mechanism for the process, which enables the ability to exchange information and maintain synchronization between processes in the system. Some programs can only be run if you choose Y, so don't worry about it, it's a must-have choice.
The third part: except the following options, all other delete
Loadable Module Support---> Bootable module supports the recommendation to join the kernel as a module
[] Enable Loadable module support This option allows you to enable the kernel module, what is the module? The module is a small piece of code that can be dynamically added to the kernel when the system kernel is running, adding features to the kernel or supporting some hardware. Generally some of the less commonly used drivers or features can be compiled into modules to reduce the size of the kernel. At run time, you can use the modprobe command to load it into the kernel (you can remove it if you don't need it). The principle of whether some features are compiled into a module is, infrequently used, especially when the system is not required to start the drive can be compiled into a module, if it is some of the drivers used in the system boot such as file system, the system bus support should not be compiled into a module, no boot system.
[]automatic kernel module loading under normal circumstances, if our kernel in some tasks to use some of the drivers or features compiled into the module, we have to use the modprobe command to load it before the kernel can use. However, if you choose this option, it can automatically invoke the Modprobe command to load the required modules when the kernel needs some modules, which is a great feature, of course, to choose Y.
Part IV: Delete all
Block Layer-----Blocks device
Part V: Except for the following options, all other deletions
Processor type and features---> Processor types
Subarchitecture Type (pc-compatible)---> The main purpose of this option is to enable Linux to support a variety of PC standards, generally we use a PC that follows the so-called IBM Compliant Architecture (PC/AT). This option allows you to select some other schemas. We generally choose to pc-compatible.
Processor Family (386): It will optimize each kind of CPU, let it run good and fast, in general, you are what type of choice on what type of good. I chose 386, so the kernel would save a lot of space.
Part VI: Except for the following options, all other deletions
Power management options (ACPI, APM)---> Power management option
[] Power Management debug support for power management, do not select this if you are not debugging the kernel for the Power Management Section.
ACPI Support---) Advanced Power Interface configuration supported, if supported by BIOS, it is recommended to select this
[]button This option is used to register events based on the power button, such as power, sleep, etc., when you press the button, the event will occur, a daemon will read the/proc/acpi/event, and perform actions defined by the user on these events such as having the system shut down. Can not choose, according to their own needs.
Part VII: Except for the following options, all other deletions
Bus Options (PCI, PCMCIA, EISA, MCA, ISA)---> Buses option
[]PCI Support
PCI access mode (ANY)---> PCI peripheral configuration, strong column recommended any, the system will take priority to use Mmconfig, then use the BIOS, and finally use direct to detect PCI devices.
Parts: Except the following options, all other delete
Executable file Formats--->
The Kernel support for Elf binaries Elf is the most commonly used binary file under open platforms, and it supports different hardware platforms. Be sure to choose.
Ninth: Except for the following options, all other deletions
Networking
Networking Options--->
[]unix Domain sockets
[]TCP/IP Networking
Part: Except the following options, all other delete
Device Drivers---> Equipment drivers
Block devices-------
[]compaq SMART2 Support
[] Compaq Smart Array 5xxx Support
[]loopback Device Support Most of the people this option is chosen N, because there is no need. But if you want to mount the ISO file, you have to choose Y. This option means that a file can be hung as a file system. If you want to burn a disc, then it is very likely that you will be able to burn a file to see if this file conforms to the content of the IS09660 file system and meets your needs. Furthermore, this file system can be protected. However, if you want to do this, you must have the latest Mount program, the version is in the 2.5X version above. And if you want to add protection to this file system, you must have des.1.tar.gz this program. Note: This is not related to the network. recommended to compile into modules
[] RAM Disk Support
SCSI Device Support---> is available on USB
[]SCSI Device support USB is used, you must select
[]legacy/proc/scsi/support USB to use, must choose
[]SCSI disk support USB to use, you must select
SCSI Low-level drivers
[]serial ATA (SATA) support
[]intel Piix/ich SATA Support this must be selected, otherwise the boot file cannot be generated
[]via SATA Support
Networking Device Support---> This is the selected network card driver, be sure to select
Ethernet (1000mbit)-& #61664; My computer is a gigabit NIC, so choose this.
[]broadcom Tigon3support
Input Device Support---> This inside to set your mouse keyboard or something
[]provide Legacy/dev/psaux Device
Graphics Support--->
[]support for frame buffer devices supports frame buffer, be sure to select
USB Support--->
[]usb device filesystem This seems to be a USB stick.
[]EHCI HCD (USB 2.0) support has USB2.0 to choose, compiled into modules
[]OHCI HCD support must be selected, compiled into modules
[]uhci HCD (most Intel and VIA) support must be selected, compiled into modules
[]usb Mass Storage support with USB drive must be selected
USB Human Interface Device (full HID) support inside select USB mouse and USB keyboard, if you have to choose this must choose
HID input layer support should be selected
/dev/hiddev Raw HID Device Support if you have USB keyboard and mouse options, be sure to select

Part 11th: Except for the following options, all other deletions
File Systems---> FileSystem
<*> Second Extended FS Support
[*] EXT2 Extended Attributes
[*] Ext2 POSIX Access Control Lists
[*] Ext2 Security Labels
<M> Ext3 journalling File system support
[*] EXT3 Extended Attributes
[*] Ext3 POSIX Access Control Lists
[*] EXT3 Security Labels above these must be selected, Linux standard file system
<M> Kernel automounter Support kernel is automatically mounted, of course, to choose
<M> Kernel Automounter version 4 support (also supports V3) of course Choose
DOS/FAT/NT filesystems--->
<M> DOS FAT FS Support
<M> MSDOS FS Support
<M> VFAT (Windows-95) FS Support
<M> NTFS File System support
Native language support& #61664; language support, English and Chinese support here is OK, not much to say
[]nls ISO 8859-1 must be selected, this is about the USB stick mounted.
Cd-rom/dvd filesystems---> This is about mounting the ISO file, just choose it.
<*> ISO 9660 CDROM File system support
Part 12th: Delete all
Instrumentation support
Part 13th: Delete all
Kernel Hacking---> Crack core? Not a wreck, not a choice.
Part 14th: Delete all
Security Options--->
Part 15th: Delete all
Cryptographic Options---> This is the core encryption-enabled option
Part 16th: Delete all
Library Routines--->




Report:
Kernel configuration
There are many ways to configure the kernel, make config xconfig, makes Menuconfig, makes Oldconfig, and so on, they all have the same function, the difference should be seen from the name Oldconfig refers to the default value of the system's current settings (./.config). This is made menuconfig.
Keep in mind: the more unnecessary the drive, the larger the kernel, not only slow, memory-intensive, and, in rare cases, other problems. The steps are as follows:
First make sure the shell is bash.
And then
$make Menuconfig
There are some default symbols that have the following meanings:
Y: Load
N: Do not load
M: Load as Module

The options you can configure are as follows:
1) Code maturity level option Codes maturity
Prompt for development and/or incomplete code/drivers [n/y/?]
If you're interested in testing some of the modules in the kernel that haven't been finalized yet, choose Y, or N, and you want to know more about the information you choose? You see the online Help (below?) ), n uppercase indicates the default value.

2) processor type and features processor types and features
Processor family (386,486/CX486,586/K5/5X86/6X86,PENTIUM/K6/TSC, PPRO/6X86MX) [PPRO/6X86MX]
[] is the default value, we can choose according to the results of the uname command described earlier. If this item is above 386, then the generated kernel will not start on the 386 machine.
Math emulation (config_math_emulation) [n/y/?]
Do you need a coprocessor emulation? The general machine is back to N. If the machine already has a coprocessor for the hardware, then the kernel will still use the hardware and ignore the software's math-emulation, which will make the kernel become larger and slower.
MTRR (Memory Type Range Register) Support (CONFIG_MTRR) [n/y/? ]
In the Pentium, Pro/pentium Class II system, the image writing speed can be improved.
Symmetric multi-processing Support (CONFIG_SMP) [y/n/? ]
If your machine has multiple processors, select Y. The following enhanced Real time Clock support is selected

3) loadable Model support Loadable module
Enable loadable Module Support (config_modules) [y/n/? ]
The best choice is Y, otherwise many modules that are only dynamically loaded will not work.
Set version information on all symbols for modules (config_modversions) [n/y/? ]
Select n
Kernel Module Loader (config_kmod) [n/y/?]

4) General Setup
Networking Support (config_net) [y/n/?]
Choose Y, now there are several computers do not use the Internet?
PCI Support (CONFIG_PCI) [y/n/?]
PCI bus and devices there's always the right one.
PCI access Mode (Bios,direct,any) [any]
The default value is more insured, but if you have confidence in your motherboard, select the BIOS.
PCI Quirks (config_pci_quirks) [y/n/?]
For patching bugs that have an impact on PCI in the BIOS, also, if you have confidence in the motherboard, choose N.
backward-compatible/proc/pci〉 (Config_pci_old_proc) [y/n/?]
The previous kernel uses/PROC/PCI, the new kernel uses/PROC/BUS/PCI, and to maintain compatibility, select Y.
MCA Support (CONFIG_MCA) [n/y/?]
Check out the Help.
SGI Visual Workstation Support (CONFIG_VISWS) [n/y/?]
Is your machine SGI? Yes, just choose Y.
System V IPC (CONFIG_SYSVIPC) [y/n/?]
interprocess communication functions and system calls. One of the five main components of the Linux kernel, be sure to choose.
BSD Process Accounting (CONFIG_BSD_PROCESS_ACCT) [n/y/?]
Used to initiate a user-level system call to write process information to a file by the kernel. Just see if you want to use it.
Sysctl Support (CONFIG_SYSCTL) [y/n/?]
Modify the kernel while the kernel is running. 8KB space in exchange for some kind of convenience. Don't choose, unless you really want to try.
Kernel support for a.out binaries (config_binfmt_aout) [y/m/n/?]
To be able to use a previously compiled program, select Y.
Kernel support for ELF binaries (config_binfmt_elf) [y/m/n/?]
To be able to use the currently compiled program, select Y.
Kernel support for MISC binaries (config_binfmt_misc) [y/m/n/?]
General Select Y to support automatic execution of code such as Java.
Parallel Port Support (config_parport) [n/y/m/?]
The same-mouth devices, such as printers.

5) Plug and Play support for Plug and Play devices
Plug and Play Support (CONFIG_PNP) [n/y/?]
Choose Y.

6) block Devices blocks equipment
Normal PC Floppy disk support (CONFIG_BLK_DEV_FD) [y/m/n/?]
General floppy drive. Select Y.
Enhanced Ide/mfm/rll disk/cdrom/tape/floppy Support (config_blk_dev_ide) [y/m/n/?]
These types of interfaces are hard drives, optical drives, tapes, floppy drive. Select Y.
Include Ide/atapi CDROM Support (CONFIG_BLK_DEV_IDECD) [y/m/n/?]
CDROM. Select Y.

7) Networking Options Network option
Packet socket (config_pachet) [y/m/n/?]
According to the current situation of network development, choose Y better. Of course, you can choose other.
Kernel/user NetLink Socke (config_netlink) [n/y/?]
The kernel communicates with the user process in two directions. Select Y.
Network firewalls (config_firewall) [n/y/?]
If you really need a firewall, choose Y.
UNIX domain Sockets (confgi_unix) [y/m/n/?]
There are too many uses for sockets. Select Y.
TCP/IP networking (config_inet) [y/n/?]
Choose y for the same reason as the previous article.
The IPX Protocol (CONFIG_IPX) [n/y/m/?]
In fact, not so many people really need to use or learn IPX, so generally choose N.
Appletalk DDP (config_atalk) [n/y/m/?]
Choose n for the same reason.

8) SCSI support SCSI supported, SCSI low-level drives SCSI low-level driver
Depending on the actual situation of the SCSI device in the system.

9) Networking Device Support network devices
If you use LAN Internet, select the network card;
If the modem dial the Internet, it is necessary to see the ISP provide that kind of service, is generally PPP.

Amateur Radio Support Amateur Radio
This is what I don't quite know, so choose N.

ISDN Subsystem ISDN Subsystem
It seems that there is a modem to support ISDN, so it is better to first look at their modem is not this, and then make the choice.

Old CD-ROM dfivers (not SCSI, not IDE) older optical drive
Generally choose N, because this equipment is very rare.

Character Devices character device
Virtual Terminal (CONFIG_VT) [y/n/?]
Linux generally can use ALT+F1/F2/F3/F4 to switch between different task terminals, even on a computer can fully use the Linux multi-tasking ability, some need to install the appropriate software in the command line if there is a virtual terminal support will be more convenient, so choose Y.
Support for console on virtual terminal (config_vt_console) [y/n/?]
Select Y to support a virtual terminal as the console. It is generally alt+f1.
Support for console on serial port (config_serial) [y/m/n/?]
Unless you really need a serial console, choose N.
Extended Dumb serial driver Options (config_serial_extended) [n/y/?]
If you want to use non-standard features of "dumb" (such as HUB6 support), choose Y, which is generally n.
Non-standard serial port Support (config_serial_nonstandard) [n/y/?]
Non-standard serial port. Generally select N.
UNIX98 PTY Support (config_unix98_ptys) [y/n/?]
Pty refers to pseudo-terminal, the general user is selected N. However, if you want to use Telnet or xterms as the terminal to access the host, and has installed the glibc2.1, you can choose Y.
Maximum number of UNIX98 ptys in use (0-2048) (Config_unix98_pty_count) [256]
The default value is available.
Mouse Support (not serial mice) (config_mouse) [y/n/?]
PS/2 and other non-serial mouse select Y, otherwise select N.

Mice mouse
Choose according to your own mouse type.

) Video for Linux Linux
Select according to the audio/video capture device in the system.

(Joystick) Support joystick
Based on the joystick device selection in the system

Ftape,the floopy Tape device driver Ftape equipment driver
Ftape (Qic-80/travan) Support (config_ftape) [n/y/m/?]
If there is a tape drive in the system, select Y.

) filesystems File System
File system selection is more careful, as some of these provide support for some system functions. In addition to Proc, ext2 and other file systems, other file systems (including the following network file system) can be selected as M mode, thereby reducing the size of the kernel boot.
Quota Support (Config_quota) [n/y/?]
Used to divide the user into quantitative disk space. If you do not use this feature, select N.
DOS FAT FS Support (CONFIG_FAT_FS) [n/y/m/?]
With FAT support for the kernel, it is possible for most users to access Windows hard disk space on the same system from Linux, so it is best to select Y.
ISO 9660 CDROM filesystem Support (CONFIG_ISO9660_FS) [y/m/n/?]
A system with a standard optical drive should select Y.
Minix FS Support (CONFIG_MINIX_FS) [n/y/m/?]
The file system used to create the startup disk, most of which should be Y or M.
/proc filesystem Support (CONFIG_PROC_FS) [y/n/?]
Virtual file system, y must be selected.
Second Extended FS Support (CONFIG_EXT2_FS) [y/m/n/?]
Linux standard file system, you should choose Y.

Network File Systems
Coda FileSystem Support (Advanced network FS) (CONFIG_CODA_FS) [n/y/m/?]
First look at help and then choose.
NFS filesystem Support (CONFIG_NFS_FS) [y/m/n/?]
Select Y or N to access the remote NFS file system.
SMB filesystem Support (to mount WfW shares etc) (CONFIG_SMB_FS) [n/y/m/?]
Select Y to access shared resources in the Windows system.
NCP filesystem Support (to Mout NetWare volumes) (CONFIG_NCP_FS) [n/y/m/?]
If you really need to access the NetWare file system, choose Y or M.

Partion Types Partition type
generally not used; Please refer to the help.

Console drivers Control Console drive
VGA Text Console (config_vga_console) [y/n/?]
Use the VGA mode to operate Linux in the text mode, generally choose Y.
Video mode selection Support (config_video_select) [n/y/?]
This feature is not required for most systems.

() Sound
Sound card support (config_sound) [n/y/m/?]
If you have a sound card installed on your system, select Y (or M), and then review the help.

Kernel Hacking Core Monitoring
Kernel hacking tend to generate very large or very slow (even large and slow) kernels, which can even cause the kernel to work unstable. If you must choose, it is also best not to choose the "development", "experimental", "Debugging" items.

Specific steps for Linux kernel cropping

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.