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: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
This adds a default preset for user units, that disables them by
default. This behavior is identical to what we do with system presets,
which means that if we want a unit enabled by default then we need
to add a preset for it or rely on some other unit to pull it in
automatically. Without this default preset, user units are enabled by
default when `systemctl preset` is run on them, which may not always be
the desired behavior (i.e. we don't want this behavior with system units).
Add starqltechn initfs modules, recently enabled in linux kernel.
This provides touchscreen and haptics support when in initramfs.
This allows to use onscreen keyboard in initramfs debug mode.
Get dbus building in edge again. This regressed due to the cross-native2
work in pmb which stopped using abuild to install makedepends and does
it in pmb instead. But pmbootstrap's parsing logic can't handle
conditions in the APKBUILD.
Related: issue 3604
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:skip-build]: already built successfully in CI
Our epiphany got blocked by https://gitlab.gnome.org/ due to their new
AI scraping protection. We used a older User-agent that is not
regocnized by their protection and blocked us with "Access Denied.".
Nowadays Epiphany uses a dynamic user agent by default depending on the
chassis reported by systemd-hostnamed (e.g. mobile or desktop).
Fixes: 2722f6cac5 ("main/postmarketos-ui-{gnome,phosh}: less revealing epiphany user-agent (MR 1402)")
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6293
[ci:skip-build]: already built successfully in CI
The thermal monitor measures an NTC thermistor which decreases voltage
when the temperature increases.
When fixing the scaling for the first time, a wrong division by 20 was
removed. The voltage code was still high by a factor of 28900/16384,
enough that the thermal monitor constantly signalled/interrupted at a
low voltage/high temperature trip point. The thermal monitor still
reports the correct temperature so the kernel keeps the wrong trip
points and lets the thermal monitor keep interrupting 1000 times/sec.
Fix the other scaling amount so the thermal monitor sends interrupts at
the right temperature (with some imprecision).
Set CGO_ENABLED=1 to fix the following when cross compiling with
cross-native2 from x86_64 to (armv7,riscv64,armhf):
-buildmode=pie requires external (cgo) linking, but cgo is not enabled
Depends: pmbootstrap MR 2565
Related: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15809
Don't run mkinitfs inside "pmbootstrap install" with the trigger
script, as it triggers multiple times as the rootfs gets constructed,
slowing down the process. Instead, pmbootstrap runs "mkinitfs"
explicitly once at the end of "pmbootstrap install".
pmaports master has pmbootstrap_min_version=2.3.2 in pmaports.cfg, which
already runs "mkinitfs" at the end of "pmbootstrap install", see
pmb/install/_install.py, install_system_image().