From d6e73013d25696d129b9778a14ac920018e5dff0 Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Thu, 15 Apr 2021 22:11:02 +0300 Subject: [PATCH] firmware-oneplus-msm8998: new pmaport (MR 2591) 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. --- .../30-gpu-firmware.files | 4 ++ .../testing/firmware-oneplus-msm8998/APKBUILD | 43 +++++++++++++++++++ .../firmware-oneplus-msm8998.post-install | 3 ++ .../firmware-oneplus-msm8998/firmware.files | 17 ++++++++ 4 files changed, 67 insertions(+) create mode 100644 device/testing/firmware-oneplus-msm8998/30-gpu-firmware.files create mode 100644 device/testing/firmware-oneplus-msm8998/APKBUILD create mode 100644 device/testing/firmware-oneplus-msm8998/firmware-oneplus-msm8998.post-install create mode 100644 device/testing/firmware-oneplus-msm8998/firmware.files diff --git a/device/testing/firmware-oneplus-msm8998/30-gpu-firmware.files b/device/testing/firmware-oneplus-msm8998/30-gpu-firmware.files new file mode 100644 index 000000000..5f4dfe184 --- /dev/null +++ b/device/testing/firmware-oneplus-msm8998/30-gpu-firmware.files @@ -0,0 +1,4 @@ +/lib/firmware/qcom/a530_pfp.fw +/lib/firmware/qcom/a530_pm4.fw +/lib/firmware/qcom/a540_gpmu.fw2 +/lib/firmware/qcom/a540_zap.mbn diff --git a/device/testing/firmware-oneplus-msm8998/APKBUILD b/device/testing/firmware-oneplus-msm8998/APKBUILD new file mode 100644 index 000000000..920f2a37f --- /dev/null +++ b/device/testing/firmware-oneplus-msm8998/APKBUILD @@ -0,0 +1,43 @@ +# Maintainer: Jami Kettunen +pkgname=firmware-oneplus-msm8998 +pkgver=10.0.1 +pkgrel=0 +_commit="7ff57ed71367b70904f9b43bff873816d70f1cba" +pkgdesc="Firmware for OnePlus 5/5T" +url="https://github.com/JamiKettunen/firmware-mainline-oneplus5" +# Conflicts with ath10k/WCN3990/hw1.0/firmware-5.bin, qca/cr{btfw21.tlv,nv21.bin} & qcom/a530_p{fp,m4}.fw +replaces="linux-firmware-ath10k linux-firmware-qca linux-firmware-qcom" +arch="aarch64" +# soc-qcom-sdm845-nonfree-firmware is also applicable to msm8998 +depends="soc-qcom-sdm845-nonfree-firmware qcom-diag" +install="$pkgname.post-install" +license="proprietary" +options="!check !archcheck !strip !tracedeps" +source=" + $pkgname-$_commit.tar.gz::https://github.com/JamiKettunen/firmware-mainline-oneplus5/archive/$_commit.tar.gz + 30-gpu-firmware.files + firmware.files +" +subpackages="$pkgname-initramfs:firmware_initramfs" +builddir="$srcdir/firmware-mainline-oneplus5-$_commit" + +package() { + while IFS="" read -r fw; do + install -Dm644 "$fw" "$pkgdir/lib/firmware/$fw" + done < "$srcdir"/firmware.files +} + +firmware_initramfs() { + pkgdesc="Files to be included in the initramfs to support osk-sdl" + depends="$pkgname mesa-egl mesa-gbm" + install_if="$pkgname" + + install -Dm644 "$srcdir"/30-gpu-firmware.files \ + "$subpkgdir"/etc/postmarketos-mkinitfs/files/30-gpu-firmware.files +} + +sha512sums=" +14b8bac7cc899caa4b83ca4787d2e2dcf9db1ef8c46b7427e0afeb68f937e680164153d98b3ecbbd40a450296c7fe0f748946475d29dcaa9b9d25a6b36ace04c firmware-oneplus-msm8998-7ff57ed71367b70904f9b43bff873816d70f1cba.tar.gz +974b7bcef52b4ae6d6fa11212ede1ddc9a9944dc3d6b066b0813072d8a9586929db8052670d98277db15cc1e2aa2d731c97c9c3d443f26bd3afab7e885230cba 30-gpu-firmware.files +4aa7fca56855ea9091257f138bcbf051c3e637d983965d702204d933dc457f77171492c1eb83ce2c6bb0ce2fce83fcbdbf0419e85b83364f33fcc1f1c4ea5e73 firmware.files +" diff --git a/device/testing/firmware-oneplus-msm8998/firmware-oneplus-msm8998.post-install b/device/testing/firmware-oneplus-msm8998/firmware-oneplus-msm8998.post-install new file mode 100644 index 000000000..268eff4bd --- /dev/null +++ b/device/testing/firmware-oneplus-msm8998/firmware-oneplus-msm8998.post-install @@ -0,0 +1,3 @@ +#!/bin/sh +# The Wi-Fi firmware will keep crashing if diag-router isn't running +rc-update add diag-router boot diff --git a/device/testing/firmware-oneplus-msm8998/firmware.files b/device/testing/firmware-oneplus-msm8998/firmware.files new file mode 100644 index 000000000..05907669a --- /dev/null +++ b/device/testing/firmware-oneplus-msm8998/firmware.files @@ -0,0 +1,17 @@ +ath10k/WCN3990/hw1.0/board-2.bin +ath10k/WCN3990/hw1.0/firmware-5.bin +qca/crbtfw21.tlv +qca/crnv21.bin +qcom/a530_pfp.fw +qcom/a530_pm4.fw +qcom/a540_gpmu.fw2 +qcom/a540_zap.mbn +qcom/msm8998/oneplus/adsp.mbn +qcom/msm8998/oneplus/adspua.jsn +qcom/msm8998/oneplus/ipa_fws.mbn +qcom/msm8998/oneplus/mba.mbn +qcom/msm8998/oneplus/modem.mbn +qcom/msm8998/oneplus/modemuw.jsn +qcom/msm8998/oneplus/slpi_v2.mbn +qcom/msm8998/oneplus/slpius.jsn +qcom/msm8998/oneplus/wlanmdsp.mbn