Commit Graph
100 Commits
Author SHA1 Message Date
Sicelo A. Mhlongo fb199ae218 device-nokia-n900: re-organize APKBUILD
- use amove instead of installing to subpackages from main package
- for selecting pixman renderer usage in wlroots, users testing
  wlroots0.19-based UIs can just install 0.20 manually to pull in the
  configuration, which will also work on 0.19.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9159>
2026-08-11 10:12:19 +00:00
Sicelo A. Mhlongo cf09159e2f device-blackberry-key2-generic: handle hwdb correctly
Comply with pmOS, which prefers to store hwdb in /etc. openrc works
differently, or at least the packaging in pmOS/Alpine does, so manually
recompile hwdb at package installation time in that case.

Fixes: a99f680468 ("device-blackberry-key2-generic: additional unl0kr fixes")
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9335>
2026-08-07 16:51:03 +00:00
Sicelo A. Mhlongo a99f680468 device-blackberry-key2-generic: additional unl0kr fixes
* Apply keyboard layout to unl0kr
* Correctly add required files in initramfs

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9023>
2026-07-28 12:17:06 -07:00
Sicelo A. Mhlongo 34cb146b05 linux-postmarketos-omap: upgrade to 7.1.5
In addition to upgrading, for the purpose of reducing kernel size for
the benefit of some of the supported devices (e.g. samsung espresso),
remove unused kernel configs.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9024>
2026-07-28 05:45:07 +00:00
Sicelo A. Mhlongo 87bbef0211 linux-postmarketos-omap: import bpf patch
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9024>
2026-07-28 05:45:07 +00:00
Sicelo A. Mhlongo 1a7f64fc76 linux-postmarketos-omap: upgrade to 7.1.3
- espresso is now upstream, so drop patches adding it
- renumber remaining patches
- replace omap4 CFI patch with upstream version
- migrate config and pass kconfig checks
- add new required makedepends

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9024>
2026-07-28 05:45:03 +00:00
Sicelo A. Mhlongo 6826507217 postmarketos-base: explicitly set swapfile priority
Ensure priority of swapfile is lower than zram (100 vs. 300), thus
ensuring zram is filled first.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9106>
2026-07-24 18:01:02 +00:00
Sicelo A. Mhlongo 161bea9d15 postmarketos-zram: explicitly set zram priority
There may be other swap on the device, e.g. swapfile. Setting an
explicit high priority value ensures zram is given first preference.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9106>
2026-07-24 18:01:02 +00:00
Sicelo A. Mhlongo 5aa2aaf449 device-nokia-n900: improve zram, screenlock and audio config
- switch to pactl for volume adjustment since we now have UCM2 and can
  use pulseaudio natively
- modify screenlock to prevent false activity causing screen to remain
  turned on indefinitely
- set swapfile to 220M to reduce likelihood of thrashing
- switch zram algorithm to lz4, which might have even better performance
  on N900 than lzo-rle

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9107>
2026-07-24 14:16:23 +00:00
Sicelo A. Mhlongo 6d0ebc1731 device-nokia-n900: improve input-device-related configuration
1. Use udev's uaccess tag mechanism to permit unprivileged access to the
     gpio_keys input device which reports EV_SW events such as SW_KEYPAD_SLIDE.
     Thus the user can interact with the keypad slide switch under X11 without
     needing to be in the input group. Do the same for the power button, even
     though X11 can read it directly.
  2. Drop acpid and related configurations. This removes the dependency on user
     being in the input group.
  3. Switch to the logind SetBrightness API to control the keyboard LEDs
     without requiring elevated permissions. brightnessctl as packaged under
     Alpine currently depends on the user being in the input group to control
     LEDs.
  4. Improve the keyboard backlighting so it is more even, by setting higher values
     of brightness for the innermost keyboard backlight LEDs.
  5. Simplify the touchscreen calibration rules and merge with the rules for
     gpio_keys and power button.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8748>
2026-06-14 18:05:47 +00:00
Sicelo A. Mhlongo 47ffb9097e device-nokia-n900: switch sound card over to ucm2
Having switched card over to ucm2, drop alsactl restore hacks from /etc/local.d
and from the acpi configuration.

PS: Microphones not implemented yet.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8748>
2026-06-14 18:05:47 +00:00
Sicelo A. Mhlongo b495aa576b device-*: switch to UPower config fragments
As of upower 1.91.0, UPower supports config fragments, thus there is no longer
a need to ship a full UPower.conf.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8794>
2026-06-11 17:25:47 +00:00
Sicelo A. Mhlongo 636cc55824 device-nokia-n900: add -udev subpackage
Evidently a recent Alpine development.

