The mainline-modem variant does not actually exist yet and this should
be preferably implemented using the new soc-qcom-msm8916-rproc selection
in the future.
Add a replacement for the current "mainline" and "mainline-modem"
kernel variants used for the MSM8916 devices. At the moment this is
implemented using separate DTBs that are all maintained in the kernel.
Unfortunately, this does not seem likely to be accepted upstream in
the mainline kernel. They will expect to have only a single DTB that
enables all available functionality. The "no-modem" variant is a minor
but still very useful use case because it changes the audio routing:
It allows audio to work without any firmware, with more control on
sample rates, latency etc for advanced audio use cases. However,
having a potentially enabled modem requires routing all audio through
the modem. There are two separate DTBs needed for these two setups.
To avoid burdening mainline with this use case, the idea is to apply
the necessary DTB transformations as part of the lk2nd boot process.
Mainline only contains the DTB with the full functionality (audio
routed through modem). The soc-qcom-msm8916-rproc packages place
a magic file at /boot/lk2nd_rproc_mode that is read by lk2nd. When
the file contains "no-modem" lk2nd will transform the DTB to disable
the modem and change the audio routing to bypass the modem.
That way, this feature does not need to be considered in mainline
at all but can still be offered as "nice to have" by lk2nd. It also
simplifies the device packages because the selection is now common
as part of the soc-qcom-msm8916 package.
Together with a related pmbootstrap change there is a nice prompt
for selecting one of these "rproc" providers:
$ pmbootstrap init
[...]
Available providers for soc-qcom-msm8916-rproc (3):
* all: Enable all remote processors (audio goes through modem) (**default**)
* no-modem: Disable only modem (audio bypasses modem, ~80 MiB more RAM)
* none: Disable all remote processors (no WiFi/BT/modem, ~90 MiB more RAM)
Provider [default]: ...
This installs some new udev rules added in purism's librem5-base
package, and adds the charger module to initfs to that PD is available
earlier on in the boot process.
[ci:skip-build] already built successfully in CI
Now the user can choose to install the proprietary firmware along with
the downstream or a (close to) mainline kernel.
[ci:skip-build]: already built successfully in CI
Add proprietary firmware required by OnePlus 5/5T's WLAN, Bluetooth, GPU
and other SoC subsystems such as ADSP. These are extracted directly from
OnePlus' OxygenOS 10.0.1 stock firmware with oos_fw_extract in the repo.
my patch to disable SS was merged in purism's tree, so it's dropped
here. This kernel also enables the hantro video decoding stuff.
[ci:skip-build] already built successfully in CI
Now the user can choose to install the proprietary firmware along with
the downstream kernel (linux-huawei-angler) or a mainline kernel
(linux-postmarketos-qcom-msm8994).
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
[ci:skip-build] Already built on CI in MR
While it doesn't make sense to package a mainline kernel for FP1 (only
UART and basic SoC components supported), it's good to include the dtb
name in deviceinfo so external tools can use it.
Enable flashing kernel on update + small cleanups for deviceinfo:
* re-sort lines in deviceinfo
* remove console=tty0 from kernel cmdline, so it does not spit out
all kernel logs on the screen. Now during boot you see just
blinking cursor and pmOS logo.
Rule D: Devices with secure boot and venus present in the firmware
partition need:
1. GPU firmware (firmware-qcom-adreno-a300)
2. msm-firmware-loader (for wcnss, modem, venus)
4. device-specific -wcnss-nv firmware
[ci:ignore-count]
[ci:skip-build] already built successfully in CI
Reduce rootfs size a bit by installing the separated firmware packages
instead of the large linux-firmware-qcom package. Also, install the
modem firmware by default to prepare for enabling GPS.
Squash the packaged venus firmware blobs using pil-squasher so only
one file needs to be loaded rather than many small ones. Linux detects
squashed (.mbn) vs non-squashed (.mdt + .b*) based on file contents
(not file name) so it is fine to install venus.mbn to venus.mdt.
Strictly speaking firmware-bq-picmt is not needed anymore because
the msm-firmware-loader can be used to load the picmt firmware from
the firmware partitions. However, this package contains quite recent,
largely unmodified firmware from Qualcomm so it still seems useful
to keep if someone wants to test more recent firmware on some other
device (provided that their device does not verify firmware signatures).
To make this firmware package consistent with firmware-qcom-db410c,
squash the firmware blobs using pil-squasher so only one file needs
to be loaded rather than many small ones.
Unfortunately, at the moment MSM8916 devices always have to install
all of linux-firmware-qcom (~ 60 MiB) when they actually just use
~ 0.008 MiB of GPU firmware in there. Everything else is just big
firmware blobs for other SoCs that are never going to be useful.
It's much more efficient to package the necessary firmware separately
to save rootfs space. The DB410c linux-board-support-package contains
all the firmware from linux-firmware as well, so we can easily package
it as part of the firmware-qcom-db410c package.
This commit makes the following changes to firmware-qcom-db410c:
1. Package venus() firmware that was previously installed from
linux-firmware-qcom. GPU firmware is packaged in firmware-qcom-adreno.
2. Use new firmware paths for DB410c that were applied upstream
3. "Squash" the firmware blobs to a single file using pil-squasher
Make the package consistent with firmware-qcom-adreno packaged from
linux-firmware, but keep them separate for legal reasons. The firmware
packaged in firmware-qcom-adreno-extra does not have a proper license.
[ci:ignore-count]
[ci:skip-build] already built successfully in CI
Add a new firmware-qcom-adreno APKBUILD that packages the GPU firmware
from upstream linux-firmware as separate packages. It is basically
a minimal replacement for linux-firmware-qcom that allows saving rootfs
space by installing only the firmware that is really relevant for the
device.
[ci:skip-build] already built successfully in CI
The firmware provided by these subpackages is now covered by the
msm-firmware-loader, so there is no need to build packages for them
anymore.
[ci:ignore-count]
The "replaces"/"provides" should have the full package name, not just
the part of the subpackage. Also, the nonfree-firmware subpackage does
not need it because the old "device-xiaomi-wt88047-nonfree-firmware-modem-wt88047"
packages were only install_if packages without any files installed.
The files packaged in firmware-motorola-osprey-wcnss-nv and
firmware-motorola-osprey-venus seem completely identical to those
of harpia, so there is no need to package them twice. There are some
differences in modem/wcnss firmware but those are now covered by the
msm-firmware-loader.
Add sony-fusion3 firmware subpackage to enable wifi.
Enable Qoalcomm Prima WLAN driver and fix wrong path in kernel.
[ci:skip-build] Already built on CI in MR