device-fxtec-qx1050: add initial support with mainline kernel (MR 5350)

Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
This commit is contained in:
Stanislav Zaikin 2024-07-14 11:55:18 +02:00 committed by Henrik Grimler
parent a9b857963a
commit a66a24d941
No known key found for this signature in database
GPG key ID: B0076E490B71616B
7 changed files with 7199 additions and 0 deletions

View file

@ -0,0 +1,31 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-fxtec-qx1050
pkgdesc="F(x)tec Pro1x (QX1050)"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
linux-postmarketos-qcom-sm6115
firmware-fxtec-qx1050-adreno
firmware-fxtec-qx1050-radio
firmware-fxtec-qx1050-rproc
mkbootimg
postmarketos-base
"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
f5f591cf45f48c84b3cc672b998f82636011b1f86400c910c0877f7f5f6719b547028a45aed15109b1ff94a67873efb8c742a05b04daf578955ac2d70d081037 deviceinfo
"

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="fxtec pro1x (qx1050)"
deviceinfo_manufacturer="fxtec"
deviceinfo_codename="fxtec-qx1050"
deviceinfo_year="2020"
deviceinfo_dtb="qcom/sm6115-fxtec-pro1x"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_gpu_accelerated="false"
deviceinfo_chassis="handset"
deviceinfo_keyboard="true"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2160"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_append_dtb="true"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_sparse="true"
deviceinfo_flash_fastboot_partition_vbmeta="vbmeta"
# Required for devices using UFS as storage (instead of e.g. eMMC)
deviceinfo_rootfs_image_sector_size="4096"

View file

@ -0,0 +1,77 @@
pkgname=firmware-fxtec-qx1050
pkgver=1
pkgrel=0
pkgdesc="Firmware for F(x)tec Pro1x (QX1050)"
subpackages="
$pkgname-adreno
$pkgname-radio
$pkgname-rproc
"
url="https://github.com/zstas/fxtec-pro1x-firmware"
arch="aarch64"
license="proprietary"
makedepends="pil-squasher"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="f52d17cb759b9132b327f5cd10dc8c1b69d8d238"
source="$pkgname-$_commit.tar.gz::https://github.com/zstas/fxtec-pro1x-firmware/archive/$_commit.tar.gz"
builddir="$srcdir/fxtec-pro1x-firmware-$_commit"
build() {
pil-squasher a610_zap.mbn a610_zap.mdt
pil-squasher adsp.mbn adsp.mdt
pil-squasher cdsp.mbn cdsp.mdt
pil-squasher modem.mbn modem.mdt
pil-squasher venus.mbn venus.mdt
}
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
adreno() {
pkgdesc="Fxtec Pro1x (QX1050) adreno firmware"
install -Dm644 "$builddir"/a610_zap.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm6115/Fxtec/QX1050/"
install -Dm644 "$builddir"/a630_sqe.fw -t \
"$subpkgdir/lib/firmware/qcom/"
}
radio() {
pkgdesc="Fxtec Pro1x (QX1050) radio firmware"
install -Dm644 "$builddir"/board-2.bin -t \
"$subpkgdir/lib/firmware/ath10k/WCN3990/hw1.0/"
install -Dm644 "$builddir"/firmware-5.bin -t \
"$subpkgdir/lib/firmware/ath10k/WCN3990/hw1.0/"
install -Dm644 "$builddir"/adsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm6115/Fxtec/QX1050/"
install -Dm644 "$builddir"/cdsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm6115/Fxtec/QX1050/"
install -Dm644 "$builddir"/modem.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm6115/Fxtec/QX1050/"
install -Dm644 "$builddir"/modemuw.jsn -t \
"$subpkgdir/lib/firmware/qcom/sm6115/Fxtec/QX1050/"
install -Dm644 "$builddir"/venus.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm6115/Fxtec/QX1050/"
install -Dm644 "$builddir"/wlanmdsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm6115/Fxtec/QX1050/"
}
rproc() {
pkgdesc="Modem and Wifi services and configuration"
depends="
rmtfs
tqftpserv
tqftpserv-openrc
pd-mapper
pd-mapper-openrc
"
install="$subpkgname.post-install $subpkgname.post-upgrade"
mkdir "$subpkgdir"
}
sha512sums="
c46658bc9536dd7bdb97aa787c5c3f2093fc27f7279d2ca48baf88030c7ff671ae09632b980c61fad9dad91cb57b5ebd8d5f773bf85b92f48249987946e6ccda firmware-fxtec-qx1050-f52d17cb759b9132b327f5cd10dc8c1b69d8d238.tar.gz
"

View file

@ -0,0 +1,4 @@
#!/bin/sh
rc-update add rmtfs boot
rc-update add tqftpserv boot
rc-update add pd-mapper boot

View file

@ -0,0 +1,4 @@
#!/bin/sh
rc-update add rmtfs boot
rc-update add tqftpserv boot
rc-update add pd-mapper boot

View file

@ -0,0 +1,65 @@
pkgname=linux-postmarketos-qcom-sm6115
pkgver=6.10
pkgrel=0
pkgdesc="Mainline Kernel fork for SM6115 devices"
arch="aarch64"
_carch="arm64"
_flavor="postmarketos-qcom-sm6115"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-community"
makedepends="
bash
bc
bison
devicepkg-dev
flex
openssl-dev
perl
python3
"
_repository="sm6115_mainline"
_commit="6b7c96d10fc4264724e6b793ac8f1ec72757f885"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/zstas/$_repository/archive/$_commit.tar.gz
$_config
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$arch" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
}
package() {
mkdir -p "$pkgdir"/boot
install -Dm644 "$builddir/arch/$_carch/boot/Image.gz" \
"$pkgdir/boot/vmlinuz"
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
sha512sums="
b324e8a3a45b8412448bdc414afcdd5cdc79af2d0159a25b0de8fe74797c01c6b6a27ab9f028a506fac27cd484949f7f825fe79e4f96344cd283903884577137 linux-postmarketos-qcom-sm6115-6b7c96d10fc4264724e6b793ac8f1ec72757f885.tar.gz
3bcc5d6ebd9a03f0b50aeb7c6360fd7aa97cb30eb98c985a217749de19b150a1a9bf91d63e3cc48eaf4b17ff6ff2075f1e4bad42abe41201b748ea2378457a41 config-postmarketos-qcom-sm6115.aarch64
"