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-04-25 09:51:42 +00:00
|
|
|
pkgname=device-pine64-pinephone
|
2020-10-07 11:22:26 +00:00
|
|
|
pkgver=0.11
|
|
|
|
pkgrel=0
|
2019-08-28 08:27:48 +00:00
|
|
|
pkgdesc="PINE64 PinePhone"
|
|
|
|
url="https://postmarketos.org"
|
|
|
|
license="MIT"
|
|
|
|
arch="aarch64"
|
|
|
|
options="!check !archcheck"
|
2020-10-27 08:18:47 +00:00
|
|
|
subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-phosh"
|
2020-10-07 11:22:26 +00:00
|
|
|
depends="
|
|
|
|
alsa-ucm-conf
|
|
|
|
atinout
|
|
|
|
gpsd
|
|
|
|
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"
|
|
|
|
install="$pkgname.post-install"
|
2020-04-22 19:36:05 +00:00
|
|
|
source="deviceinfo
|
2019-08-28 08:27:48 +00:00
|
|
|
uboot-script.cmd
|
2020-02-11 22:10:21 +00:00
|
|
|
sysrq.conf
|
2019-09-09 11:54:06 +00:00
|
|
|
hwtest.ini
|
2020-07-14 17:21:48 +00:00
|
|
|
10-pinephone-proximity.rules
|
2019-12-11 21:15:52 +00:00
|
|
|
gpsd_pinephone.initd
|
|
|
|
gpsd_device-hook.sh
|
|
|
|
90-modem-eg25.rules
|
2020-09-30 19:26:49 +00:00
|
|
|
ucm/PinePhone.conf
|
2020-05-02 16:18:35 +00:00
|
|
|
ucm/HiFi.conf
|
|
|
|
ucm/VoiceCall.conf
|
2019-09-10 04:21:13 +00:00
|
|
|
eg25.initd
|
2020-06-25 12:29:04 +00:00
|
|
|
setup-modem.sh
|
|
|
|
"
|
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
|
2020-01-10 16:42:21 +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
|
|
|
|
|
|
|
# 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
|
|
|
|
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
|
|
|
|
# (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
|
2019-09-10 04:21:13 +00:00
|
|
|
install -Dm755 "$srcdir"/eg25.initd "$pkgdir"/etc/init.d/eg25
|
2020-06-25 12:29:04 +00:00
|
|
|
install -Dm755 "$srcdir"/setup-modem.sh \
|
|
|
|
"$pkgdir"/usr/bin/pinephone_setup-modem
|
2020-07-21 18:04:51 +00:00
|
|
|
install -Dm644 "$srcdir"/90-modem-eg25.rules -t "$pkgdir"/usr/lib/udev/rules.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"
|
|
|
|
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() {
|
|
|
|
install_if="$pkgname postmarketos-ui-phosh"
|
|
|
|
depends="wys-pinephone"
|
|
|
|
mkdir "$subpkgdir"
|
|
|
|
}
|
2020-09-14 11:25:43 +00:00
|
|
|
|
2020-10-07 11:22:26 +00:00
|
|
|
sha512sums="4043b326d5d4f5f82a4a4e2cc44fe6692a13d21555c812698da887a24c08cc20738cb85094bfbd2d6c84189e0d36292d2d8afbcc22e33ce8e13808eceb7a3c56 deviceinfo
|
2020-10-22 06:16:28 +00:00
|
|
|
b20d4fb9f08a1bbc1c12ce6940e438a00f5c8d400fbc5071e951ffc69f77d2421204472e86f1a7df0488d250f3ec16205b75d4eac8c3cb5521fe9a02ea24865a uboot-script.cmd
|
2020-02-11 22:10:21 +00:00
|
|
|
f4b5509fd6a8b23f3667f5e7262b3a19c607a37cb9eaf7d0e93eb826d45c26ec12df4810879bacb8e4042bb83cc80b2b436224c8d47b6d67361369a724bbf7ee sysrq.conf
|
2019-11-30 23:12:15 +00:00
|
|
|
3dd6d612c381cb0002049d1974d8fb5aa5a53a1eb4d6bcbf62eb2ad52cfdc45f0f6ad24a699716d3513b0371aa1316f25dc72afc10d7176cc3b99d0965c3f030 hwtest.ini
|
2020-07-14 17:21:48 +00:00
|
|
|
b53cc6f2531854cc9c1e4c334185a20551d64c8675ee8a8eaa03b99d80808fad421a0f6e99e5be212a974d88c85f461a71ba59ac59c29f298c82f211e3be1ef4 10-pinephone-proximity.rules
|
2019-12-11 21:15:52 +00:00
|
|
|
1017fc3f325227da58c77abdc59e9735288d91a7ccc63ec784fe0241c523786b617a11ce8045dab2a74ca12a7dd70aaa334af91836418db1e96a3266fecaa4fd gpsd_pinephone.initd
|
|
|
|
ccbc83b84b5028bc2c8e526759004ce71b50b2675ecffee98f5676c70a3332197a231ff9d2fd46444dd3c0a637ec08ce6125b18240fe6bfc13f624a15192e648 gpsd_device-hook.sh
|
2020-07-21 18:04:51 +00:00
|
|
|
7dc2b7c20b4a2b15f597a6417bd01797643dad84a3683b0dee648e030fb6326e9d020307643fdcdf1bb43fc44af9975697e417003bd359610bae2d8ce614fc00 90-modem-eg25.rules
|
2020-09-30 19:26:49 +00:00
|
|
|
e852b48a687f9b2a0eca444aa3d00a1818aead9f5e5d28e070b51c9d6f8ec648e66f1d88e2bfa94d74533f9ffb9aacc1703da2a06693f85fa04ff97fd7528012 PinePhone.conf
|
|
|
|
c3abc45269fb135075f5e227161c68ac234775b87fcf224385c5f40123108bf87e1351a1f1ec6786e964f493129511b8363070116a9a451e53cd7b17b3a76cc8 HiFi.conf
|
2020-10-27 19:11:12 +00:00
|
|
|
5c12e9bf4677bbcf49c16a731f7580bb18df95489b10671323dc2f600bc8e1be0031fd911db47ad641500a7bb58d9386fa124c63456a076fddda796d0d165b1d VoiceCall.conf
|
2020-09-30 19:26:49 +00:00
|
|
|
db57bd1613ae988a05df86fa962352145f480e1a4e5a0ff921e734cf35ecd755b7f14775a70bb31a7e875813cbc7a4722202cf76023f1b15862bbd5390d0b757 eg25.initd
|
2020-10-27 08:18:47 +00:00
|
|
|
0c81d758e1bcb56ed2cdaf91124121ebbd4dd7a5e25f02a7685b837faf660949d05f6b07b39a1c6a9ca22a7029cdcf3c6dac8f1038e37c8a34cb7c5702e9df51 setup-modem.sh"
|