[1] https://wiki.alpinelinux.org/wiki/Eudev#Installation

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8612>
2026-06-03 19:18:45 +00:00
Sicelo A. Mhlongo 83214d9d05 device-nokia-n900: fix issues with systemd
For seamless systemd support:
  1. Fix sway locking script. systemd adds more paths under /run/user, which
     interfere with `find`. Limiting the search depth works around the issue
  2. Only force load `nokia-modem` driver under openrc. With systemd, force-
     loading the driver appears to confuse systemd-udevd during boot, causing
     long boot times and even total failure. On the running system, the driver
     also causes systemd-udevd to become unstable. Until the issue is resolved
     (probably in the driver), there will not be any modem support when using
     systemd
  3. Remove the isp1704 driver (for the PHY) from the initramfs. Under systemd,
     it might load too early and fail, leading to slow charging in the running
     system. It is more reliable when loaded later on. Charging still works in
     the initramfs since the actual charger driver (bq2415x) is available

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8612>
2026-06-03 19:18:45 +00:00
Sicelo A. Mhlongo 79cc4424c7 device-nokia-n900: fixes for unl0kr
The hardware keyboard on N900 has been unusable for FDE unlocking since a
recent unl0kr commit [1]. Fix via hwdb so unl0kr can detect it correctly.

While at it, add an unl0kr config to ensure all keys are mapped correctly and
usable.

[1] https://gitlab.postmarketos.org/postmarketOS/buffybox/-/work_items/62

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8598>
2026-05-21 14:50:14 +00:00
Sicelo A. Mhlongo 33cea5f892 linux-postmarketos-omap: Add accessibility kconfigs
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8471>
2026-05-09 18:29:24 +00:00
Sicelo A. Mhlongo 6b6306918c linux-postmarketos-omap: add CFI compatibility patch
omap4_finish_suspend is defined in arm assembly and is thus invisible to CFI,
causing errors when called directly as .finish_suspend. Wrap it in a function
which calls the assembly function.

The goal is to upstream the patch.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8471>
2026-05-09 18:29:24 +00:00
Sicelo A. Mhlongo 66f3535d7a linux-postmarketos-omap: add upstreamable hsi fix
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8471>
2026-05-09 18:29:21 +00:00
Sicelo A. Mhlongo 75141b778c linux-postmarketos-omap: upgrade to 7.0.5
In addition to the version upgrade:
 1. Drop DTS patch for volume keys. These will be handled via hwdb
 2. Drop CONFIG_FW_LOADER_USER_HELPER. It was required by the LED controller
    (lp5523) driver until Linux 6.19
 3. Restore TWL4030_PWRBUTTON, and make it built-in (in readiness for plymouth)
 4. Drop HSI patch. To be replaced with a better quality patch which will be
    upstreamed
 5. The remainder of changes are from kconfig migrate

 Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8471>
2026-05-09 18:29:17 +00:00
Sicelo A. Mhlongo 71858694b3 device-nokia-n900: sway: workaround wlroots dpms bug
The sway 1.12 & wlroots 0.20 combination surfaces a dpms bug where the display
requires two attempts at turning it on after it has been set to off. Workaround
this until the issue is resolved.

Reference: https://gitlab.freedesktop.org/wlroots/wlroots/-/work_items/4026
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo e51efc65b2 device-nokia-n900: drop xorg.conf
The X11 server can auto-configure things on its own.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo fcbcb97a50 device-nokia-n900: Implement fixes for boot/init issues
1. Modernize the boot parameters uboot passes to the kernel
 2. Correct the volume keys. Upstream DTS actually sends F7 and F8 for these
       keys, which is the behavior from stock. Using hwdb to correct the keys
       allows us to drop the relevant DTS patch from linux-postmarketos-omap.
       Additionally add the hwdb database into initramfs to ensure the keys
       also work during system initialization
 3. Disable OMAP 3430 OFF mode early in the initramfs. This is currently
       broken and causes system instability. We previously used a DTS patch to
       do this, but using an initramfs hook allows us to reduce the amount of
       kernel patches we maintain

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 5622b6371c device-nokia-n900: do not depend on UPower for i3blocks
Version 34 of the device-nokia-n900 package implemented an udev-based script
for shutdown due to critically-low battery condition.  Therefore, depending on
UPower is no longer necessary. To keep the i3blocks status bar working in
the absence of UPower, switch back to basic sysfs polling.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 1de140f47f device-nokia-n900: upower: switch to config fragment
As of upower 1.91.0, UPower supports config fragments, thus there is no longer
a need to ship a full UPower.conf. The device-specific upower package can
therefore be dropped, and the config fragment will be installed unconditionally
as part of the device package.

NB: It is still necessary to use a custom udev script to initiate poweroff due
to low battery on the N900, since the fuel gauge has a hardware limitation
which results in reporting 0% if the calibration is off, causing unwanted
device shutdowns if UPower's mechanism is active.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 0b83a665db device-nokia-n900: rework screen locking
Provide a unified screen locking mechanism, supporting x11 and sway.  Auto
locking is also improved to correctly disable inputs in all screen locking
scenarios, and re-enabling them on unlock. Unlock on keypad slide now also
works on sway (from sway v1.12).

