diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2014-05-13 21:03:45 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-05-13 21:20:05 -0400 |
commit | 5888bcc5d24acf911c3d12719d72968c9b27a02f (patch) | |
tree | 01922824fccde5ebddb353d737c13379c32cc96a | |
parent | 51e158c12aca3c9ac63988611a97c05109b14dc9 (diff) |
Documentation: Update kernel-parameters.tx
1) __setup() is messy, prefer module_param and core_param.
2) Document --
3) Document modprobe scraping /proc/cmdline.
4) Document handing of leftover parameters to init.
5) Document use of quotes to protect whitespace.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | Documentation/kernel-parameters.txt | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 43842177b771..a42b9dd6b46b 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1,27 +1,37 @@ | |||
1 | Kernel Parameters | 1 | Kernel Parameters |
2 | ~~~~~~~~~~~~~~~~~ | 2 | ~~~~~~~~~~~~~~~~~ |
3 | 3 | ||
4 | The following is a consolidated list of the kernel parameters as implemented | 4 | The following is a consolidated list of the kernel parameters as |
5 | (mostly) by the __setup() macro and sorted into English Dictionary order | 5 | implemented by the __setup(), core_param() and module_param() macros |
6 | (defined as ignoring all punctuation and sorting digits before letters in a | 6 | and sorted into English Dictionary order (defined as ignoring all |
7 | case insensitive manner), and with descriptions where known. | 7 | punctuation and sorting digits before letters in a case insensitive |
8 | 8 | manner), and with descriptions where known. | |
9 | Module parameters for loadable modules are specified only as the | 9 | |
10 | parameter name with optional '=' and value as appropriate, such as: | 10 | The kernel parses parameters from the kernel command line up to "--"; |
11 | 11 | if it doesn't recognize a parameter and it doesn't contain a '.', the | |
12 | modprobe usbcore blinkenlights=1 | 12 | parameter gets passed to init: parameters with '=' go into init's |
13 | 13 | environment, others are passed as command line arguments to init. | |
14 | Module parameters for modules that are built into the kernel image | 14 | Everything after "--" is passed as an argument to init. |
15 | are specified on the kernel command line with the module name plus | 15 | |
16 | '.' plus parameter name, with '=' and value if appropriate, such as: | 16 | Module parameters can be specified in two ways: via the kernel command |
17 | 17 | line with a module name prefix, or via modprobe, e.g.: | |
18 | usbcore.blinkenlights=1 | 18 | |
19 | (kernel command line) usbcore.blinkenlights=1 | ||
20 | (modprobe command line) modprobe usbcore blinkenlights=1 | ||
21 | |||
22 | Parameters for modules which are built into the kernel need to be | ||
23 | specified on the kernel command line. modprobe looks through the | ||
24 | kernel command line (/proc/cmdline) and collects module parameters | ||
25 | when it loads a module, so the kernel command line can be used for | ||
26 | loadable modules too. | ||
19 | 27 | ||
20 | Hyphens (dashes) and underscores are equivalent in parameter names, so | 28 | Hyphens (dashes) and underscores are equivalent in parameter names, so |
21 | log_buf_len=1M print-fatal-signals=1 | 29 | log_buf_len=1M print-fatal-signals=1 |
22 | can also be entered as | 30 | can also be entered as |
23 | log-buf-len=1M print_fatal_signals=1 | 31 | log-buf-len=1M print_fatal_signals=1 |
24 | 32 | ||
33 | Double-quotes can be used to protect spaces in values, e.g.: | ||
34 | param="spaces in here" | ||
25 | 35 | ||
26 | This document may not be entirely up to date and comprehensive. The command | 36 | This document may not be entirely up to date and comprehensive. The command |
27 | "modinfo -p ${modulename}" shows a current list of all parameters of a loadable | 37 | "modinfo -p ${modulename}" shows a current list of all parameters of a loadable |