summaryrefslogtreecommitdiff
path: root/hooks-addons/51amd_geode
diff options
context:
space:
mode:
Diffstat (limited to 'hooks-addons/51amd_geode')
-rw-r--r--hooks-addons/51amd_geode56
1 files changed, 56 insertions, 0 deletions
diff --git a/hooks-addons/51amd_geode b/hooks-addons/51amd_geode
new file mode 100644
index 0000000..eb24281
--- /dev/null
+++ b/hooks-addons/51amd_geode
@@ -0,0 +1,56 @@
+# hook addon for thin clients with chip AMD - GEODE
+
+stat_before
+
+ # save Xorg version in file
+ Xorg -version > $DESTDIR/conf/xorg.version 2>&1
+
+cat << EOF > ${DESTDIR}/scripts/tcos-bottom/15amd_geode
+#!/bin/sh
+#
+
+# new header not using prereqs
+if [ "\$1" = "prereqs" ]; then
+ echo ""
+ exit 0
+fi
+
+
+quiet=n
+
+. /scripts/functions
+. /conf/tcos.conf
+. /conf/tcos-run-functions
+
+test1=0
+#geode 100B:0030
+#geode 1022:2081
+test1=\$(lspci -n |grep -c -e "100B:0030" -e "1022:2081")
+
+test2=0
+test2=\$(cat /conf/xorg.version | sed '/^\$/d' | head -1 | awk '{print \$NF}' | awk -F"." '{if (\$1 <= 1 && \$2 > 3) printf "1"}')
+
+
+if [ "\$test1" = "0" ] || [ "\$test2" = "1" ] ; then
+ # no client with chip amd geode or Xorg with amd fixes
+ exit 0
+fi
+
+[ "\$TCOS_XORG_VIDEO_DRIVER" = "fullauto" ] && exit 0
+[ "\$TCOS_XORG_VIDEO_DRIVER" = "xorgauto" ] && exit 0
+
+log_begin_msg "Loading xserver AMD Geode Support"
+
+ if [ -f /usr/lib/xorg/modules/drivers/amd_drv.so ]; then
+ configurexorg --newsettings --xdriver=amd --outputfile=/etc/X11/xorg.conf 2>> /tmp/initramfs.debug
+ elif [ -f /usr/lib/xorg/modules/drivers/geode_drv.so ]; then
+ configurexorg --newsettings --xdriver=geode --outputfile=/etc/X11/xorg.conf 2>> /tmp/initramfs.debug
+ fi
+
+log_end_msg \$?
+
+EOF
+chmod +x ${DESTDIR}/scripts/tcos-bottom/15amd_geode
+
+
+stat_after "AMD Geode Xorg support"