The initramfs can sometimes use the device-mapper to open dynamic
partitions. Dynamic partitions are used for testing a full installation
without touching userdata (so testers can quickly revert to a working
phone at any time). Since subpartitions are still used on google-sargo,
do not skip device-mapper devices.
Fixes: 0268336968 ("main/postmarketos-initramfs: fix bug with booting from usb")
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7675>
In version 1.1.1, the new install target in the Makefile was used to
install rmtfs. This installs rmtfs to /usr/bin instead of the expected
/usr/sbin. Use the new /usr/bin directory for the OpenRC service file so
rmtfs can keep working under OpenRC.
Fixes: f7052461da ("modem/rmtfs: subpackage -systemd")
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7517>
On a new installation, the OpenRC subpackage can be installed before the
main package. The modem-gnss service is already needed when the
subpackage is installed. Move the service file to the subpackage so new
installations don't error out.
( 66/750) Installing device-google-sargo-openrc (13-r0)
device-google-sargo-openrc-13-r0.post-install: Executing script...
device-google-sargo-openrc-13-r0.post-install: * service hexagonrpcd-adsp-sensorspd added to runlevel sysinit
device-google-sargo-openrc-13-r0.post-install: * rc-update: service `modem-gnss' does not exist
ERROR: device-google-sargo-openrc-13-r0.post-install: exited with error 1
...
(199/750) Installing device-google-sargo (13-r0)
...
1 error; 1335 MiB in 766 packages
Link: https://builds.sr.ht/~postmarketos/job/1542762#task-img
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6866
Mirror some of the changes to the Pixel 3a:
device-google-sargo: add sensors support (MR 5329)
google-sargo: add gpi to modules-initfs to fix fde (MR 5347)
google-sargo: do not enable HexagonRPCD on every upgrade (MR 5400)
google-sargo: stop HexagonRPCD on suspend (MR 5400)
google-sargo: make necessary userspace changes for kernel v6.10.2
device-google-sargo: remove nonfree_firmware subpkg (MR 6107)
device-google-sargo: Fix hexagonrpcd on systemd (MR 6147)
device-google-sargo: install hexagonrpcd conf to new location (MR 6217)
device/*: explicitly depend on openrc if install scripts call rc-update
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6718
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).
The Linux stable team merged v6.12 into linux-rolling-stable as
of Thursday, so here's a new release.
This release cycle was very quiet with small fixes.
The ttynull driver was enabled in the configuration to fix a bug
where userspace would start with no stdio open.
A patch that made the fuel gauge driver compatible with v6.10
was dropped.
Patches from MSM8916 and MSM8953 were re-picked, to include the change
from strlcpy to strscpy and to remove duplicate q6voice entries in a
Makefile.
Some flashlight and charging patches were staged.
The thermal nodes were sorted by the thermal sensor to match
other platforms.
Bluetooth, camera, call audio, display, USB, I2C, eMMC, modem, video
acceleration, WiFi, haptics, NFC, sensors, and touchscreen should
work and be slightly broken like before.
The Google Pixel 3a automatically appends console=null to the command
line. In the kernel, the preferred console is set to ttynull. Since
ttynull is not automatically enabled, a warning is currently emitted:
[ 0.909853] Warning: unable to open an initial console.
This also causes stdin, stdout, and stderr to be missing from the init
process.
In the busybox implementation, syslogd creates the /dev/log socket and
opens /dev/kmsg. This happens just before daemonizing, which opens
/dev/null and aliases stdin, stdout, and stderr to it. After daemonizing
and potentially closing the socket, stdin is aliased to the socket to
save stack memory. If the program starts without stdin under Linux, the
socket gains the constant STDIN_FILENO file descriptor, which is cleared
when daemonizing.
Syscalls when the 0, 1, 2 file descriptors aren't open:
socket(AF_UNIX, SOCK_DGRAM, 0) = 0
openat(AT_FDCWD, "/dev/kmsg", O_WRONLY|O_LARGEFILE) = 1
openat(AT_FDCWD, "/dev/null", O_RDWR|O_LARGEFILE) = 2
Enable the CONFIG_NULL_TTY option and update the configuration to allow
the kernel to open stdin, stdout, and stderr for the init and (by
inheritance) syslogd processes. It's technically an expert option but
isn't enabled by default (and can be enabled in config fragments).
Closes#3269
[ci:skip-build]: already built successfully in CI
The Freedreno driver requires python3 to build in the new version.
Deviations from the upstream config fragments:
- set CONFIG_CMA_SIZE_MBYTES to 256, from [1] and Matrix advice
[1] https://gitlab.com/sdm845-mainline/linux/-/merge_requests/100
[ci:skip-build] already built successfully in CI
Make room for MultiMedia4 (built-in microphone) device in q6voice.conf:
In the 6.9.3 kernel, there were four CPU endpoints in Q6ASM enabled
for audio:
0. MultiMedia1 - Built-in Earpiece and Speaker
1. MultiMedia2 - Headphones Playback (3.5 mm jack)
2. MultiMedia3 - Headset Capture (3.5 mm jack)
3. VoiceMMode1 - fake endpoint to route voice calls
In 6.10.2, an extra endpoint is added to support the built-in
microphone:
0. MultiMedia1 - Built-in Earpiece and Speaker
1. MultiMedia2 - Headphones Playback (3.5 mm jack)
2. MultiMedia3 - Headset Capture (3.5 mm jack)
3. MultiMedia4 - Built-in Microphone
4. VoiceMMode1 - fake endpoint to route voice calls
Since the device ID of VoiceMMode1 has changed, and q6voiced does
not automatically detect this by name, update the VoiceMMode1 device
ID so voice calls still work.
Be compatible with the secure name for the FastRPC device node:
There has been a security vulnerability issued at the FastRPC kernel
driver for allowing sensorspd and rootpd to be accessed on device
nodes not labelled "-secure". Be compatible with the FastRPC ADSP
device named "fastrpc-adsp-secure".
There is a bug in FastRPC when waking from suspend. Since HexagonRPCD is
currently only useful for a few moments when the ADSP is requesting the
sensor registry, it can just be stopped without affecting sensor
support. Add a pre-suspend hook to stop HexagonRPCD so it doesn't crash
the ADSP when the device wakes up.
[ci:skip-build]: already built successfully in CI
There is an issue where resuming from suspend crashes the ADSP, and
rebooting the ADSP makes the entire device hang. Autosuspend has other
issues affecting higher category devices (namely, wake on modem events),
but it was still possible to resume before adding HexagonRPCD. For now,
remove the user's maintenance burden in keeping HexagonRPCD disabled.
The referenced commit had surfaced a bug with the unlocking code, which
would attempt to change the output of find_root_partition while the
cached PMOS_ROOT is stale and active. Clear this variable to force
find_root_partition to find the new rootfs value.
Fixes: 7030e08e7b ("postmarketos-initramfs: check for root subpartition (MR 5048)")
[ci:skip-build]: already built successfully in CI
Previously, the modem firmware would be loaded from the modem partition
using this firmware loader. As of the 6.5.4 SDM670 kernel upgrade, the
firmware is installed and loaded from the firmware package. Drop the
dependency on the msm-firmware-loader, which is now unused.
Also disable some drivers and subsystems in the kernel configuration
that are generally unused on the platform, according to the
corresponding patch in the kernel repository.
[ci:skip-build]: already built successfully in CI
I cannot maintain this device because I do not have it, but it is
similar to the Pixel 3a, which I can maintain.
Move the kernel into a subpackage in case support for a different panel
(the Tianma NT37700F panel) is added.
[ci:skip-build]: already built successfully in CI
Now that the modem firmware is installed in the referenced location, the
firmware patch is not needed, so remove that as well.
Also backport a fix for the Pixel 3a XL so a kernel upgrade isn't needed
for that.
The Pixel 3a uses the SDM845 SoC package but now needs UCM
configuration. Add a fork of it (unless the configuration can be added
to the SDM845 repository).
The ADSP needs this firmware, otherwise audio bringup will fail. It
wasn't added with initial ADSP support, so add it now.
Also remove execute permissions from the installed firmware.
This is more of a version bump, compared to the past few releases. This
kernel should receive more of these types of releases, especially when
there is less hardware left to bring up.
[ci:skip-build] already built successfully in CI
This port has been compatible with GPU-accelerated UIs like Phosh and
Plasma Mobile for quite a while now. Enable these UIs in the
`pmbootstrap init` menu.
See #1939.