mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 12:04:27 +01:00
Fixed some page entries
This commit is contained in:
13
README.adoc
13
README.adoc
@@ -3435,10 +3435,10 @@ at the very end of the boot logs.
|
|||||||
|
|
||||||
=== Init environment
|
=== Init environment
|
||||||
|
|
||||||
Documented at https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html[]:
|
Documented at https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html[]:
|
||||||
|
|
||||||
____
|
____
|
||||||
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.
|
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.
|
||||||
____
|
____
|
||||||
|
|
||||||
And you can try it out with:
|
And you can try it out with:
|
||||||
@@ -3450,7 +3450,7 @@ And you can try it out with:
|
|||||||
From the <<dry-run,generated QEMU command>>, we see that the kernel CLI at LKMC 69f5745d3df11d5c741551009df86ea6c61a09cf now contains:
|
From the <<dry-run,generated QEMU command>>, we see that the kernel CLI at LKMC 69f5745d3df11d5c741551009df86ea6c61a09cf now contains:
|
||||||
|
|
||||||
....
|
....
|
||||||
init=/lkmc/linux/init_env_poweroff.out console=ttyS0 - lkmc_home=/lkmc asdf=qwer zxcv
|
init=/lkmc/linux/init_env_poweroff.out console=ttyS0 -- lkmc_home=/lkmc asdf=qwer zxcv
|
||||||
....
|
....
|
||||||
|
|
||||||
and the init program outputs:
|
and the init program outputs:
|
||||||
@@ -3458,14 +3458,13 @@ and the init program outputs:
|
|||||||
....
|
....
|
||||||
args:
|
args:
|
||||||
/lkmc/linux/init_env_poweroff.out
|
/lkmc/linux/init_env_poweroff.out
|
||||||
-
|
lkmc_home=/lkmc
|
||||||
|
asdf=qwer
|
||||||
zxcv
|
zxcv
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HOME=/
|
HOME=/
|
||||||
TERM=linux
|
TERM=linux
|
||||||
lkmc_home=/lkmc
|
|
||||||
asdf=qwer
|
|
||||||
....
|
....
|
||||||
|
|
||||||
Source: link:userland/linux/init_env_poweroff.c[].
|
Source: link:userland/linux/init_env_poweroff.c[].
|
||||||
@@ -6089,7 +6088,7 @@ See also:
|
|||||||
* https://unix.stackexchange.com/questions/48601/how-to-display-the-linux-kernel-command-line-parameters-given-for-the-current-bo
|
* https://unix.stackexchange.com/questions/48601/how-to-display-the-linux-kernel-command-line-parameters-given-for-the-current-bo
|
||||||
* https://askubuntu.com/questions/32654/how-do-i-find-the-boot-parameters-used-by-the-running-kernel
|
* https://askubuntu.com/questions/32654/how-do-i-find-the-boot-parameters-used-by-the-running-kernel
|
||||||
|
|
||||||
The arguments are documented in the kernel documentation: https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html
|
The arguments are documented in the kernel documentation: https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
|
||||||
|
|
||||||
When dealing with real boards, extra command line options are provided on some magic bootloader configuration file, e.g.:
|
When dealing with real boards, extra command line options are provided on some magic bootloader configuration file, e.g.:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user