Skip to content

Instantly share code, notes, and snippets.

@psyke83
Created September 15, 2019 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psyke83/31f233144ea8fa21ecf3d9bae816b2e6 to your computer and use it in GitHub Desktop.
Save psyke83/31f233144ea8fa21ecf3d9bae816b2e6 to your computer and use it in GitHub Desktop.
pipplware kodi rpi3 fkms
pi@rpi4:~ $ diff -u /usr/bin/kodi kodi
--- a/usr/bin/kodi 2019-09-15 01:00:18.000000000 +0100
+++ b/usr/bin/kodi 2019-09-15 16:33:44.862844226 +0100
@@ -65,12 +65,20 @@
sleep 1
}
+is_fkms() {
+ if grep -q okay /proc/device-tree/soc/v3d@7ec00000/status 2> /dev/null || grep -q okay /proc/device-tree/soc/firmwarekms@7e600000/status 2> /dev/null ; then
+ return 0
+ else
+ return 1
+ fi
+}
+
save_screen_mode
# pick correct version for armv6 or armv7
rev="$(sed -n '/^Revision/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo)"
-if [ $(((0x$rev >> 23) & 1)) -ne 0 ] && [ $(((0x$rev >> 12) & 15)) -eq 3 ]; then
+if [ $(((0x$rev >> 23) & 1)) -ne 0 ] && [ $(((0x$rev >> 12) & 15)) -eq 3 ] || is_fkms; then
postfix="_v8"
elif [ $(((0x$rev >> 23) & 1)) -ne 0 ] && [ $(((0x$rev >> 12) & 15)) -ne 0 ]; then
postfix="_v7"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment