Article Title: comprehensively parse the main configurations of the Linux kernel. 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.
The command to configure the kernel is:
# Make config text configuration method
# Make menuconfig menu Configuration
# Make xconfig graphical interface configuration
We can use any command to configure the kernel. We generally recommend using make menuconfig to configure the kernel.
I. Code maturity options
Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
[*] Select only drivers expected to compile cleanly
|
Some immature code and functions are included in the kernel. To use these functions and enable related configuration options, you must enable this option.
II. General settings
General setup --->
() Local version - append to kernel release
[*] Automatically append version information to the version string
[*] Support for paging of anonymous memory (swap)
[*] System V IPC
[*] POSIX Message Queues
[*] BSD Process Accounting
[*] BSD Process Accounting version 3 file format
[*] Sysctl support
[ ] Auditing support
[*] Support for hot-pluggable devices
[*] Kernel Userspace Events
[*] Kernel .config support
[*] Enable access to .config through /proc/config.gz
() Initramfs source file(s)
[*] Configure standard kernel features (for small systems) --->
--- Configure standard kernel features (for small systems)
[ ] Load all symbols for debugging/kksymoops
[ ] Do an extra kallsyms pass
[ ] Enable support for prinlk
[ ] BUG()support
[ ] Enable full-sinzed data structures for core
[*] Enable futex support
[*] Enable eventpoll support
[*] Optimize for size
[*] Use full shmem filesystem
(0) Function alignment
(0) Label alignment
(0) Loop alignment
(0) Jump alignment
|
Local version-append to kernel release: enter a string of less than 64 characters. You can use the uname-a command to check the string you entered here.
Support for paging of anonymous memory (swap): this is to use swap partition or swap file as the virtual memory, of course, you have to choose.
System v ipc: Inter Process Communication of System 5, which is used by the processor to synchronize and exchange information between programs. If this option is not selected, many programs cannot run.
POSIX Message Queues: This is a POSIX Message queue, which is also an IPC. We recommend that you select it.
BSD Process Accounting: This allows the user Process to access the kernel and write account information into the file. This is generally considered a good idea. It is recommended that you select it.
Sysctl support: This option does not recompile the kernel to modify some kernel parameters and variables. If you also choose to support/proc, it will be able to access the parameters or variables that affect the kernel from/proc/sys. We recommend that you select it.
Auditing support: audit support, used to work with some sub-modules of the kernel, such as SELinux. Only this item and its subitem can be selected to call the system call for review.
Support for hot-pluggable devices: Select whether hot swapping is supported. Otherwise, neither USB nor PCMCIA can be used.
Kernel Userspace Events: the Kernel is divided into the system zone and user zone. In this example, the system zone and user zone are used for communication.
Kernel. config support: Save the. config configuration information in the Kernel. Select it and its sub-item so that other users can get the Kernel configuration from/proc.
Configure standard kernel features (for small systems): This is used to compile some special kernels. You can choose not to select this option, and you do not have to worry about its subitems.
Load all symbols for debugging/kksymoops: whether to Load all the debugging symbol table information. If you do not need to debug the kernel, do not select this option.
Enable futex support: if you do not select this kernel, you may not run the program using glibc correctly.
Enable eventpoll support: If this kernel is not selected, the system call of event polling is not supported.
Optimize for size: This option enables gcc to use the-OS parameter instead of the-O2 parameter to Optimize compilation to obtain a smaller kernel. We recommend that you choose this option.
Use full shmem filesystem: do not select this option unless you have a small amount of memory and do not Use swap memory.
The following four items are alignment in the memory during compilation. 0 indicates the default mode of the compiler. The use of memory matching can increase the running speed of the program, but will increase the memory usage of the program.
Iii. modules that can be loaded
Loadable module support --->
[*] Enable loadable module support
[*] Module unloading
[ ] Forced module unloading
[*] Module versioning support (EXPERIMENTAL)
[ ] Source checksum for all modules
[*] Automatic kernel module loading
|
Enable loadable module support. Many people prefer to compile all functions and hardware into the kernel, instead of using modules. This is very bad (in my opinion ). In fact, I have also done embedded development. I try to make the kernel as small as possible on a specific hardware platform and will always support module loading. For example, the firewall we developed is loaded as a kernel module. With module support, your system can be better scalable. Another reason is the function module and Device Driver Module compiled by myself (assuming the writing quality is not high) the probability that the Kernel Panic is working in the module mode is much lower than that in which all modules are not supported to be compiled into the Kernel. After talking so much, we can finally choose this function with confidence.
[1] [2] [3] [4] Next page