2019-06-07 16:00:15 +00:00
|
|
|
# Contributor: Asriel Dreemurr <asriel.danctnix@gmail.com>
|
|
|
|
# Contributor: Danct12 <danct12@disroot.org>
|
|
|
|
# Contributor: pinoaffe
|
|
|
|
# Maintainer: Asriel Dreemurr <asriel.danctnix@gmail.com>
|
|
|
|
# Maintainer: Danct12 <danct12@disroot.org>
|
|
|
|
|
2018-03-20 18:46:01 +00:00
|
|
|
# Reference: <https://postmarketos.org/devicepkg>
|
|
|
|
pkgname="device-xiaomi-santoni"
|
|
|
|
pkgdesc="Xiaomi Redmi 4X"
|
2019-06-06 19:59:17 +00:00
|
|
|
pkgver=0.5
|
2020-03-06 07:02:36 +00:00
|
|
|
pkgrel=5
|
2018-03-20 18:46:01 +00:00
|
|
|
url="https://postmarketos.org"
|
|
|
|
license="MIT"
|
2018-11-07 06:45:58 +00:00
|
|
|
arch="aarch64"
|
|
|
|
options="!check !archcheck"
|
2019-06-27 09:42:02 +00:00
|
|
|
depends="postmarketos-base linux-xiaomi-santoni mkbootimg mesa-dri-swrast msm-fb-refresher"
|
2018-03-20 18:46:01 +00:00
|
|
|
makedepends="devicepkg-dev"
|
2019-06-06 19:59:17 +00:00
|
|
|
subpackages="$pkgname-nonfree-firmware:nonfree_firmware
|
|
|
|
$pkgname-nonfree-userland:nonfree_userland
|
|
|
|
$pkgname-hybris:hybris
|
|
|
|
$pkgname-hybris-x11:hybris_x11"
|
2020-02-10 11:44:59 +00:00
|
|
|
source="
|
|
|
|
hybris/10-santoni-android-x11.conf
|
|
|
|
hybris/70-santoni-android.rules
|
|
|
|
hybris/fstab.android
|
|
|
|
misc/100-charging.rules
|
|
|
|
misc/charging.sh
|
|
|
|
misc/discharging.sh
|
|
|
|
ucm/90-device-xiaomi-santoni-audio.rules
|
|
|
|
ucm/HiFi
|
|
|
|
ucm/msm8920-sku7-snd-card.conf
|
|
|
|
deviceinfo
|
2019-04-28 08:43:35 +00:00
|
|
|
directfbrc
|
2020-02-10 11:44:59 +00:00
|
|
|
fb.modes"
|
2018-03-20 18:46:01 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
devicepkg_build $startdir $pkgname
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
devicepkg_package $startdir $pkgname
|
2019-04-19 12:13:40 +00:00
|
|
|
|
2019-04-28 08:43:35 +00:00
|
|
|
install -Dm644 "$srcdir"/fb.modes "$pkgdir"/etc/fb.modes
|
|
|
|
install -Dm644 "$srcdir"/directfbrc "$pkgdir"/etc/directfbrc
|
|
|
|
|
|
|
|
install -Dm755 "$srcdir"/charging.sh "$pkgdir"/usr/lib/device-xiaomi-santoni/charging.sh
|
|
|
|
install -Dm755 "$srcdir"/discharging.sh "$pkgdir"/usr/lib/device-xiaomi-santoni/discharging.sh
|
|
|
|
install -Dm644 "$srcdir"/100-charging.rules \
|
|
|
|
"$pkgdir"/etc/udev/rules.d/100-charging.rules
|
2019-06-06 19:59:17 +00:00
|
|
|
|
|
|
|
# Disable v4l udev rules (video4linux), because without the camera
|
|
|
|
# firmware blobs this makes udev helper hang (#1033)
|
|
|
|
mkdir -p "$pkgdir"/etc/udev/rules.d
|
|
|
|
ln -s /dev/null "$pkgdir"/etc/udev/rules.d/60-persistent-v4l.rules
|
|
|
|
|
2019-04-19 12:13:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
nonfree_firmware() {
|
2019-06-07 14:25:51 +00:00
|
|
|
pkgdesc="Wi-Fi, ADSP Firmware (DON'T INSTALL IF USE **LIBHYBRIS**)"
|
2019-06-27 09:42:02 +00:00
|
|
|
depends="firmware-xiaomi-santoni wcnss-wlan adsp-audio pulseaudio pulseaudio-alsa alsa-plugins-pulse alsa-utils"
|
2019-07-14 12:40:42 +00:00
|
|
|
install="$pkgname-nonfree-firmware.post-install"
|
2019-04-19 12:13:40 +00:00
|
|
|
mkdir "$subpkgdir"
|
2019-06-27 09:42:02 +00:00
|
|
|
|
|
|
|
# Install UCM files for santoni
|
|
|
|
install -Dm644 "$srcdir"/HiFi \
|
2020-03-06 07:02:36 +00:00
|
|
|
"$subpkgdir"/usr/share/alsa/ucm2/msm8920-sku7-snd-card/HiFi
|
2019-06-27 09:42:02 +00:00
|
|
|
install -Dm644 "$srcdir"/msm8920-sku7-snd-card.conf \
|
2020-03-06 07:02:36 +00:00
|
|
|
"$subpkgdir"/usr/share/alsa/ucm2/msm8920-sku7-snd-card/msm8920-sku7-snd-card.conf
|
2019-06-27 09:42:02 +00:00
|
|
|
install -Dm644 "$srcdir"/90-device-xiaomi-santoni-audio.rules \
|
|
|
|
"$subpkgdir"/etc/udev/rules.d/90-device-xiaomi-santoni-audio.rules
|
2018-03-20 18:46:01 +00:00
|
|
|
}
|
|
|
|
|
2019-06-06 19:59:17 +00:00
|
|
|
nonfree_userland() {
|
2020-02-10 11:44:59 +00:00
|
|
|
pkgdesc="Pulls libhybris (Android) hardware adaptation, see the device's wiki page for post-install."
|
2019-06-06 19:59:17 +00:00
|
|
|
depends="$pkgname-hybris"
|
|
|
|
mkdir "$subpkgdir"
|
|
|
|
}
|
|
|
|
|
2020-01-10 10:32:58 +00:00
|
|
|
hybris() {
|
2019-06-06 19:59:17 +00:00
|
|
|
pkgdesc="libhybris (Android) hardware adaptation"
|
2019-07-13 17:02:46 +00:00
|
|
|
depends="hybris-base pulseaudio-modules-droid-7.1-caf alsa-plugins-pulse alsa-utils"
|
2019-06-06 19:59:17 +00:00
|
|
|
install="$pkgname-hybris.post-install"
|
|
|
|
|
|
|
|
mkdir "$subpkgdir"
|
|
|
|
|
|
|
|
# Android mounts (needed for loading firmware and configs from android container)
|
|
|
|
# Appended to fstab in post-install script
|
2020-02-10 11:44:59 +00:00
|
|
|
install -Dm644 "$srcdir"/fstab.android "$subpkgdir"/etc/fstab.android
|
2019-06-06 19:59:17 +00:00
|
|
|
|
|
|
|
# Android udev rules, depend on android users and groups presence
|
2020-02-10 11:44:59 +00:00
|
|
|
install -Dm644 "$srcdir"/70-santoni-android.rules \
|
2020-01-10 10:32:58 +00:00
|
|
|
"$subpkgdir"/etc/udev/rules.d/70-santoni-android.rules
|
2019-06-06 19:59:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
hybris_x11() {
|
2020-02-10 11:44:59 +00:00
|
|
|
pkgdesc="X11 modules for libhybris adaptation"
|
2019-06-06 19:59:17 +00:00
|
|
|
depends="hybris-base-x11-caf"
|
|
|
|
install_if="$pkgname-hybris xorg-server"
|
|
|
|
|
2019-06-09 07:30:42 +00:00
|
|
|
# X11 Hybris configuration
|
2020-01-10 10:32:58 +00:00
|
|
|
install -Dm644 "$srcdir"/10-santoni-android-x11.conf \
|
|
|
|
"$subpkgdir"/etc/X11/xorg.conf.d/10-santoni-android-x11.conf
|
2019-06-06 19:59:17 +00:00
|
|
|
}
|
2020-02-10 11:44:59 +00:00
|
|
|
sha512sums="dc68956408da82ac9775f23814fb6e1498e65a4c760ceda369a60a202cfc92ad27761d6da27f1802307042affc8a1925c576816a8acbf394dd6a15f32e3ea3c0 10-santoni-android-x11.conf
|
|
|
|
7c0cda58ddc36e8a6120ce969c1e7afc445817e20b38a4c33e986d3d584bcf0fbb4d82eeda4dab5abdf3429845621a4ffa155512f40e885be615042faf1de171 70-santoni-android.rules
|
|
|
|
8419c1c5d20bc7c7e4d8d72ec2848655526f99cabf9037ae1f7152f5df31363b70b724769225a88c1d614bea6ebe4ee24190702ea947229a843cc2884eac7175 fstab.android
|
2019-04-28 08:43:35 +00:00
|
|
|
7b1b138372cb173be38e820a1c386c3d30930d6753303478ae08c1362de3099d81c26eb2b833c5a0b340a82d821bd53309058ecb9b62e00c7ff323b632af2346 100-charging.rules
|
|
|
|
c4853babd5cd6371297e5e5d64364c064d540cd4beaba06d79b1001fe5c78fe3ee8bc5f6f4ba3e383743a09263028abc55f41bad45240b1c505e27ed087725c9 charging.sh
|
|
|
|
6012be4184af6c4f12f9b20a6f2d377ebd72b9b334df4fbb921ed9d8da865633631f77d19b02748ebee70442e2f3ffcb6af511ee5deaa40635bc53730c301076 discharging.sh
|
2020-02-10 11:44:59 +00:00
|
|
|
dc4bf7871307e659f220aebc3c9f7d74b861f46e1f3df1be37d724af984e46d91e553dbd36c2bd4482aa17dbe4d76d28dabe214952638f00830907466b110146 90-device-xiaomi-santoni-audio.rules
|
2020-03-06 07:02:36 +00:00
|
|
|
3452fe367e7b199d610fb3d8e9113b35e04071afc7585080edb6fe584ecc29591d8f3ab53ed4583c1ccea5882aa51050d6e56a5db7ef88f6c9af648ba1ef88af HiFi
|
|
|
|
7c702cf159699cea761ce7cb1ca21b79c59ceb3cdf1e410b537c4aa3a5aaa3be171b4c5555a713ac7a0e0f6dc389680cd5368a7783d14025fdc14d5f27fb922b msm8920-sku7-snd-card.conf
|
2020-03-07 16:19:37 +00:00
|
|
|
4aea469f7980900c2ffee2a3e77bf280cf722a5580425c545d25236cd8d1add1a6613ae9f73222d35554d1ccb8a2446220e0af244970894ad581bdcf79fb32df deviceinfo
|
2020-02-10 11:44:59 +00:00
|
|
|
3db3ec596e159be926ea2b5b2496c18e9bc7be24a64a232a56c89a0c9ee710aa2efb2b6fa9fc08efa34759e8242e6c629d08a4ce688ec8aa125830717c191515 directfbrc
|
|
|
|
b634d13cac1f10535a31c142c7391986ab402ae9910d8093989920f4c2dbd63722ee8595f11962bffd9d314e2835a1ead955a91355856f044911ddcf1e428427 fb.modes"
|