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.
Currently init_args can't use any of the parameters from the left part of `--' in kernel cmdline.
For example: root=/dev/sda console=ttyS0 arg1 arg2=1 -- arg3 arg4=1:
arg1 and arg2 can not be passed to init programs.
We can use environment variables and initramfs arguments instead of /proc/cmdline to determine init_args.
Currently
init_argscan't use any of the parameters from the left part of `--' in kernel cmdline.For example:
root=/dev/sda console=ttyS0 arg1 arg2=1 -- arg3 arg4=1:arg1andarg2can not be passed to init programs.We can use environment variables and initramfs arguments instead of
/proc/cmdlineto determineinit_args.