Commit graph

2415 commits

Author SHA1 Message Date
Caleb Connolly
7c98127746
postmarketos-initramfs: switch to udev and kmod (MR 5000)
mdev is slow and missing features, it also requires that we load all the
modules that we include at once making the boot process slower.

udev is required for unl0kr (and buffyboard), it can also load modules
on demand (and asynchronously). Making the boot process considerably
faster on devices, especially for generic images where we have lots of
drivers for different display panels in the initramfs.

Additionally, import full fat modprobe from the kmod package, this is
required to support compressed modules.

This brings us more in line with other distros and generally improves
compatibility.

If devices use broken kernel modules which don't correctly define
modalias', these drivers may not be loaded by udev. This should be fixed
by defining the missing modalias statements in the driver.

This also runs udev earlier in the init, so that display drivers are
loaded before the splash in case they are needed.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>

[ci:ignore-count]
[ci:skip-build]: already built successfully in CI
2024-06-18 12:35:05 -07:00
Caleb Connolly
dd28314ba2
postmarketos-initramfs: debug-shell 3.0 (MR 5000)
This incorprates the debug-shell functionality directly into the
initramfs, so it's no longer necessary to build and boot a custom
initramfs in order to debug your device.

Additionally, the behaviour of the debug-shell is entirely reworked, It
now creates an ACM serial gadget which can be accessed via any normal
terminal emulator (picocom, minicom, etc; or PuTTY on windows). Rather
than just invoking sh, the debug-shell now creates a respawning getty on
both the new virtual console and the active console (this will either be
the UART console or tty0/1).

It is necessary to spawn these shells via getty since the logging rework
means we can no longer assume that stdin/out/err reference a TTY.

In addition to the above, it is now possible to trigger a log dump by
holding volume up during boot. This can be useful for helping users
debug their devices if the issue doesn't result in a failure that can be
detected in the initramfs.

With these changes, the console-shell and debug-shell hook packages are
reduced to only adding the additional tools/features. console-shell is
still required for fbkeyboard, and debug-shell for the setup_usb_storage
tool.

Co-Developed-by: Clayton Craft <craftyguy@postmarketos.org>
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:05 -07:00
Caleb Connolly
f66238f045
postmarketos-initramfs: handle empty hooks dir (MR 5000)
For some reason globbing doesn't work properly for empty directories,
adjust the check in run_hooks to ensure the directory both exists and
contains something, otherwise we get an error about
"/hooks-cleanup/*.sh" not existing.

/ # mkdir blah
/ # for x in blah/*; do echo $x; done
blah/*
/ # touch blah/beep
/ # for x in blah/*; do echo $x; done
blah/beep

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:05 -07:00
Caleb Connolly
5a27482c20
postmarketos-initramfs: depend on mdevd (MR 5000)
I somehow hit a case where this wasn't installed and
/lib/mdev/persistent-storage wasn't available. Let's just explicitly
depend on mdevd...

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:05 -07:00
Caleb Connolly
51cde04a4b
main/iskey: new aport (MR 5000)
iskey is a tiny tool that reports if any of the given keys are pressed.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:05 -07:00
Caleb Connolly
118a30935e
postmarketos-initramfs: mount subpartitions after hooks (MR 5000)
This step is the most likely to go wrong or have issues, and it has side
effects which can make it difficult to run multiple times on one boot.
Move it to after hooks so that e.g. when dropping to a debug shell, we
land before the first call.

This also makes booting to hooks a faster in many cases.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:05 -07:00
Caleb Connolly
5dcb7aab62
postmarketos-initramfs: use dd to allocate logs image (MR 5000)
fallocate seems to cause some strange behaviour where the logs.img file
is treated like it's empty. Given it's small and in a ramdisk let's just
create it with dd instead.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:04 -07:00
Caleb Connolly
709768214c
postmarketos-initramfs: check if UDC is configured before clearing (MR 5000)
This fixes the annoying "sh: write error" and "Couldn't write to clear
UDC" messages that happen on every single boot.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:04 -07:00
Caleb Connolly
75613d9f69
postmarketos-initramfs: make CONFIGFS global (MR 5000)
This variable is being used in more places, just make it global.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:04 -07:00
Caleb Connolly
95b22138c4
postmarketos-initramfs: log to kernel ringbuffer (MR 5000)
Rework logging to always log the initramfs output to the kernel
ringbuffer and deprecate PMOS_NO_OUTPUT_REDIRECT in favour of following
the kernel loglevel.

I know it seems silly to use syslogd for this, but it's necessary to
buffer writes to /dev/kmsg per-line if we want to correctly set the log
level, and "tee" does not do this (it will write multiple lines at once,
resulting in "<14>" prints in the ringbuffer). The main advantage to
this is that we won't have kernel logs cut in half by initramfs logs
anymore, everything will be nicely line buffered!

The previous logging solution of multiple "tail" commands would actually
fail to log up to the last few lines before a crash due to how tail
works (it polls the file and buffers lines).

I attempted something like this before, but I stopped after running into
ratelimiting issues. These are now resolved by configuring the
printk_devkmsg sysctl.

Dropping PMOS_NO_OUTPUT_REDIRECT:

The general motivations behind PMOS_NO_OUTPUT_REDIRECT was to avoid
cluttering up the console with initramfs logs when they aren't wanted;
this is now handled instead by the kernels logging facility. We log to
the ringbuffer at LOGLEVEL_INFO, so if "quiet" is specified on the
cmdline (or the loglevel is otherwise set above info) then initramfs
logs will also not be shown.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:04 -07:00
Caleb Connolly
6c799ac4f6
postmarketos-initramfs: fork -minimal variant (MR 5000)
We plan to make a lot of changes to the initramfs which will require
incresaing the size. There are some devices that have literally no free
space for this, so make a -minimal initramfs fork that can continue to
support those while we update the regular initramfs.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:34:59 -07:00
Pablo Correa Gómez
8a7042faf6
main/postmarketos-base-ui-gnome: replace evince with papers (MR 5234)
papers is now in community in alpine, and is the GTK4
replacement. Current main version (still not available in alpine),
fits phone screens, but makes sense to change it already now.

Relates #1479

[ci:skip-vercheck] changes are in pmb_recommends
[ci:skip-build]: already built successfully in CI
2024-06-17 17:54:18 +02:00
Clayton Craft
c2f7be3cec
main/postmarketos-base-ui: drop pulseaudio wireplumber config (MR 5225)
This was upstreamed to Alpine aports, see aports@cc2f22db473
2024-06-12 10:40:57 +03:00
Pablo Correa Gómez
d375a5d75d
main/postmarketos-base-ui: add pipewire-spa-bluez to pipewire-audio (MR 5163)
And configure any modem to be able to use it, so that we can keep
controlling things like bluetooth headsets, and take phone calls from a
car.

[ci:skip-build]: already built successfully in CI
2024-06-11 11:20:10 +02:00
Clayton Craft
d46d5855be
main/postmarketos-ui-phosh: drop hardcoded dependency on pulseaudio (MR 5203)
This allows users to test out pipewire audio on phosh. Currently the
default audio backend is pulseaudio. This is configured in pmos-base-ui.

fixes #2013
[ci:skip-build]: already built successfully in CI
2024-06-06 12:42:03 +02:00
SSD
086078ded7
main/postmarketos-initramfs: fix stowaway (MR 5206)
I have noticed a bug. Because is some cases, uuid for the boot partition is set, it won't reach logic for the stowaway.

[ci:skip-build]: already built successfully in CI
2024-06-06 11:12:48 +02:00
Willow Barraco
c5ca6732a0
main/postmarketos-base-ui-cage: add CAGE_UI_ARGS (MR 5168)
Usefull to pass arguments to the cage exec program.

[ci:skip-build]: already built successfully in CI
2024-06-05 22:43:45 +02:00
mae
61133a23ae
main/msm-fb-refresher: move cleanup from initramfs into msm-fb-refresher (MR 5191)
[ci:skip-build]: already built successfully in CI
2024-06-04 20:46:50 +02:00
mae
25ad7892a1
main/postmarketos-mkinitfs-hook-debug-shell: Cleanup debug-shell telnet server (MR 5191)
Moved the cleanup code from initramfs
2024-06-04 20:46:50 +02:00
mae
ebd351c346
main/postmarketos-initramfs: Allow packages to define cleanup hooks (MR 5191) 2024-06-04 18:44:34 +00:00
Clayton Craft
45dec6cc73
pmos-base-ui: re-enable DNS filtering (MR 4846)
Alpine aports will have a patch[1] to fix the bug this was working around,
so let's re-enable it.

This reverts commit 4dac896160.

1. https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/61103

fixes #2601

Also see #1430
2024-06-04 09:42:33 -07:00
Alexey Minnekhanov
c9bab638d4
main/lk2nd: upgrade to 0.16.0 (MR 5197)
Latest release of "old" lk2nd.

Release notes:
- msm8974 improvements
- New variants for few Samsung devices, some renames
- Added Lenovo Vibe K5 variants

New devices:
- Vivo Y21L
- Motorola Moto G 4G
- Huawei G7 Plus
- Samsung Galaxy On7 2015 (SM-G600FY)
- HTC One M8
- Samsung G360T

Added big patch to fix compile errors with gcc-14.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
[ci:skip-build]: already built successfully in CI
2024-06-03 22:56:04 -07:00
Johannes Marbach
96148a6213
main/unl0kr: upgrade to 3.2.0 (MR 5198)
[ci:skip-build]: already built successfully in CI
2024-06-04 07:46:34 +02:00
Oliver Smith
33dd515af3
main/postmarketos-ui-sxmo-*: add wallpaper (MR 5195)
Add postmarketos-artwork-wallpapers to _pmb_recommends, so Sxmo shows
the postmarketOS wallpaper.

Related: https://todo.sr.ht/~mil/sxmo-tickets/602
Related: pmaports issue 2499
[ci:skip-build]: already built successfully in CI
2024-06-02 21:58:01 +02:00
Willow Barraco
83284e5749
main/postmarketos-ui-sxmo-de-*: use downgraded conky (MR 5195) 2024-06-02 21:47:36 +02:00
Oliver Smith
0059607677
main/postmarketos-artwork: set plasma wallpaper (MR 5186)
Set the postmarketOS wallpaper as default for Plasma Mobile and Plasma
Desktop, so we can change it across all UIs with every postmarketOS
release.

It would be nice if we could just set the wallpaper with a simple config
file (reported https://bugs.kde.org/show_bug.cgi?id=487816). Until that
is possible, use a shell script as workaround.

Copy the contents dir and metadata.json file explicitly, instead of
copying the entire "meadow" directory. With this change we avoid copying
meadow.svg, which fixes two issues:
* This file doesn't have a stable name, when we switch to the next
  wallpaper and the user had selected it, the wallpaper will just be
  gone instead of automatically switching to the new wallpaper.
* It shows up as broken wallpaper in Plasma's wallpaper selection.

[ci:skip-build]: already built successfully in CI
2024-06-02 19:37:43 +02:00
Oliver Smith
06f761e972
main/postmarketos-release-upgrade: upgrade to 1.7.0 (MR 5193)
[ci:skip-build]: already built successfully in CI
2024-06-02 17:01:25 +02:00
Clayton Craft
393250f826
main/postmarketos-mkinitfs: upgrade to 2.5.0 (MR 5183)
- Add support for systems with merged /usr (MR 39)
 - Improve support for deviceinfo format (MR 52)
 - Add support for systemd (MR 51)
 - Document archive compression formats/levels (MR 50)

[ci:skip-build] already built successfully in CI
2024-05-31 12:05:07 -07:00
Clayton Craft
53407e5203
main/postmarketos-base-ui-gnome: systemd-related service fixes (MR 5184)
- Fix MM and NM service unit names
- drop iio-sensor-proxy, seems to be dbus activated

[ci:skip-build]: already built successfully in CI
2024-05-29 17:23:56 -07:00
Clayton Craft
0a4c05863e
main/postmarketos-ui-plasma-mobile: autostart modemmanager (MR 5184) 2024-05-29 17:23:56 -07:00
Clayton Craft
e979d5e79e
main/postmarketos-base-ui-plasma: various systemd service fixes (MR 5184)
- fix NM unit name
- relocate an errant -openrc pkg
- remove iio-sensor-proxy from service autostart on systemd, it appears
  that this is dbus activated (inspected the .service file, no `Install`
  section and using dbus directive)
2024-05-29 17:23:44 -07:00
Clayton Craft
59b83d7847
main/postmarketos-ui-*: remove hardcoded dependency on pulseaudio (MR 5145)
This allows the audio switching backend stuff to work on all UIs (see
!5072 / 87d355e08). For example, users of any UI can switch audio
backends by installing one of the pmos-base-ui-audio-* metapackages.

[ci:skip-build] already built successfully in CI
2024-05-28 13:15:59 -07:00
Clayton Craft
96e61da7a2
main/postmarketos-base-ui: audio backend improvements (MR 5145)
- Merge pulseaudio and audio-pulse subpkgs
  Just general cleanup, there's no reason to have a separate pulseaudio
  subpackage now since both were being installed anyways (one indirectly
  depended on the other)

- Add 'none' option for audio backend
  Some users might not want to have an audio backend installed taking
  up disk space. For example they're running a headless server or just
  don't want audio I/O, and PA + dependencies, which include mesa(!!)
  can be a lot... I measured 208MB

Note about drop the pulseaudio subpkg and it's "provides="...
This was done in 6e325417, when pmos-base-ui was split off from
pmos-base (3 years ago). I'm not sure how many people are still rocking
a 3yo pmOS install, but the original package (see 92e43e83) was only
pulled in by install_if, so I think the chance that it's in someone's
world file would be really really low.
2024-05-28 13:15:55 -07:00
Clayton Craft
d20a7944bf
main/postmarketos-base-ui-gnome: add weather app to pmb_recommends (MR 5149)
[ci:skip-build] already built successfully in CI
[ci:skip-vercheck]
2024-05-28 12:07:42 -07:00
Clayton Craft
564429192e
main/postmarketos-ui-gnome: add snapshot to recommends (MR 5149)
Snapshot is a useful camera app, currently only useful on webcams and
that's why I added it here and not in the base-ui-gnome package
2024-05-28 11:17:20 -07:00
Clayton Craft
1f32b78940
main/postmarketos-base-ui-plasma: enable NM for systemd post-install (MR 5171)
[ci:skip-vercheck]

[ci:skip-build]: already built successfully in CI
2024-05-28 09:33:54 -07:00
Oliver Smith
333f5f77ce
main/postmarketos-ui-sxmo-*: set pmb:systemd-never (MR 5171)
Sxmo maintainers have decided to stay with OpenRC on postmarketOS. Set
this option, so pmbootstrap doesn't even ask the user if they want to
install Sxmo with systemd. The idea is that users don't end up
reporting issues about this unsupported use case.
2024-05-28 09:33:52 -07:00
Bart Ribbers
d0b1579cc7
main/postmarketos-ui-plasma-*: support openrc and systemd installs (MR 5171)
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
2024-05-28 09:33:29 -07:00
Sam Day
7f16b13781
main/postmarketos-ui-phosh: support openrc and systemd installs (MR 5171)
Also see: MR 4904

Co-authored-by: Clayton Craft <clayton@craftyguy.net>
2024-05-28 09:33:29 -07:00
Caleb Connolly
b18ccab0f5
main/postmarketos-base-ui-gnome: split openrc depends to -openrc subpackage (MR 5171)
Allow this package to be used on systemd installs without pulling in a
bunch of openrc services.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
2024-05-28 09:33:29 -07:00
Caleb Connolly
d35091be52
main/postmarketos-base-ui: initial support for systemd (MR 5171)
Not sure if dropping the networkmanager-openrc dependency causes issues.
Otherwise, make the elogind subpackage conflict with systemd-logind.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-05-27 13:54:35 -07:00
Clayton Craft
fd16f66e4f
main/postmarketos-config-nftables: add openrc subpkg (MR 5172)
For installing openrc-specific dependencies, specifically
nftables-openrc which is needed because the post-install enables the
openrc service and expects the initd script to be available then

[ci:skip-build] already built successfully in CI
2024-05-27 13:27:16 -07:00
Pablo Correa Gómez
f39d5a6291
main/postmarketos-base-ui: drop mvcfg (MR 5085)
All these config update are there since 2021. Having them there
serves no purpose, apart from increasing packaging complexity and
have some unnecessary files under /etc
2024-05-21 10:16:27 +02:00
Pablo Correa Gómez
064d503623
main/postmarketos-base: drop mvcfg (MR 5085)
All these config update are there since 2020. Having them there
serves no purpose, apart from increasing packaging complexity and
have some unnecessary files under /etc
2024-05-21 10:16:27 +02:00
Pablo Correa Gómez
a65e271055
main/postmarketos-ui-gnome: add gnome-extensons-app to pmb_recommends (MR 5152)
[ci:skip-vercheck] pmb_recommends do not need bumping pkgrel

[ci:skip-build]: already built successfully in CI
2024-05-21 09:53:51 +02:00
Pablo Correa Gómez
15a730118f
main/postmarketos-ui-gnome-mobile: add gnome-extensions-app to pmb_recommends (MR 5152) 2024-05-21 09:53:51 +02:00
Barnabás Czémán
886baeb741
main/lk2nd-msm8953: update to 0.3.9 & add motorola-ali (MR 5132)
Update lk2nd to latest release and add motorola-ali project
as an subpackage.
2024-05-19 13:32:54 +02:00
knuxify
a7827ef4e2
main/postmarketos-ui-weston: drop weston-clients from depends (MR 5143)
These appear to be client demos, and are already in _pmb_recommends;
drop them from depends to avoid duplication.

[ci:skip-build]: already built successfully in CI
2024-05-19 13:28:59 +02:00
knuxify
3d91c3dd97
main/postmarketos-base-ui-gnome: move xdg-user-dir and xdg-user-dir-gtk to depends (MR 5143)
Previously xdg-user-dir was repeated in both _pmb_recommends and depends;
move it to the depends variable, alongside with xdg-user-dir-gtk.
2024-05-19 13:28:58 +02:00
Clayton Craft
e95ba25742
main/postmarketos-ui-kodi: disable for x86 (MR 5146)
kodi x86 support was dropped upstream, see aports f53343613a4

[ci:skip-build]: already built successfully in CI
[ci:skip-vercheck]: Only changing architectures, no changes to package.
2024-05-18 09:47:08 +02:00