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-05-24 16:11:43 +00:00
|
|
|
pkgver=0.28
|
2021-05-19 17:19:14 +00:00
|
|
|
pkgrel=2
|
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-phosh
|
|
|
|
$pkgname-shelli
|
2021-01-24 14:39:54 +00:00
|
|
|
$pkgname-plasma-mobile:plasma_mobile
|
2021-05-24 16:11:43 +00:00
|
|
|
$pkgname-upower
|
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
|
2021-05-27 12:07:03 +00:00
|
|
|
u-boot-pinephone>=2021.01_git20201228-r2
|
2021-04-27 14:06:44 +00:00
|
|
|
u-boot-tools
|
2020-10-07 11:22:26 +00:00
|
|
|
"
|
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
|
2021-04-25 09:48:35 +00:00
|
|
|
gsk-renderer-gl.sh
|
2021-01-08 23:49:47 +00:00
|
|
|
hwtest.ini
|
2021-02-05 14:07:23 +00:00
|
|
|
kirigami-lowpower.sh
|
2021-02-07 06:25:06 +00:00
|
|
|
modemmanager.conf
|
2020-06-25 12:29:04 +00:00
|
|
|
setup-modem.sh
|
2021-03-04 17:45:19 +00:00
|
|
|
eg25-pinephone-1.0.toml
|
|
|
|
eg25-pinephone-1.1.toml
|
|
|
|
eg25-pinephone-1.2.toml
|
2021-01-08 23:49:47 +00:00
|
|
|
sysrq.conf
|
|
|
|
uboot-script.cmd
|
|
|
|
ucm/HiFi.conf
|
|
|
|
ucm/PinePhone.conf
|
|
|
|
ucm/VoiceCall.conf
|
2021-05-24 16:11:43 +00:00
|
|
|
UPower.conf
|
2021-05-19 17:19:14 +00:00
|
|
|
pulse-pinephone.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
|
|
|
|
2021-05-19 17:19:14 +00:00
|
|
|
# Pulseaudio config
|
|
|
|
install -Dm644 "$srcdir"/pulse-pinephone.conf \
|
|
|
|
"$pkgdir"/etc/pulse/daemon.conf.d/89-pinephone.conf
|
|
|
|
|
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/
|
2021-02-07 06:25:06 +00:00
|
|
|
install -Dm644 "$srcdir"/modemmanager.conf \
|
|
|
|
"$pkgdir"/etc/conf.d/modemmanager
|
2021-03-04 17:45:19 +00:00
|
|
|
install -Dm644 "$srcdir"/eg25-pinephone-1.0.toml \
|
|
|
|
"$pkgdir"/etc/eg25-manager/pine64,pinephone-1.0.toml
|
|
|
|
install -Dm644 "$srcdir"/eg25-pinephone-1.1.toml \
|
|
|
|
"$pkgdir"/etc/eg25-manager/pine64,pinephone-1.1.toml
|
|
|
|
install -Dm644 "$srcdir"/eg25-pinephone-1.2.toml \
|
|
|
|
"$pkgdir"/etc/eg25-manager/pine64,pinephone-1.2.toml
|
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/
|
2021-04-25 09:48:35 +00:00
|
|
|
|
|
|
|
# Prevent artifacts in GTK4 apps (pmaports#1069)
|
|
|
|
install -Dm755 "$srcdir"/gsk-renderer-gl.sh -t \
|
|
|
|
"$pkgdir"/etc/profile.d/
|
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() {
|
2021-02-05 14:07:23 +00:00
|
|
|
install_if="$pkgname=$pkgver-r$pkgrel kirigami2"
|
2021-01-24 14:39:54 +00:00
|
|
|
install -Dm644 "$srcdir"/60-flashlight.rules -t "$subpkgdir"/usr/lib/udev/rules.d/
|
2021-02-05 14:07:23 +00:00
|
|
|
install -Dm644 "$srcdir"/kirigami-lowpower.sh "$subpkgdir"/etc/profile.d/kirigami-lowpower.sh
|
2021-01-24 14:39:54 +00:00
|
|
|
}
|
|
|
|
|
2021-05-24 16:11:43 +00:00
|
|
|
upower() {
|
|
|
|
install_if="$pkgname=$pkgver-r$pkgrel upower"
|
2021-05-30 14:37:21 +00:00
|
|
|
replaces="upower"
|
2021-05-24 16:11:43 +00:00
|
|
|
|
|
|
|
# Shutdown when PMIC reports critical battery level
|
2021-05-30 14:37:21 +00:00
|
|
|
install -Dm644 "$srcdir"/UPower.conf \
|
2021-05-24 16:11:43 +00:00
|
|
|
"$subpkgdir"/etc/UPower/UPower.conf
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
}
|
2021-05-13 16:54:18 +00:00
|
|
|
sha512sums="
|
|
|
|
5736444fd38ab4351d148ae96c479085f469bd1e51a692fb1827f8ac921a584389f7696985e1fba21c2deac88709910531f4ece282f45ff54e590c2b54b84ba3 00_alsa_pinephone_dshare.conf
|
2021-01-27 09:19:21 +00:00
|
|
|
b53cc6f2531854cc9c1e4c334185a20551d64c8675ee8a8eaa03b99d80808fad421a0f6e99e5be212a974d88c85f461a71ba59ac59c29f298c82f211e3be1ef4 10-pinephone-proximity.rules
|
|
|
|
9170da7ac869254644f2fc8d914102f2c16e917dbeb53e33b96c76936711d0540f55fa5c2526d73d5fe244500bc2728bc9d629e2524cf52c573d11e833aee666 60-flashlight.rules
|
|
|
|
8b6fa7b12c15f439c561901f3ffe24a1ef2a0c343401c0a79281060854ab29e08a1fb5e7adae8684b12aa9f535ed99e2dad993dce9724822cb0fbf2497dd86e5 70-wifi-pm.rules
|
|
|
|
7dc2b7c20b4a2b15f597a6417bd01797643dad84a3683b0dee648e030fb6326e9d020307643fdcdf1bb43fc44af9975697e417003bd359610bae2d8ce614fc00 90-modem-eg25.rules
|
2021-03-29 22:10:06 +00:00
|
|
|
018deaf7c42753257bb7abbd4e7977bcb74ad8ef6a9ff1fbae12240ccad262c6982454553f5e0073d98a561d5eb1f2150bf24be36cfbe78ad822886b3972cf5a deviceinfo
|
2021-01-27 09:19:21 +00:00
|
|
|
ccbc83b84b5028bc2c8e526759004ce71b50b2675ecffee98f5676c70a3332197a231ff9d2fd46444dd3c0a637ec08ce6125b18240fe6bfc13f624a15192e648 gpsd_device-hook.sh
|
|
|
|
1017fc3f325227da58c77abdc59e9735288d91a7ccc63ec784fe0241c523786b617a11ce8045dab2a74ca12a7dd70aaa334af91836418db1e96a3266fecaa4fd gpsd_pinephone.initd
|
2021-04-25 09:48:35 +00:00
|
|
|
9244687bfea20c78120f7c48388d141eff3e23a421e48504eac1479ec7f51197d9ca72468c9cc33c6e3d3fa32ee3514711545816e607d49870226e4a41a60a85 gsk-renderer-gl.sh
|
2021-01-27 09:19:21 +00:00
|
|
|
3dd6d612c381cb0002049d1974d8fb5aa5a53a1eb4d6bcbf62eb2ad52cfdc45f0f6ad24a699716d3513b0371aa1316f25dc72afc10d7176cc3b99d0965c3f030 hwtest.ini
|
2021-02-05 14:07:23 +00:00
|
|
|
6bc22b369b2d9058b702ac7a7862abaefaf8179b43491868bdb008d181b59104f1ded89db1da51a810e1ccdc803a579b924a438674283a65afc3a9c4d2894caf kirigami-lowpower.sh
|
2021-02-07 06:25:06 +00:00
|
|
|
3d6e9030125afc1dc3b654d1ce5d124ddd3ef3ad1a4d3e46c8168cf3f8a3762ffd0c75427759740ae26bd5c4f32b6704b7cf7e5806434884560fa704b7e72921 modemmanager.conf
|
2021-01-27 09:19:21 +00:00
|
|
|
fa063e2863afc48e627acc1a5b213a81499ba1dd30325f74f118a44e3964aec7e597b1f4bd318b7cf5bf14f27daf88e6ad9fc277ab106cbbe1189fdcc650d5c1 setup-modem.sh
|
2021-03-04 17:45:19 +00:00
|
|
|
f9386dfd902028988c9659bd6e001ba46ea87b35f5dce7723dd4cfbe971928c75f6fef9d706201d62cc24cca2d499a39c8c0fed58a3403e2cb848eb1aece0e19 eg25-pinephone-1.0.toml
|
|
|
|
cf7d4a611701745762f19746e40d87b6df14a6b24f2d466c4177b7ab5ee87a048bab719a6c66722198020e1aa73d3e12d3715b5588bc33bf207f3e86040dcc44 eg25-pinephone-1.1.toml
|
|
|
|
8adeca98002ff8ee850512f72f2e126348cfa817a1aefdd77d103aee76a6b2e6a024deffcbeef1235ee2fcc766003f55b67cedb3eb06ca92a58d5b81f2bf6848 eg25-pinephone-1.2.toml
|
2021-01-27 09:19:21 +00:00
|
|
|
f4b5509fd6a8b23f3667f5e7262b3a19c607a37cb9eaf7d0e93eb826d45c26ec12df4810879bacb8e4042bb83cc80b2b436224c8d47b6d67361369a724bbf7ee sysrq.conf
|
2021-03-29 22:01:38 +00:00
|
|
|
9d4bcc02c6c501b3a205516c8f276ef4293d88edea61ac725887ec28f9f6788320e9f9edd7f1cf29bbf6122acfad2ef5b3ad5e4b33763fe867bd23d2ac17ed5c uboot-script.cmd
|
2021-05-20 18:29:58 +00:00
|
|
|
aef9f00f1d327b11640c4dbcb7b6ad5b0bac3118e262af5d7d6a37d87757559856438c0adea834f03752725876c3f857ed903cdfaaf678459bbcd7633d523ded HiFi.conf
|
2021-01-27 09:19:21 +00:00
|
|
|
e852b48a687f9b2a0eca444aa3d00a1818aead9f5e5d28e070b51c9d6f8ec648e66f1d88e2bfa94d74533f9ffb9aacc1703da2a06693f85fa04ff97fd7528012 PinePhone.conf
|
2021-05-13 16:54:18 +00:00
|
|
|
6e226e8dc39a438629f443a33e1ba7ea5f7f1a08b98ec58b2bf97036e549d3ce9898de708020a632f4fd2f9d6540a621331e4d2c406c1e729d073113aff55ec3 VoiceCall.conf
|
2021-05-24 16:11:43 +00:00
|
|
|
ed0e03f7e1c0348c06be9a7922414469245604ce813bbf0c8910ef211cb993bbb0d0d4615c9c961d50712415f85d6b73e0cf02780ac784666aac56e4889341e4 UPower.conf
|
2021-05-19 17:19:14 +00:00
|
|
|
9c472065b19141dd4c7555869b955de2e679b36e597f9fa3bdac18d0e9460986b0e2fffe1e04751301305f1b6474c1375803afb7d6212eeae91b4905d0bf8ff8 pulse-pinephone.conf
|
2021-05-13 16:54:18 +00:00
|
|
|
"
|