Skip to content

Use environment variable and parameters for init_args #43

@YukariChiba

Description

@YukariChiba

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions