device-qcom-sm7150: overhaul and use packaged firmware
Signed-off-by: Jens Reidel <adrian@travitia.xyz> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6703>
This commit is contained in:
parent
71fd1ac99d
commit
cbf9ace0e6
4 changed files with 8 additions and 87 deletions
|
|
@ -1,2 +0,0 @@
|
|||
/lib/firmware/qcom/a630_sqe.fw
|
||||
/lib/firmware/qcom/a630_gmu.bin
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
pkgname=device-qcom-sm7150
|
||||
pkgdesc="Generic device package for Qualcomm SM7150 devices"
|
||||
pkgver=3
|
||||
pkgver=4
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
|
|
@ -14,22 +14,15 @@ arch="aarch64"
|
|||
options="!check !archcheck"
|
||||
depends="
|
||||
alsa-ucm-conf-qcom-sm7150
|
||||
bootmac
|
||||
hexagonfs-firmware-loader
|
||||
firmware-qcom-sm7150
|
||||
hexagonrpcd
|
||||
linux-firmware-ath10k
|
||||
linux-firmware-qca
|
||||
linux-firmware-qcom
|
||||
linux-postmarketos-qcom-sm7150
|
||||
make-dynpart-mappings
|
||||
msm-firmware-loader
|
||||
msm-modem
|
||||
msm-modem-uim-selection
|
||||
postmarketos-base
|
||||
qbootctl
|
||||
swclock-offset
|
||||
soc-qcom
|
||||
soc-qcom-modem
|
||||
soc-qcom-qbootctl
|
||||
systemd-boot
|
||||
tqftpserv
|
||||
unl0kr-fbforcerefresh
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
|
|
@ -38,10 +31,8 @@ subpackages="
|
|||
"
|
||||
|
||||
source="
|
||||
30-initramfs-firmware.files
|
||||
81-libssc-180-degrees.rules
|
||||
deviceinfo
|
||||
initfs-hook.sh
|
||||
"
|
||||
|
||||
build() {
|
||||
|
|
@ -51,9 +42,6 @@ build() {
|
|||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
|
||||
install -Dm644 "$srcdir"/30-initramfs-firmware.files -t \
|
||||
"$pkgdir"/usr/share/mkinitfs/files
|
||||
|
||||
install -Dm644 "$srcdir"/81-libssc-180-degrees.rules -t \
|
||||
"$pkgdir"/usr/lib/udev/rules.d
|
||||
}
|
||||
|
|
@ -72,8 +60,6 @@ openrc() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
73438ceec8ca76dec24a92718d456d17b01a23510ee0b0e6c1263e3f6c2ca82263a3e41298c0a8ebf3dd8439da354fc1c914fd475ad1cf5c669c200770df62fa 30-initramfs-firmware.files
|
||||
2c16ba75e0077b2b1eaefa4c73b287475505a1aeb291ec29316d41cc094277320f9d2aaabfd91eb1dc0f488ab2d61a94faef16e7afe0f1e226779113761b9a37 81-libssc-180-degrees.rules
|
||||
f38e438c79dadda0eef3abe5c55ad69f8947bf39e5c57e03b7cba7a60b09091e326c525e2451de446ab6de9e92a6d4e39da32ef854cc285bde2e7d56f7b7d10d deviceinfo
|
||||
8cfd961424d97242f8be42750377315825039891362bf5fbead7de9cbaaf50be34fd35e9c3ac2f981c7c3138243544f162182020b8a5a56779474476d84a7775 initfs-hook.sh
|
||||
38b30ae76411656821a262a4c990bb530906c0ab7da45b70d6ff38c58ee3cc54120c5c22a21bc9e58d025ec7ab4a88fcca780bcc2c12b86803c9b4a1cdaed144 deviceinfo
|
||||
"
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ deviceinfo_year="2019"
|
|||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_gpu_accelerated="true"
|
||||
deviceinfo_drm="true"
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot-bootpart"
|
||||
# Where to flash boot.img, or in our case where to flash the pmOS boot partition.
|
||||
# This is a bit confusing.
|
||||
deviceinfo_flash_fastboot_partition_kernel="cache"
|
||||
deviceinfo_flash_fastboot_partition_system="userdata"
|
||||
deviceinfo_flash_fastboot_partition_kernel="super"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2"
|
||||
deviceinfo_getty="ttyMSM0;115200"
|
||||
deviceinfo_generate_systemd_boot="true"
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Some devices (xiaomi-surya) ship with a touchscreen that has no persistent
|
||||
# firmware storage. That is unfortunate and means we need to provide firmware
|
||||
# from the initramfs for FDE to work.
|
||||
# This is only the case for the novatek touchscreens. Their firmware resides
|
||||
# in /vendor/firmware. Let's copy it over.
|
||||
# The file names are novatek_ts_huaxing_fw.bin and novatek_ts_tianma_fw.bin,
|
||||
# for both panels respectively.
|
||||
|
||||
for input in /sys/class/input/input*/uevent
|
||||
do
|
||||
if grep -q "NT36XXX" "$input"
|
||||
then
|
||||
echo "nt36xxx is loaded, mounting firmware for it!"
|
||||
|
||||
mkdir /firmware-mnt
|
||||
|
||||
for part in /sys/block/sd*/sd*
|
||||
do
|
||||
DEVNAME="$(grep DEVNAME "$part"/uevent | sed 's/DEVNAME=//g')"
|
||||
PARTNAME="$(grep PARTNAME "$part"/uevent | sed 's/PARTNAME=//g')"
|
||||
|
||||
# Could be vendor_a or vendor_b
|
||||
if [[ "$PARTNAME" == "vendor"* ]]
|
||||
then
|
||||
mount -o ro,nodev,noexec,nosuid \
|
||||
"/dev/$DEVNAME" /firmware-mnt
|
||||
break
|
||||
# Super partition with vendor on a subpartition, system if retrofit
|
||||
elif [[ "$PARTNAME" == "super" ]] || [[ "$PARTNAME" == "system" ]]
|
||||
then
|
||||
if ! make-dynpart-mappings "/dev/$DEVNAME"; then continue; fi;
|
||||
|
||||
for dynpart in /dev/mapper/*
|
||||
do
|
||||
if [[ "$dynpart" == *"vendor"* ]]
|
||||
then
|
||||
mount -o ro,nodev,noexec,nosuid \
|
||||
"$dynpart" /firmware-mnt
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -d /firmware-mnt/firmware ]
|
||||
then
|
||||
for firmware_file in /firmware-mnt/firmware/novatek_ts_*_fw.bin
|
||||
do
|
||||
echo "Found novatek firmware file at $firmware_file"
|
||||
|
||||
cp $firmware_file /lib/firmware/
|
||||
done
|
||||
|
||||
umount /firmware-mnt
|
||||
fi
|
||||
|
||||
break
|
||||
fi
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue