forked from Mirror/pmbootstrap
Workaround for mdss-fb (#927)
This commit is contained in:
parent
0cca286aba
commit
405b702e32
8 changed files with 74 additions and 32 deletions
|
@ -1,15 +1,15 @@
|
||||||
pkgname=device-sony-amami
|
pkgname=device-sony-amami
|
||||||
pkgver=1
|
pkgver=1
|
||||||
pkgrel=13
|
pkgrel=14
|
||||||
pkgdesc="Sony Xperia Z1 Compact"
|
pkgdesc="Sony Xperia Z1 Compact"
|
||||||
url="https://github.com/postmarketOS"
|
url="https://github.com/postmarketOS"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
depends="linux-sony-amami mkbootimg firmware-sony-amami"
|
depends="linux-sony-amami mkbootimg mdss-fb-init-hack firmware-sony-amami"
|
||||||
makedepends=""
|
makedepends=""
|
||||||
install=""
|
install=""
|
||||||
subpackages=""
|
subpackages=""
|
||||||
source="deviceinfo 90-android-touch-dev.rules fb-workaround.sh udev-v4l-hack.sh"
|
source="deviceinfo 90-android-touch-dev.rules"
|
||||||
options="!check"
|
options="!check"
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
@ -17,13 +17,7 @@ package() {
|
||||||
"$pkgdir/etc/deviceinfo"
|
"$pkgdir/etc/deviceinfo"
|
||||||
install -D -m644 "$srcdir"/90-android-touch-dev.rules \
|
install -D -m644 "$srcdir"/90-android-touch-dev.rules \
|
||||||
"$pkgdir"/etc/udev/rules.d/90-android-touch-dev.rules
|
"$pkgdir"/etc/udev/rules.d/90-android-touch-dev.rules
|
||||||
install -D -m644 "$srcdir"/fb-workaround.sh \
|
|
||||||
"$pkgdir"/etc/profile.d/fb-workaround.sh
|
|
||||||
install -D -m644 "$srcdir"/udev-v4l-hack.sh \
|
|
||||||
"$pkgdir"/etc/profile.d/00-udev-v4l-hack.sh
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="64e3bed1ee54551e6582b5b3f2547fb0cd4d0fab8a8c1beaea4b661113f0bd8d1bb3874ac5d0fcc104806bcf1cf49695c868bec46511bb055662692232d2f3da deviceinfo
|
sha512sums="64e3bed1ee54551e6582b5b3f2547fb0cd4d0fab8a8c1beaea4b661113f0bd8d1bb3874ac5d0fcc104806bcf1cf49695c868bec46511bb055662692232d2f3da deviceinfo
|
||||||
8b6034c0338ab4c7d648f47983aad6da07e427e7dba47baabf85a1b3ddeeda47c8d7fbcd547a302c9a759b2943ee30d3e82c3b368d8582833a058e4671638a9e 90-android-touch-dev.rules
|
8b6034c0338ab4c7d648f47983aad6da07e427e7dba47baabf85a1b3ddeeda47c8d7fbcd547a302c9a759b2943ee30d3e82c3b368d8582833a058e4671638a9e 90-android-touch-dev.rules"
|
||||||
281937447a73c18e8eec195cbf485fcd513aec20b8df559c26b89fbefa5872c41865cba2440e2cc8a9cc76801bca9ab61f9562c536c6f5f10c925e3ca7f372f3 fb-workaround.sh
|
|
||||||
4f528656c4febb18742e89552dfe7fdc824ed4ad6ad2777d20b4f55040edd93d8e3ea657baabcdbe77bd0fb4bd3d23e5e0b2dae574f0df6723b2e26216ee81e1 udev-v4l-hack.sh"
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
main() {
|
|
||||||
# Wait untill graphical enviroment is running
|
|
||||||
sleep 5
|
|
||||||
# Workaround for buggy graphics driver
|
|
||||||
for i in 1 2
|
|
||||||
do
|
|
||||||
echo "0,0" > /sys/class/graphics/fb0/pan
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# tty1 autologin
|
|
||||||
if [ $(tty) = "/dev/tty1" ]; then
|
|
||||||
# Run in background, to make /etc/profile not wait for it to finish
|
|
||||||
main &
|
|
||||||
fi
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ -e /lib/udev/v4l_id ]; then
|
|
||||||
mv /lib/udev/v4l_id /lib/udev/v4l_id_
|
|
||||||
echo "WARNING: v4l_id hangs with the current kernel."
|
|
||||||
echo "=> Moved it from /lib/udev/v4l_id to /lib/udev/v4l_id_"
|
|
||||||
fi
|
|
21
aports/main/mdss-fb-init-hack/APKBUILD
Normal file
21
aports/main/mdss-fb-init-hack/APKBUILD
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
pkgname=mdss-fb-init-hack
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Workaround for buggy framebuffer driver (mdss-fb)"
|
||||||
|
url="https://github.com/postmarketOS/pmbootstrap"
|
||||||
|
arch="noarch"
|
||||||
|
license="GPL3"
|
||||||
|
depends="msm-fb-refresher"
|
||||||
|
makedepends=""
|
||||||
|
install="$pkgname.post-install"
|
||||||
|
subpackages=""
|
||||||
|
source="$pkgname.initd $pkgname.sh $install"
|
||||||
|
options=""
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
|
||||||
|
install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/sbin/mdss-fb-hack"
|
||||||
|
}
|
||||||
|
sha512sums="dcda465ef62cd9d92d5e7c9f17e45982d5428950b1f6248b172408dce33d53eb866000a9290b63d41c61a8050547048f90ff9016d64f39c25f06fb6537ddc401 mdss-fb-init-hack.initd
|
||||||
|
22cb037d51a74fd363748c7c0b84f313ac9fce04a32953da00c338befc3af58012a24b7cb92a011fc8fe55722d1ceae7d42173c477297e00094e45d58d2e5b82 mdss-fb-init-hack.sh
|
||||||
|
b6f5a366a78a5ffb4d4243c8add3f2d4d6515f9d2abef832a98472b8aa9651c8e29bf97bef5284d5eb0b47e2cb229f736537401651836bf260f54ff2fcae5061 mdss-fb-init-hack.post-install"
|
26
aports/main/mdss-fb-init-hack/mdss-fb-init-hack.initd
Normal file
26
aports/main/mdss-fb-init-hack/mdss-fb-init-hack.initd
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
cmd=/sbin/mdss-fb-hack
|
||||||
|
pid=/run/mdss-fb-hack.pid
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
after bootmisc
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Starting mdss-fb hack"
|
||||||
|
start-stop-daemon --start --exec $cmd --background \
|
||||||
|
--pidfile $pid --make-pidfile
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping mdss-fb hack"
|
||||||
|
start-stop-daemon --stop --exec $cmd
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Add mdss-fb-init-hack to default runlevel
|
||||||
|
rc-update add mdss-fb-init-hack default
|
18
aports/main/mdss-fb-init-hack/mdss-fb-init-hack.sh
Normal file
18
aports/main/mdss-fb-init-hack/mdss-fb-init-hack.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
# Wait for graphical environment to start
|
||||||
|
until PID=$(pidof weston) || PID=$(pidof kwin_wayland) || PID=$(pidof xorg-server)
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
# Run msm-fb-refresher twice to workaround buggy framebuffer driver
|
||||||
|
for _ in 1 2
|
||||||
|
do
|
||||||
|
msm-fb-refresher
|
||||||
|
done
|
||||||
|
|
||||||
|
wait "$PID"
|
||||||
|
done
|
|
@ -34,6 +34,7 @@ sh_files="
|
||||||
./aports/main/postmarketos-android-recovery-installer/pmos_install_functions
|
./aports/main/postmarketos-android-recovery-installer/pmos_install_functions
|
||||||
./aports/main/postmarketos-android-recovery-installer/pmos_setpw
|
./aports/main/postmarketos-android-recovery-installer/pmos_setpw
|
||||||
./aports/main/postmarketos-android-recovery-installer/update-binary
|
./aports/main/postmarketos-android-recovery-installer/update-binary
|
||||||
|
./aports/main/mdss-fb-init-hack/mdss-fb-init-hack.sh
|
||||||
./aports/main/postmarketos-ui-hildon/postmarketos-ui-hildon.post-install
|
./aports/main/postmarketos-ui-hildon/postmarketos-ui-hildon.post-install
|
||||||
$(find . -path './aports/main/postmarketos-ui-hildon/*.sh')
|
$(find . -path './aports/main/postmarketos-ui-hildon/*.sh')
|
||||||
$(find . -name '*.trigger')
|
$(find . -name '*.trigger')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue