2019-08-28 08:27:48 +00:00
|
|
|
# Reference: <https://postmarketos.org/devicepkg>
|
2020-04-22 19:36:05 +00:00
|
|
|
# Maintainer: Martijn Braam <martijn@brixit.nl>
|
2020-08-04 09:46:27 +00:00
|
|
|
# Co-Maintainer: Luca Weiss <luca@z3ntu.xyz>
|
|
|
|
# Co-Maintainer: Bart Ribbers <bribbers@disroot.org>
|
2020-11-28 02:40:08 +00:00
|
|
|
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
2020-04-25 09:51:42 +00:00
|
|
|
pkgname=device-pine64-pinephone
|
2021-01-24 14:39:54 +00:00
|
|
|
pkgver=0.19
|
|
|
|
pkgrel=0
|
2019-08-28 08:27:48 +00:00
|
|
|
pkgdesc="PINE64 PinePhone"
|
|
|
|
url="https://postmarketos.org"
|
|
|
|
license="MIT"
|
|
|
|
arch="aarch64"
|
|
|
|
options="!check !archcheck"
|
2021-01-26 21:46:42 +00:00
|
|
|
subpackages="
|
|
|
|
$pkgname-nonfree-firmware:nonfree_firmware
|
|
|
|
$pkgname-ofono
|
|
|
|
$pkgname-phosh
|
|
|
|
$pkgname-shelli
|
2021-01-24 14:39:54 +00:00
|
|
|
$pkgname-plasma-mobile:plasma_mobile
|
2021-01-26 21:46:42 +00:00
|
|
|
"
|
2020-10-07 11:22:26 +00:00
|
|
|
depends="
|
|
|
|
alsa-ucm-conf
|
|
|
|
atinout
|
2020-12-22 05:53:11 +00:00
|
|
|
eg25-manager
|
|
|
|
eg25-manager-openrc
|
2020-10-07 11:22:26 +00:00
|
|
|
gpsd
|
2021-01-08 23:49:47 +00:00
|
|
|
iw
|
2020-10-07 11:22:26 +00:00
|
|
|
linux-postmarketos-allwinner
|
|
|
|
mesa-dri-gallium
|
|
|
|
mesa-egl
|
|
|
|
postmarketos-base
|
|
|
|
u-boot-pinephone
|
|
|
|
uboot-tools
|
|
|
|
"
|
2019-08-28 08:27:48 +00:00
|
|
|
makedepends="devicepkg-dev"
|
2021-01-10 19:58:44 +00:00
|
|
|
install="$pkgname.post-install $pkgname.post-upgrade"
|
2021-01-08 23:49:47 +00:00
|
|
|
source="
|
2021-01-26 21:46:42 +00:00
|
|
|
00_alsa_pinephone_dshare.conf
|
2020-07-14 17:21:48 +00:00
|
|
|
10-pinephone-proximity.rules
|
2021-01-24 14:39:54 +00:00
|
|
|
60-flashlight.rules
|
2021-01-08 23:49:47 +00:00
|
|
|
70-wifi-pm.rules
|
2019-12-11 21:15:52 +00:00
|
|
|
90-modem-eg25.rules
|
2021-01-08 23:49:47 +00:00
|
|
|
deviceinfo
|
|
|
|
gpsd_device-hook.sh
|
|
|
|
gpsd_pinephone.initd
|
|
|
|
hwtest.ini
|
2020-06-25 12:29:04 +00:00
|
|
|
setup-modem.sh
|
2020-12-22 05:53:11 +00:00
|
|
|
setup-modem.sh.ofono
|
2021-01-08 23:49:47 +00:00
|
|
|
sysrq.conf
|
|
|
|
uboot-script.cmd
|
|
|
|
ucm/HiFi.conf
|
|
|
|
ucm/PinePhone.conf
|
|
|
|
ucm/VoiceCall.conf
|
2020-06-25 12:29:04 +00:00
|
|
|
"
|
2020-10-29 05:29:48 +00:00
|
|
|
# workaround to purge the -elogind subpackage that was previously
|
|
|
|
# created/installed
|
|
|
|
provides="$pkgname-elogind=$pkgver-r$pkgrel"
|
2019-08-28 08:27:48 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
devicepkg_build $startdir $pkgname
|
2021-01-26 21:46:42 +00:00
|
|
|
mkimage \
|
|
|
|
-A arm \
|
|
|
|
-O linux \
|
|
|
|
-T script \
|
|
|
|
-C none \
|
|
|
|
-a 0 \
|
|
|
|
-e 0 \
|
|
|
|
-n postmarketos \
|
|
|
|
-d "$srcdir"/uboot-script.cmd \
|
|
|
|
"$srcdir"/boot.scr
|
2019-08-28 08:27:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
devicepkg_package $startdir $pkgname
|
2020-07-21 18:04:51 +00:00
|
|
|
install -Dm644 "$srcdir"/boot.scr \
|
2019-08-28 08:27:48 +00:00
|
|
|
"$pkgdir"/boot/boot.scr
|
2020-06-17 17:18:14 +00:00
|
|
|
|
2021-01-26 21:46:42 +00:00
|
|
|
# Make /boot/allwinner/sun50i-a64-pine64-pinephone*.dtb resolve to
|
|
|
|
# /boot/sun50i-a64-pine64-pinephone*.dtb. This is because the device tree
|
|
|
|
# names in u-boot include the vendor and the one in postmarketOS doesn't.
|
2020-06-17 17:18:14 +00:00
|
|
|
ln -s .. "$pkgdir"/boot/allwinner
|
|
|
|
|
2020-07-21 18:04:51 +00:00
|
|
|
install -Dm644 "$srcdir"/hwtest.ini \
|
2019-09-09 11:54:06 +00:00
|
|
|
"$pkgdir"/usr/share/hwtest.ini
|
2019-11-30 23:12:15 +00:00
|
|
|
|
2019-12-11 21:15:52 +00:00
|
|
|
# GPS
|
2020-07-21 18:04:51 +00:00
|
|
|
install -Dm755 "$srcdir"/gpsd_pinephone.initd \
|
2019-12-11 21:15:52 +00:00
|
|
|
"$pkgdir"/etc/init.d/gpsd_pinephone
|
2020-07-21 18:04:51 +00:00
|
|
|
install -Dm755 "$srcdir"/gpsd_device-hook.sh \
|
2019-12-11 21:15:52 +00:00
|
|
|
"$pkgdir"/etc/gpsd/device-hook
|
2020-07-14 17:21:48 +00:00
|
|
|
install -D -m644 "$srcdir"/10-pinephone-proximity.rules \
|
|
|
|
"$pkgdir"/usr/lib/udev/rules.d/10-pinephone-proximity.rules
|
2019-12-11 21:15:52 +00:00
|
|
|
|
2020-02-11 22:10:21 +00:00
|
|
|
# Fix "sysrq: HELP..." messages in dmesg while playing audio
|
2021-01-26 21:46:42 +00:00
|
|
|
# (Headphone output interferes with the serial console on the headphone
|
|
|
|
# jack)
|
2020-07-21 18:04:51 +00:00
|
|
|
install -Dm644 "$srcdir"/sysrq.conf \
|
2020-02-11 22:10:21 +00:00
|
|
|
"$pkgdir"/etc/sysctl.d/sysrq.conf
|
|
|
|
|
2019-11-30 23:12:15 +00:00
|
|
|
# Alsa usecase manager config
|
2020-09-30 19:26:49 +00:00
|
|
|
install -Dm644 "$srcdir"/PinePhone.conf \
|
|
|
|
"$pkgdir"/usr/share/alsa/ucm2/PinePhone/PinePhone.conf
|
2020-07-21 18:04:51 +00:00
|
|
|
install -Dm644 "$srcdir"/HiFi.conf \
|
2020-09-30 19:26:49 +00:00
|
|
|
"$pkgdir"/usr/share/alsa/ucm2/PinePhone/HiFi.conf
|
2020-07-21 18:04:51 +00:00
|
|
|
install -Dm644 "$srcdir"/VoiceCall.conf \
|
2020-09-30 19:26:49 +00:00
|
|
|
"$pkgdir"/usr/share/alsa/ucm2/PinePhone/VoiceCall.conf
|
2019-09-10 04:21:13 +00:00
|
|
|
|
2020-02-20 16:44:45 +00:00
|
|
|
# Modem
|
2020-06-25 12:29:04 +00:00
|
|
|
install -Dm755 "$srcdir"/setup-modem.sh \
|
|
|
|
"$pkgdir"/usr/bin/pinephone_setup-modem
|
2021-01-26 21:46:42 +00:00
|
|
|
install -Dm644 "$srcdir"/90-modem-eg25.rules -t \
|
|
|
|
"$pkgdir"/usr/lib/udev/rules.d/
|
2020-07-21 18:04:51 +00:00
|
|
|
|
2021-01-08 23:49:47 +00:00
|
|
|
# Wifi / PM
|
2021-01-26 21:46:42 +00:00
|
|
|
install -Dm644 "$srcdir"/70-wifi-pm.rules -t \
|
|
|
|
"$pkgdir"/usr/lib/udev/rules.d/
|
2019-08-28 08:27:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-22 05:53:11 +00:00
|
|
|
ofono() {
|
|
|
|
pkgdesc="ofono support"
|
|
|
|
install_if="$pkgname=$pkgver-r$pkgrel ofono"
|
|
|
|
replaces="$pkgname"
|
|
|
|
install -Dm755 "$srcdir"/setup-modem.sh.ofono \
|
|
|
|
"$subpkgdir"/usr/bin/pinephone_setup-modem
|
|
|
|
}
|
|
|
|
|
2019-08-28 08:27:48 +00:00
|
|
|
nonfree_firmware() {
|
2020-10-27 23:57:49 +00:00
|
|
|
pkgdesc="Wifi, Bluetooth and Autofocus firmware"
|
2021-01-26 21:46:42 +00:00
|
|
|
depends="
|
|
|
|
linux-firmware-rtlwifi
|
|
|
|
linux-firmware-rtl_bt
|
|
|
|
firmware-pine64-rtl8723bt
|
|
|
|
firmware-pine64-ov5640
|
|
|
|
"
|
2019-08-28 08:27:48 +00:00
|
|
|
mkdir "$subpkgdir"
|
|
|
|
}
|
2020-07-10 13:40:40 +00:00
|
|
|
|
|
|
|
phosh() {
|
2021-01-26 21:46:42 +00:00
|
|
|
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-phosh"
|
2020-07-10 13:40:40 +00:00
|
|
|
depends="wys-pinephone"
|
|
|
|
mkdir "$subpkgdir"
|
|
|
|
}
|
2020-09-14 11:25:43 +00:00
|
|
|
|
2021-01-24 14:39:54 +00:00
|
|
|
plasma_mobile() {
|
|
|
|
install_if="$pkgname=$pkgver-r$pkgrel plasma-phone-components"
|
|
|
|
install -Dm644 "$srcdir"/60-flashlight.rules -t "$subpkgdir"/usr/lib/udev/rules.d/
|
|
|
|
}
|
|
|
|
|
2021-01-26 21:46:42 +00:00
|
|
|
shelli() {
|
|
|
|
install_if="$pkgname=$pkgver-r$pkgrel shelli"
|
|
|
|
|
|
|
|
# Alsa default audio must be stereo
|
|
|
|
install -Dm644 "$srcdir"/00_alsa_pinephone_dshare.conf \
|
|
|
|
"$subpkgdir"/etc/alsa/conf.d/00_alsa_pinephone_dshare.conf
|
|
|
|
}
|