Any x11 UI can use the existing script by setting up appropriate keybinds to
the script and autostarting xautolock. It may be necessary to disable any
built-in autolock method integrated within a specific x11 WM.

NB: This is NOT locking in the sense of secure locking. It is purely for
turning the screen off and disabling some inputs (currently only the
touchscreen) to prevent unintended wakeups.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 92b08601f7 device-nokia-n900: simplify sway status bar configuration
Since version 4, postmarketos-ui-sway allows overriding the status bar easily,
thus the hack to hide the global sway status bar to display a second bar is no
longer necessary.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 79f6325f6c postmarketos-ui-sway: use config fragment for status bar
Separating the status bar allows for customization (e.g. in a device package)
without replacing the entire sway config

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 52f23a780c wl1251-cal: extract nvs to /run
Running the service for wl1251-cal before udev is partly responsible for very
slow boot observed on the N900 when using systemd. This is likely because of
the dependency on /lib/firmware.

Provide the NVS in /run instead, an idea borrowed from msm-firmware-loader. It
is safe to permanently overwrite the user-defined firmware search path since
the N900 does not need firmware that would be expected to be in
/lib/firmware/postmarketos.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7234>
2025-10-28 09:32:20 +00:00
Sicelo A. Mhlongo 386583c5ea device-nokia-n900: use lzo-rle zram compression, drop obsolete deviceinfo var
zstd might have slightly higher CPU usage on the N900's weak CPU, resulting in
slower compression and decompression. lzo-rle strikes a good enough balance.

Also drop deviceinfo_keyboard, which is marked obsolete.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7239>
2025-10-23 10:10:26 +02:00
Sicelo A. Mhlongo d60f557c4a zram-swap: support custom compression algorithm via deviceinfo
Some devices would benefit from using compression algorithms besides zstd.
Allow device maintainers to specify a more suitable algorithm using
`zram_swap_algo` deviceinfo variable.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7239>
2025-10-23 09:53:06 +02:00
Sicelo A. Mhlongo aa0879310e */: sicelo: drop and transfer maintainership
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6993>
2025-09-06 23:44:49 +02:00
Sicelo A. Mhlongo 610b62c87c wl1251-cal: drop wl1251 module blacklist
Since /lib/firmware is always mounted as soon as / is mounted, wl1251-cal can
still be effective without the module blacklist, as long as care is taken to
ensure the service runs as soon as possible, and strictly before udev starts.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6943>
2025-08-23 12:05:43 +00:00
Sicelo A. Mhlongo add7b4b13d systemd/postmarketos-base-systemd: enable N900's wl1251-cal service
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6932
2025-08-16 14:22:12 -04:00
Sicelo A. Mhlongo 4c6ed166d4 wl1251-cal: support systemd
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6932
2025-08-16 14:22:09 -04:00
Sicelo A. Mhlongo c4e9e5d15a device-nokia-n900: improve wlroots support and initramfs charging
1. Relocate the WLR_BACKEND environment variable away from sway subpackage to
enable its use on other wlroots compositors. Install this for any wayland
environment, even though it is only useful under wlroots. However, there are
currently many wlroots versions in Alpine to come up with a sane install_if
directive.

2. Add the USB PHY driver (isp1704) to the initramfs to allow the charger
driver to autodetect the charger type and pull higher current as needed.
Improves upon e040fa5e51 ("device-nokia-n900: initfs: add charger driver")).

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6908
2025-08-09 19:48:57 -04:00
Sicelo A. Mhlongo e040fa5e51 device-nokia-n900: initfs: add charger driver
As an enhancement, add charger driver to initramfs to permit charging, e.g.
when battery is too drained to boot, or when doing extended debugging in the
initramfs.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6890
[ci:skip-build]: already built successfully in CI
2025-08-07 08:25:07 -07:00
Sicelo A. Mhlongo b15d6beb43 device-nokia-n900: provide touch calibration data in initramfs
With libinput in use, the calibration is off, so add the udev rule that
corrects it to the initramfs

Fixes: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3361

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6890
2025-08-07 08:25:07 -07:00
Sicelo A. Mhlongo fd3b2c9efb temp/xkeyboard-config: workaround apk-tools bug
apk-tools has a bug in connection with handling symlink in some scenarios,
which is an issue for xkeyboard-config, which installs a symlink since version
2.45. implement Alpine workaround until apk-tools is fixed.

Fixes: 5edf40fbe9 ("xkeyboard-config: upgrade to latest upstream")

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6891
[ci:skip-build]: already built successfully in CI
2025-08-07 08:37:16 +02:00
Sicelo A. Mhlongo 5edf40fbe9 xkeyboard-config: upgrade to latest upstream
Upgrade to latest upstream HEAD, paving the way to eventually drop the fork.
The Nokia patch has been submitted upstream,
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/840

As of xkeyboard-config 2.45, the data directory has been changed to
/usr/share/xkeyboard-config-2/ instead of the legacy /usr/share/X11/xkb. Update
paths in the device-nokia-n900 package to match.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6869
[ci:skip-build]: already built successfully in CI
2025-08-04 16:17:36 +02:00
Sicelo A. Mhlongo b2399f7f09 temp: iio-sensor-proxy: import fix for broken buffer sensors
Import
https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/400
pending merge and tagging of new upstream release.

In pmOS, the chromebooks need these patches, since their accelerometer driver
has been found to implement buffers in a broken way.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6747
2025-07-06 11:46:09 +02:00
Sicelo A. Mhlongo ec2571860a device-nokia-n900: add configuration for sway
Notes:
 * In general, keybindings are similar to the existing i3 configuration for
       the Nokia N900
 * Power key and lock switch enable/disable the screen
 * The keypad is always lit (dimly) when the screen/touch are active and is
       turned off at other times
 * The font can be increased/decreased in foot with Ctrl+Up/Down arrow
 * The status uses the configuration and feed generator from i3 (i3blocks)
 * After two minutes of idle, the screen and touch sensor will be disabled

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6714
[ci:skip-build]: already built successfully in CI
2025-06-27 08:58:54 -07:00
Sicelo A. Mhlongo 75ca7dddb3 device-nokia-n900: i3wm: package i3blocks config separately
i3blocks could be useful on sway. Split it off and package it separately so it
can be depended on by a future sway configuration.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6714
2025-06-27 08:58:54 -07:00
Sicelo A. Mhlongo d8423780fa community: omap devices: set drm true in deviceinfo
These devices have DRM through the omapdrm kernel driver in mainline.

However, they do not have GPU acceleration, so programs/stacks requiring
GL(ES) will not work. sway and other wlroots-based stacks work well when
WLR_RENDERER=pixman is set.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6714
2025-06-27 08:58:53 -07:00
Sicelo A. Mhlongo 630327aa0f device-samsung-espresso*: drop deprecated deviceinfo variables
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6714
2025-06-27 08:58:53 -07:00
Sicelo A. Mhlongo adcdd747c4 postmarketos-ui-sway: use bemenu instead of dmenu
dmenu is an X11 application and will thus require the use of Xwayland on
sway, while bemenu has a native wayland backend and is a drop-in replacement
for dmenu.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6697
[ci:skip-build]: already built successfully in CI
2025-06-21 17:39:30 +02:00
Sicelo A. Mhlongo a0d53ce669 linux-postmarketos-omap: upgrade to 6.15
Some patches are now merged in 6.15. Drop.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6557
[ci:skip-build]: already built successfully in CI
2025-05-26 22:25:07 +02:00
Sicelo A. Mhlongo 9b19e3e248 main/postmarketos-base: drop udev-based firmware loading
udev no longer supports using userspace to service kernel requests for
firmware. While the kernel can be configured to send such requests to
userspace, udev will not do anything about them.

Reference: https://github.com/eudev-project/eudev/commit/3b717594600fa717cdf9bcfd0c7c1b703b245482

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6332
[ci:skip-build]: already built successfully in CI
2025-04-03 10:50:28 +02:00
Sicelo A. Mhlongo 5f1119f7bb wl1251-cal: extract nvs into pmos firmware search path
This also allows us to not interfere with the upstream firmware, and thus the
trigger is no longer needed.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6333
[ci:skip-build]: already built successfully in CI
2025-03-20 10:22:27 +01:00
Sicelo A. Mhlongo 3044830032 device-nokia-n900: minor packaging improvements (for i3) (MR 6258)
1. dependencies useful for all X11 DEs/WMs moved to x11 subpackage
2. add dmenu-based power key menu with options for shutdown, reboot, and
    screenshot
3. handle power and screenlock keys using i3 directly, instead of acpi/evtest
4. add mouse key emulation via Shift+keyboard-keys

[ci:skip-build]: already built successfully in CI
2025-03-03 17:05:39 +01:00
Sicelo A. Mhlongo 6589a57e26 device-nokia-n900: force SD card partition resizing (MR 6257)
Reverts 82a8d55197 (device-nokia-n900: drop partition resize cmdline option
(MR 6164)) since it seems resizing does not actually take place automatically,
at least as far as the N900 is concerned

[ci:skip-build]: already built successfully in CI
2025-02-27 12:06:55 -08:00
Sicelo A. Mhlongo b99b919290 wl1251-cal: modernize and improve reliability (MR 6202)
Alpine now ships compressed firmware, so the old firmware file name is no
longer available, causing wl1251-cal to fail. Fix by manually creating the
expected uncompressed file.

Additionally, wl1251-cal has not been running early enough in most cases,
causing the kernel to use default nvs. Fix by blacklisting the driver and
probing it after the correct nvs has been extracted and saved.
[ci:skip-build]: already built successfully in CI
2025-02-13 11:29:32 -08:00
Sicelo A. Mhlongo ffa0f1245b nokia-n900: remove deprecated deviceinfo options (MR 6168)
screen_height and screen_width are now deprecated options according to the
wiki. remove them

[ci:skip-build]: already built successfully in CI
2025-02-08 20:02:41 +01:00
Sicelo A. Mhlongo 82a8d55197 device-nokia-n900: drop partition resize cmdline option (MR 6164)
Partition resizing is now done in initramfs at every boot.
2025-02-07 16:48:37 +03:00
Sicelo A. Mhlongo 6ac4e5f49c device-nokia-n900: stop using /etc/skel (MR 6123)
Drop all uses of the /etc/skel feature for adding configuration files and
scripts to the user's $HOME. Files installed via /etc/skel are outside the
control of the package manager and may result in broken installations. At the
least, they are not updateable from the packaging.

To implement this:
 * drop $HOME/.protip_shell.sh, whose usefulness is questionable
 * relocate i3blocks blocklets to /usr/share, and the config file to /etc/xdg,
   which is an i3blocks' standard search path (`man i3blocks`)
 * move the i3 configuration file to /etc/xdg, from where it can be picked up
   and included by the config file provided via postmarketos-ui-i3wm. Configs
   from $HOME are still parsed, and will be honored by i3wm, subject to i3's
   limitations in connection with including extra config files
 * at i3 startup, with the help of an external script, ensure there is an i3
   config file in $HOME, even if empty. This prevents i3-config-wizard from
   running and mangling the config files
 * convert xdefaults to Xresources and store in /usr/share/X11. Load it to on
   the environment by calling `xrdb` during i3 startup
2025-02-04 23:26:32 +09:00
Sicelo A. Mhlongo 8edffde81b main/postmarketos-ui-i3wm: include config from /etc/xdg (MR 6123)
Device packages should use /etc/xdg/i3/config to provide customized
configurations for i3wm
2025-02-04 23:26:32 +09:00
Sicelo A. Mhlongo 7721e2d8b5 linux-postmarketos-omap: upgrade to 6.13 (MR 6071)
- Add upstream patch enabling bq2415x_charger to report events to userspace
 - Add upstream patch to fix SPI bus regression [1]. For N900, it breaks the
   screen and WLAN

 [1] https://lore.kernel.org/linux-spi/Z5HXoq8XlduURWmw@tp440p.steeds.sam/T/#mbd2ca8fb3b214819623197325b37fce182dddce7
2025-01-30 15:35:18 -08:00
Sicelo A. Mhlongo cc92408b60 device-nokia-n900: depend on evtest (MR 6113)
730c56ed35 ("community/device-nokia-n900: x11: integrate screenshot utility")
added a script that uses evtest. Add the required package dependency.
2025-01-30 01:54:04 +03:00
Sicelo A. Mhlongo f5b4473346 device-nokia-n900: move xdefaults to x11 subpackage (MR 5930)
The xdefaults file is not i3wm-specific, but can be used with any X11 UI the
user may want to try

[ci:skip-build]: already built successfully in CI
2024-12-20 15:31:26 +00:00
Sicelo A. Mhlongo 86fb190a34 device-nokia-n900: lock.sh: query touchscreen instead of display (MR 5930)
lock.sh is only reliable when used with i3wm, where we disable gpio_keys from
being handled by X/i3wm. When this is not done (e.g. when testing a different
X11 UI), the script becomes unreliable since the display turns on due to the
SCREENLOCK key being toggled, and therefore only the display=on case is ever
run.

Improve reliability of the script by basing the decision making on the
enabled/disabled state of the touchscreen instead.
2024-12-20 15:31:26 +00:00
Sicelo A. Mhlongo a092ed546a linux-postmarketos-omap: make AES builtin (MR 5925)
With AES built as a module, it is not possible to unlock the rootfs, at least
on the Nokia N900.

[ci:skip-build]: already built successfully in CI
2024-12-19 11:58:58 +02:00
Sicelo A. Mhlongo 5f059f959e device-nokia-n900: do not use upower for low-battery shutdown (MR 5868)
As of upower 1.90.5, it is possible to configure upower to not take an action
when the battery capacity is reported as critically low. Since the Nokia N900
now monitors its battery capacity using udev scripts, which is more accurate
than upower's calculation, enable the new ignore feature for the N900.
2024-12-04 17:25:12 +01:00
Sicelo A. Mhlongo ea97c08fa6 device-nokia-n900: implement udev-based battery monitoring (MR 5868)
The bq27200 fuel gauge depends on its battery-backed memory for capacity
reporting. If the supply is off for some time, the fuel gauge's last known
capacity is reset, after which a capacity value can only be read after a
full charge cycle. Thus, most of the time, as used on the Nokia N900, the
reported percentage cannot be relied on for making power-off decisions on
battery low conditions, e.g. through UPower.

However the fuel gauge can very accurately detect and report a low battery
condition internally, even if the reported capacity is incorrect, e.g. when
it has been reset. The low battery condition is reported by the kernel via
capacity_level in sysfs, and also generates uevents.

So we can implement safe battery shutdown by requesting the kernel to more
regularly polling for status changes, then performing an immediate shutdown
when the capacity_level is reported as Low and the device is not charging.
2024-12-04 17:25:12 +01:00
Sicelo A. Mhlongo 06aaf0abe4 device-nokia-n900: update urxvt font (MR 5868)
pmos now defaults to droid sans font
2024-12-04 17:25:12 +01:00
Sicelo A. Mhlongo 64dcfb004a device-nokia-n900: cleanup modem udev rules (MR 5868)
Do not duplicate udev rules that are also shipped by upstream
2024-12-04 17:25:12 +01:00
Sicelo A. Mhlongo fdd064430e device-nokia-n900: drop sxmo-specific sub-package (MR 5868)
The deviceprofile is now in a tagged sxmo release.

The conky issue will be mentioned in wiki for users to manually disable, until
upstream allows toggling it.
2024-12-04 17:25:03 +01:00
Sicelo A. Mhlongo f7f49b3416 linux-postmarketos-omap: n900: bq27xxx: generate events in changes to status flags (MR 5857)
bq27xxx_battery has a check for status flags in order to detect changes
and report to userspace. However, the cached flags are updated before
checking for changes, hence no flag-related events are ever sent. This
patch fixes this behavior, and has been sent upstream.

[ci:skip-build]: already built successfully in CI
2024-11-28 20:51:10 +01:00
Sicelo A. Mhlongo f0313fc0a2 device-nokia-n900: explicitly choose msdos partitioning scheme (MR 5707)
u-boot on the Nokia N900 cannot boot from GPT, which will soon be the default
scheme. Hence choose msdos explicitly.
2024-10-09 02:24:08 +02:00
Sicelo A. Mhlongo 07abf676aa temp/xkeyboard-config: enable Nokia N900 keyboard (MR 5613)
upstream erroneously dropped N900 configuration in xkeyboard-config 2.42. until
this is fixed upstream, fork the package. set it to build only for armv7 to
reduce any possible effect on other devices in pmos.

Closes: https://gitlab.com/postmarketOS/pmaports/-/issues/2923
[ci:skip-build]: already built successfully in CI
2024-09-23 16:09:56 +02:00
Sicelo A. Mhlongo 6ac02b55e8 device-nokia-n900: fix boot by not activating uart (MR 5613)
dropping activation of uart (ttyS2) allows N900 to boot successfully with new
pmOS initramfs.

Closes: https://gitlab.com/postmarketOS/pmaports/-/issues/2922
2024-09-23 16:09:56 +02:00
Sicelo A. Mhlongo da712cf901 device-nokia-n900: update kernel cmdline (MR 5272)
* drop maxcpus=0, which was added with 73a033328e ("device-nokia-n900: set
    uniprocessor mode for kernel (MR 4299)") while troubleshooting. a better
    fix was eventually implemented with 3e737241ba ("linux-postmarketos-omap:
    N900: disable twl off idle features (MR 4317)")
* drop PMOS_NO_OUTPUT_REDIRECT, which was obsoleted by 7c98127746
    ("postmarketos-initramfs: switch to udev and kmod (MR 5000)")
2024-06-22 20:06:48 +02:00
Sicelo A. Mhlongo 5e03ad2817 device-nokia-n900: fix sxmo lock state (MR 5228)
commit 933f2b5703 ("device-nokia-n900: improve sxmo-dwm support [MR 5227]")
accidentally removed sxmo lock state initialization. Restore the lock state
initialization
2024-06-12 16:07:42 +02:00
Sicelo A. Mhlongo f888ffee55 device-nokia-n900: fix packaging for upower (MR 5227)
170189393b (device-nokia-n900: add upower support and config (MR 4397) added
an upower config, but did not provide a subpackage to actually install it on
device. Add the needed subpackage.

[ci:skip-build]: already built successfully in CI
2024-06-12 10:30:30 +02:00
Sicelo A. Mhlongo 933f2b5703 device-nokia-n900: improve sxmo-dwm support (MR 5227)
(1) the deviceprofile differs from upstream 1.16.3 in the following respects:

  (a) -export SXMO_NO_KEYBOARD=1 - allow use of the virtual keyboard

  (b) +export SXMO_DMENU_LANDSCAPE_LINES="10"
      +export SXMO_DMENU_PORTRAIT_LINES="6" - these two adjust the size of the
         displayed dmenu menu.

    * NB: All foregoing changes are already merged in sxmo-utils master.

  (c) +export SXMO_TOUCHSCREEN_ID="TSC2005 touchscreen" - allows sxmo to
         reliably toggle touch screen's enabled status

    * The foregoing change is awaiting acceptance by upstream.

(2) The start hook differs from upstream 1.16.3 by the removal of the line that
      starts conky. That program pegs N900 CPU usage at 100% all the time. This
      change is not upstreamable, at least not for the time being
2024-06-12 10:25:59 +02:00
Sicelo A. Mhlongo 8d570a7847 linux-postmarketos-omap: upgrade to 6.9.0 (MR 5127)
[ci:skip-build]: already built successfully in CI
2024-05-14 09:06:29 +02:00
Sicelo A. Mhlongo 081f663b36 postmarketos-ui-i3wm: auto-generate user config (MR 5041)
90b0205a ("postmarketos-ui-i3wm: configure wallpaper globally") directly copies
the default i3 config into the user's config directory. Change to using the
wizard instead
2024-04-21 12:03:35 +09:00
Sicelo A. Mhlongo 10fd1b4e3e device-nokia-n900: drop nonfree_firmware subpackage (MR 5050)
Drop the nonfree_firmware package now that pmboostrap commit aa594b76fa
("pmb.config: do not prompt for nonfree fw/userland") is merged
2024-04-20 23:26:24 +09:00
Sicelo A. Mhlongo ea25bc48d7 device-nokia-n900: unconditionally fetch wl1251 nvs on each boot (MR 5050)
Reading the wl1251 data on each boot can be useful when using the same SD card
on different devices, allowing each to fetch its correct calibration data.
Additionally, this opens up the possibility to simplify the packaging (in
follow-up commit)
2024-04-20 23:26:07 +09:00
Sicelo A. MhlongoandDvaMishkiLapa 730c56ed35 community/device-nokia-n900: x11: integrate screenshot utility (MR 5014)
Take screenshots in any x11 UI by depressing the camera key while keeping the
proximity sensor covered

This is a variation of [1] and [2] from postmarketOS/pmaports!4133.

[1] https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4133/diffs?commit_id=35007eaefd0e471634c74aad9294234ceed260ae
[2] https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4133/diffs?commit_id=0ef9ffe3928313b7afc5ce68ad0ec4487f1f2f11

Co-Authored-By: DvaMishkiLapa <thesame.personal@gmail.com>
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
2024-04-10 22:40:37 +09:00
Sicelo A. Mhlongo e3b33d613b wl1251-cal: build only for armv7 (n900) (MR 5017)
The tool is Nokia N900-specific, so no need to build for all archs

[ci:skip-vercheck]
[ci:skip-build]: already built successfully in CI
2024-04-09 17:49:36 +02:00
Sicelo A. Mhlongo a61c3a3e48 device-nokia-n900: i3wm: use volume keys for audio and display brightness (MR 5012)
Volume keys adjust alsa volume, and Shift + volume keys adjusts display
brightness.

This is a variation of [1] and [2] from from postmarketOS/pmaports!4133.

[1] https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4133/diffs?commit_id=a060096b4abe8b614e9ae11aff29f133aa4486b9
[2] https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4133/diffs?commit_id=968293603a3d55d1380fdff34d4c89d8bcd00bda

Co-Authored-By: DvaMishkiLapa <thesame.personal@gmail.com>
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
[ci:skip-build]: already built successfully in CI
2024-04-07 13:33:00 +02:00
Sicelo A. Mhlongo c5bb75e4d0 device-nokia-n900: acpi_handler: fix indentation (MR 4988)
Fixes: 7270f472e3 ("treewide: fix tabs, final newline, trailing whitespace"

[ci:skip-build]: already built successfully in CI
2024-04-03 07:57:52 +02:00
Sicelo A. Mhlongo e67b6e5a06 device-nokia-n900: turn display off after two minutes (MR 4988)
we are not using a screensaver or similar, so let's turn display off when idle,
to save some power
2024-04-03 07:57:52 +02:00
Sicelo A. Mhlongo 0a0d84325e device-nokia-n900: enable screen and touchscreen on keyboard slide up (MR 4988)
Partially implements the request from
https://gitlab.com/postmarketOS/pmaports/-/issues/621
2024-04-03 07:57:52 +02:00
Sicelo A. MhlongoandClayton Craft 4ac671b055 device-nokia-n900: switch to more robust locking script (MR 4988)
This is an adaptation of craftguy's improved script [1]

[1] https://gitlab.com/postmarketOS/pmaports/-/tree/n900-screen-locker

Co-authored-by: Clayton Craft <clayton@craftyguy.net>
2024-04-03 07:57:51 +02:00
Sicelo A. Mhlongo d5ee14fc28 device-nokia-n900: improve handling of slidey key (MR 4988)
The handling for the lock key is currently unreliable (racy?). In many cases,
you have to toggle it twice to turn display off. Fix this by handling it via
acpid. Since the scripts currently depend on X11 tools, move them to the x11
subpackage. They can be moved back to the main device package in future when
Wayland support has been implemented.

Block i3 from handling the lock key to avoid additional races.
2024-04-03 07:57:51 +02:00
Sicelo A. Mhlongo 27523989d9 device-nokia-n900: modernize acpid scripts (MR 4988)
1. Reduce keypad brightness. Full brightness is unnecessary
2. Correct the camera cover states. It is 1 when closed, i.e. covered [1]
3. Drop proximity sensor handling, in favor of supporting it in
   iio-sensor-proxy [2]
4. Drop power button handling. This is handled by the WM [3]
5. Drop handling for volume keys. These will be handled via WM later (when PA
   is integrated)
6. Drop duplicate KP_SLIDE_* entries in handler script

[1] https://elixir.bootlin.com/linux/v6.9-rc1/source/include/uapi/linux/input-event-codes.h#L917
[2] https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/375
[3] https://gitlab.com/postmarketOS/pmaports/-/blob/9bb205e18c5b300313d53853acb466e014afdbeb/device/community/device-nokia-n900/i3wm/i3wm.conf#L67
2024-04-03 07:57:48 +02:00
Sicelo A. Mhlongo fd49591adf device-nokia-n900: provide feedbackd haptics support (MR 4997)
[ci:skip-build]: already built successfully in CI
2024-04-02 21:26:25 +02:00
Sicelo A. Mhlongo bd8dfd304f device-nokia-n900: do not load gpio_leds automatically (MR 4996)
6c30cb42a4 ("linux-postmarketos-omap: enable new community kconfig options")
set CONFIG_LEDS_TRIGGER_DEFAULT_ON builtin. The consequence is that the debug
LEDs are now always turned on, which interferes with the keyboard backlight.
Since pmOS requires it to be builtin now, let us workaround the issue by not
loading leds_gpio at boot.

[ci:skip-build]: already built successfully in CI
2024-04-02 19:48:14 +02:00
Sicelo A. Mhlongo 22dfc72571 linux-postmarketos-omap: upgrade to 6.8.0 (MR 4871)
[ci:skip-build]: already built successfully in CI
2024-03-11 14:29:23 -07:00
Sicelo A. Mhlongo c38e4643da linux-postmarketos-omap: fix version parsing logic (MR 4871)
Remove the need for an extra $_kernver variable when handling rc kernels
2024-03-11 14:29:23 -07:00
Sicelo A. Mhlongo cab1114ce2 linux-postmarketos-omap: fix n900 battery & charger (MR 4871)
Two changes are already upstream:
 * Battery: fix reporting of full state
     - https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/power/supply?id=8fbb11162504f2de167a8ccd2d2c55a849d2c5ea
 * Charger: report online state
     - https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/power/supply?h=next-20240301&id=9a451f1b028e116d037a93bf13eb8f8620994205

 * The other change (950mA charger current limit) will be included starting
   with 6.9-rc1. We previously had it in pmOS but it was dropped during the
   transition to a common OMAP kernel
    - https://lore.kernel.org/linux-devicetree/ZeBB1GYb31UAW886@tp440p.steeds.sam/T/#t
2024-03-11 14:29:23 -07:00
Sicelo A. Mhlongo bdf9697cd9 ci: perform wallpaper checks on N900 too (MR 4810)
[ci:skip-build]: already built successfully in CI
2024-02-12 19:57:26 +01:00
Sicelo A. Mhlongo fb01ee1bf9 device-nokia-n900: drop custom wallpaper config (MR 4810)
Wallpaper is now configured globally from the main `postmarketos-ui-i3wm`
package.
2024-02-12 20:17:41 +02:00
Sicelo A. Mhlongo 90b0205a90 postmarketos-ui-i3wm: configure wallpaper globally (MR 4810)
Configure wallpaper in the UI package, to accommodate changing wallpapers per
release.

The wallpaper path is adjusted in `/usr/share/i3/config.pmos`.
2024-02-12 20:14:11 +02:00
Sicelo A. Mhlongo f9c6d36d33 gps-nokia-n900: upgrade to 0.3.2 (MR 4628)
Upgrade to latest upstream version. It contains a fix for the reported GPS
date.

https://github.com/maemo-leste/gps-nokia-n900/commit/be8febb04200bea28cbe681d160e5fc1fd97a85a
[ci:skip-build]: already built successfully in CI
2023-12-13 17:16:32 +01:00
Sicelo A. Mhlongo caf2b5fec5 gps-nokia-n900: switch upstream sources to Leste repos (MR 4621)
Maemo Leste has better support/integration for the N900. Switch to their GPS
repository

[ci:skip-build]: Already built successfully in CI.
2023-12-11 20:36:49 +01:00
Sicelo A. Mhlongo 9731827819 gps-nokia-n900: add maintainer (MR 4621) 2023-12-11 20:36:48 +01:00
Sicelo A. Mhlongo fb59233471 gps-nokia-n900: switch arch to armv7 (MR 4621) 2023-12-11 20:36:47 +01:00
Sicelo A. Mhlongo d7d6129402 device/testing/gps-nokia-n900: move to device/community (MR 4621)
Enable installing gps-nokia-n900 for the N900 device, which is in community
category
2023-12-11 20:36:46 +01:00
Sicelo A. Mhlongo d4a73356c8 main/hwtest: upgrade to 0.7.0 (MR 4582)
[ci:skip-build] already built successfully in CI
2023-12-02 01:00:33 -08:00