device-qualcomm-sdm845: new aport (MR 4599)

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
This commit is contained in:
Caleb Connolly 2023-12-05 15:38:08 +00:00 committed by Caleb Connolly
parent 6edf162782
commit 4266e41791
No known key found for this signature in database
GPG key ID: 7930459FB9303217
6 changed files with 125 additions and 0 deletions

View file

@ -65,6 +65,7 @@ device/*/device-oneplus-fajita/ @calebccff
device/*/device-qemu-aarch64/ @Minecrell @ollieparanoid
device/*/device-qemu-amd64/ @Minecrell @ollieparanoid
device/*/device-qemu-riscv64/ @Minecrell @z3ntu
device/*/device-qualcomm-sdm845/ @calebccff
device/*/device-samsung-chagallwifi/ @Grimler
device/*/device-samsung-coreprimevelte/ @legolivesmatter @balejk
device/*/device-samsung-j5y17lte/ @andrisas

View file

@ -0,0 +1,2 @@
[quirks]
fbdev_force_refresh=true

View file

@ -0,0 +1,53 @@
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Caleb Connolly <caleb.connolly@linaro.org>
pkgname=device-qualcomm-sdm845
pkgdesc="Generic device package for Qualcomm SDM845 devices"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
fwupd>=1.8.6
linux-firmware-qcom
linux-firmware-ath10k
linux-postmarketos-qcom-sdm845
mkbootimg
postmarketos-base
soc-qcom-sdm845
soc-qcom-sdm845-modem
soc-qcom-sdm845-nonfree-firmware
soc-qcom-sdm845-qbootctl
soc-qcom-sdm845-ucm
systemd-boot
"
makedepends="devicepkg-dev"
source="
10-unl0kr.conf
deviceinfo
q6voiced.conf
modules-initfs
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir"/10-unl0kr.conf \
"$pkgdir"/etc/unl0kr.conf.d/10-unl0kr.conf
install -Dm644 q6voiced.conf "$pkgdir"/etc/conf.d/q6voiced
}
sha512sums="
f700af3145b79d1ef9edfb22982899b25cabfb212f9620dcbd3a2e6f44b5ad591e0a66056c6fcd66c3fde89a2b5f551e8a8fe2e65cf0e2a48adec57c027d7825 10-unl0kr.conf
fb5c0bc1e8e9667fb47985e767280eea016d66d821974b2d9aa36aa6cf87f8bdc9bd5a3bb76464744c2fb4d762acf7e6c9c45bb845f172f81d09ce9ff04c5a54 deviceinfo
5f3e1c286baea16a5b0a4a34cef7ad774d3aa5cc384e1deb4fba40d1f9372a708baf3b587e3edac69edcf04b5513f0111c1976b649b424cc721733ce4ddabc19 q6voiced.conf
3bbacc8c260e2c0af509b9b123218f830610ac7aef82efc9b117fc62ccda4155e588be718dcb399102b5534a25900e53840083add166a7ac5b399ddc702de904 modules-initfs
"

View file

@ -0,0 +1,37 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Qualcomm SDM845 device"
deviceinfo_manufacturer="Qualcomm"
deviceinfo_codename="qualcomm-sdm845"
deviceinfo_year="2023"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_mesa_driver="msm"
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="system"
deviceinfo_flash_fastboot_partition_system="userdata"
deviceinfo_kernel_cmdline="earlycon console=tty0 console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_getty="ttyMSM0;115200"
deviceinfo_generate_systemd_boot="true"
deviceinfo_boot_filesystem="fat32"
# Look ma! no hands!
# u-boot picks the right DTB for us, no need to specify it in systemd-boot.
# deviceinfo_dtb=""
deviceinfo_initfs_compression="zstd:fast"
# Required for devices using UFS as storage (instead of e.g. eMMC)
deviceinfo_rootfs_image_sector_size="4096"

View file

@ -0,0 +1,10 @@
gpi
i2c_qcom_geni
phy-qcom-qusb2
rmi_core
rmi_i2c
qcom_spmi_haptics
edt-ft5x06
focaltech_fts
nt36xxx
novatek_nvt_ts

View file

@ -0,0 +1,22 @@
_dt_compatible="$(cat /sys/firmware/devicetree/base/compatible | \
tr '\0' '|' | cut -d'|' -f1)"
# Set q6voice_card and q6voice_device based on compatible string
# shift,axolotl: q6voice_card=0, q6voice_device=12
# oneplus,enchilada: q6voice_card=0, q6voice_device=6
# oneplus,fajita: q6voice_card=0, q6voice_device=6
# xiaomi,beryllium: q6voice_card=0, q6voice_device=4
case "$_dt_compatible" in
"shift,axolotl")
q6voice_card=0
q6voice_device=12
;;
"oneplus,enchilada"|"oneplus,fajita")
q6voice_card=0
q6voice_device=6
;;
"xiaomi,beryllium-tianma"|"xiaomi,beryllium-ebbg")
q6voice_card=0
q6voice_device=4
;;
esac