The kernel’s command-line parameters(1)

Time

2020.10.15

Summary

Research Objective

Problem Statement

Method(s)

Evaluation

Conclusion

Notes

kernel parameters as implemented by the __setup(), core_param() and module_param()

The kernel parses parameters from the kernel command line up to “--“; if it doesn’t recognize a parameter and it doesn’t contain a ‘.’, the parameter gets passed to init: parameters with ‘=’ go into init’s environment, others are passed as command line arguments to init. Everything after “--” is passed as an argument to init.
内核从内核命令行解析参数直至“-”; 如果它不能识别参数并且不包含“。”,则该参数将传递给init:带有“ =”的参数进入init的环境,其他参数则作为命令行参数传递给init。 “-”之后的所有内容均作为init的参数传递。

Module parameters can be specified in two ways: via the kernel command line with a module name prefix, or via modprobe, e.g.:

Hyphens (dashes) and underscores are equivalent in parameter names, so:
log_buf_len=1M print-fatal-signals=1
can also be entered as:
log-buf-len=1M print_fatal_signals=1

The command “modinfo -p ({modulename}” shows a current list of all parameters of a loadable module.Loadable modules, after being loaded into the running kernel, also reveal their parameters in /sys/module/){modulename}/parameters/. Some of these parameters may be changed at runtime by the command echo -n ({value} > /sys/module/){modulename}/parameters/${parm}.

The parameters listed below are only valid if certain kernel build options were enabled and if respective hardware is present.
仅当启用了某些内核构建选项且存在相应的硬件时,以下列出的参数才有效。

Words

consolidated
综合的
ascending order
升序
square brackets
方括号

Sentence

原文地址:https://www.cnblogs.com/call-me-dasheng/p/13823475.html