Skip to content
Snippets Groups Projects
Forked from postmarketOS / pmaports
152 commits behind the upstream repository.
Caleb Connolly's avatar
Casey authored
Currently the initramfs is littered with various code snippets which
read /proc/cmdline. This is error prone and results in more complicated
code especially as we want to standardise all the pmos specific cmdline
arguments, and where some arguments have the same behaviour as
deviceinfo variables.

Let's do the parsing correctly, once, and set global variables to
enable/disable/configure parts of the initramfs. At the same time
introduce namespaced and standard versions of the remaining arguments
which haven't been standardised yet.

Now (for example) to check if the splash is disabled, rather than
grepping /proc/cmdline for PMOS_NOSPLASH AND checking if
deviceinfo_no_framebuffer is true, you can just check if "$nosplash" =
"y".

This will drastically simplify the process of adding additional
configuration options in the future.

Most of the code here was taken from the Arch Linux initramfs and
simplified/adjusted to better fix our use case.

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
Part-of: !6172
8400fffe
History