fairphone-fp5: new device (MR 4359)
Add an initial port for the Fairphone 5 smartphone. This includes firmware and close-to-mainline kernel package. [ci:skip-build]: Already built successfully in CI
This commit is contained in:
parent
5bc1505ed5
commit
64e1496e73
8 changed files with 6926 additions and 0 deletions
66
device/testing/device-fairphone-fp5/APKBUILD
Normal file
66
device/testing/device-fairphone-fp5/APKBUILD
Normal file
|
@ -0,0 +1,66 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-fairphone-fp5
|
||||
pkgdesc="Fairphone 5"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-postmarketos-qcom-sc7280
|
||||
make-dynpart-mappings
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
postmarketos-update-kernel
|
||||
swclock-offset
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
gtk.css
|
||||
modules-initfs
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-phosh
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Firmware for Modem, WiFi, etc."
|
||||
depends="
|
||||
firmware-fairphone-fp5-adsp
|
||||
firmware-fairphone-fp5-bluetooth
|
||||
firmware-fairphone-fp5-cdsp
|
||||
firmware-fairphone-fp5-ipa
|
||||
firmware-fairphone-fp5-modem
|
||||
firmware-fairphone-fp5-venus
|
||||
firmware-fairphone-fp5-wpss
|
||||
linux-firmware-ath11k
|
||||
msm-modem
|
||||
pd-mapper
|
||||
tqftpserv
|
||||
"
|
||||
install="$subpkgname.post-install"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
phosh() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel phosh"
|
||||
install -Dm644 "$srcdir"/gtk.css \
|
||||
"$subpkgdir"/etc/skel/.config/gtk-3.0/gtk.css
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f955819529664bad2a97ed7eb99e21a4a235c66b83366a48107312e8566d54399b936906d50274e65fd4ba32c4c2baaad632fdaee8e673371559c12354c68cde deviceinfo
|
||||
71cd1ffa1ae56874a0751ef9eb91f4bccbe2009c1287b2116f3c09e99e70e436ed3d3ef27684dd318c8ff140cdccd7428580788659b7c6b2a3d8df6948149171 gtk.css
|
||||
c535c211a6d594605e0e2af3536e457b4b6a4b833f26efda4dbd514597d080393a621338c274173f4633eadefc0c2ae830f7ceaa4cbe56a1e6715ff825af18f1 modules-initfs
|
||||
"
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
rc-update add tqftpserv boot
|
||||
rc-update add pd-mapper boot
|
39
device/testing/device-fairphone-fp5/deviceinfo
Normal file
39
device/testing/device-fairphone-fp5/deviceinfo
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Fairphone 5"
|
||||
deviceinfo_manufacturer="Fairphone"
|
||||
deviceinfo_codename="fairphone-fp5"
|
||||
deviceinfo_year="2023"
|
||||
deviceinfo_dtb="qcom/qcm6490-fairphone-fp5"
|
||||
deviceinfo_append_dtb="true"
|
||||
deviceinfo_arch="aarch64"
|
||||
deviceinfo_flash_kernel_on_update="true"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1224"
|
||||
deviceinfo_screen_height="2700"
|
||||
deviceinfo_getty="ttyMSM0;115200"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="PMOS_NO_OUTPUT_REDIRECT"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00000000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_header_version="1"
|
||||
deviceinfo_rootfs_image_sector_size="4096"
|
||||
deviceinfo_super_partitions="/dev/sda12 /dev/sda12"
|
||||
deviceinfo_flash_sparse="true"
|
5
device/testing/device-fairphone-fp5/gtk.css
Normal file
5
device/testing/device-fairphone-fp5/gtk.css
Normal file
|
@ -0,0 +1,5 @@
|
|||
/* TWEAKS-START phosh-clock-notch */
|
||||
.phosh-topbar-clock {
|
||||
margin-left: 75.0px;
|
||||
}
|
||||
/* TWEAKS-END phosh-clock-notch */
|
1
device/testing/device-fairphone-fp5/modules-initfs
Normal file
1
device/testing/device-fairphone-fp5/modules-initfs
Normal file
|
@ -0,0 +1 @@
|
|||
spi-geni-qcom
|
89
device/testing/firmware-fairphone-fp5/APKBUILD
Normal file
89
device/testing/firmware-fairphone-fp5/APKBUILD
Normal file
|
@ -0,0 +1,89 @@
|
|||
pkgname=firmware-fairphone-fp5
|
||||
pkgver=20230822
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware for Fairphone 5"
|
||||
subpackages="
|
||||
$pkgname-adsp
|
||||
$pkgname-bluetooth
|
||||
$pkgname-cdsp
|
||||
$pkgname-ipa
|
||||
$pkgname-modem
|
||||
$pkgname-venus
|
||||
$pkgname-wpss
|
||||
"
|
||||
url="https://github.com/FairBlobs/FP5-firmware"
|
||||
arch="aarch64"
|
||||
license="proprietary"
|
||||
options="!check !strip !archcheck !tracedeps pmb:cross-native"
|
||||
_commit="35845c6719f6394da1499a0ed3b5f20f372bdaec"
|
||||
source="https://github.com/FairBlobs/FP5-firmware/archive/$_commit/FP5-firmware-$_commit.tar.gz"
|
||||
builddir="$srcdir/FP5-firmware-$_commit"
|
||||
|
||||
package() {
|
||||
# parent package is empty
|
||||
mkdir -p "$pkgdir"
|
||||
}
|
||||
|
||||
adsp() {
|
||||
pkgdesc="Fairphone 5 adsp firmware"
|
||||
|
||||
install -Dm644 "$builddir"/adsp* -t \
|
||||
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
|
||||
install -Dm644 "$builddir"/battmgr.jsn -t \
|
||||
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
|
||||
}
|
||||
|
||||
bluetooth() {
|
||||
pkgdesc="Fairphone 5 bluetooth firmware"
|
||||
|
||||
install -Dm644 "$builddir"/msbtfw11.mbn -t \
|
||||
"$subpkgdir/lib/firmware/qca/"
|
||||
install -Dm644 "$builddir"/msnv11.bin -t \
|
||||
"$subpkgdir/lib/firmware/qca/"
|
||||
}
|
||||
|
||||
cdsp() {
|
||||
pkgdesc="Fairphone 5 cdsp firmware"
|
||||
|
||||
install -Dm644 "$builddir"/cdsp* -t \
|
||||
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
|
||||
}
|
||||
|
||||
ipa() {
|
||||
pkgdesc="Fairphone 5 ipa firmware"
|
||||
|
||||
cd "$builddir"
|
||||
for i in yupik_ipa_fws.*; do
|
||||
install -Dm644 $i \
|
||||
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/${i/yupik_/}"
|
||||
done
|
||||
}
|
||||
|
||||
modem() {
|
||||
pkgdesc="Fairphone 5 modem firmware"
|
||||
|
||||
# cp because of the modem_pr directory
|
||||
mkdir -p "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
|
||||
cp -r "$builddir"/modem* \
|
||||
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
|
||||
find "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/" \
|
||||
-type f -exec chmod 0644 {} \;
|
||||
}
|
||||
|
||||
venus() {
|
||||
pkgdesc="Fairphone 5 venus firmware"
|
||||
|
||||
install -Dm644 "$builddir"/vpu20_1v.mbn \
|
||||
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/venus.mbn"
|
||||
}
|
||||
|
||||
wpss() {
|
||||
pkgdesc="Fairphone 5 wpss firmware"
|
||||
|
||||
install -Dm644 "$builddir"/wpss* -t \
|
||||
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
562d245bee3a946e951ede7c30d0f6aecd8faa19a5a45dabf44904032ad3bb234bd96b68ef2553832b821aaf99d6ed4db72bb4d01daa75bba4cfc75c9722b046 FP5-firmware-35845c6719f6394da1499a0ed3b5f20f372bdaec.tar.gz
|
||||
"
|
59
device/testing/linux-postmarketos-qcom-sc7280/APKBUILD
Normal file
59
device/testing/linux-postmarketos-qcom-sc7280/APKBUILD
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
|
||||
|
||||
_flavor="postmarketos-qcom-sc7280"
|
||||
pkgname=linux-$_flavor
|
||||
pkgver=6.5.0
|
||||
pkgrel=0
|
||||
pkgdesc="Mainline Kernel fork for SC7280/SM7325/QCM6490 devices"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
url="https://github.com/z3ntu/linux"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps
|
||||
pmb:cross-native
|
||||
pmb:kconfigcheck-community
|
||||
"
|
||||
makedepends="bash bison findutils flex installkernel openssl-dev perl"
|
||||
|
||||
_repo="linux"
|
||||
_config="config-$_flavor.$arch"
|
||||
_commit="0f7331bd2d4470c9e135f7d1c05deee1076893a3"
|
||||
|
||||
# Source
|
||||
source="
|
||||
$_repo-$_commit.tar.gz::https://github.com/z3ntu/$_repo/archive/$_commit/$_repo-$_commit.tar.gz
|
||||
$_config
|
||||
"
|
||||
builddir="$srcdir/$_repo-$_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() {
|
||||
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="
|
||||
a0123de96f68ee15d98f2b251ac794b3a91c94d824d931e6ad7f585f53ca56f3369d97e65c560458eba46c30378832d32003459c771eb8179e370239337c75d9 linux-0f7331bd2d4470c9e135f7d1c05deee1076893a3.tar.gz
|
||||
2bad9a9c26069868a2ab6808627d73c60edc187a2e0376eb57c96dd797ee0f7e8ec98840482972c7f68f69e7ab3606b03a9583ba3d5c7a2c60c93dcf279efcc4 config-postmarketos-qcom-sc7280.aarch64
|
||||
"
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue