summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/xserver/XX_xserver.sh
diff options
context:
space:
mode:
authorBastian Wissler2008-08-29 11:31:34 +0200
committerBastian Wissler2008-08-29 11:31:34 +0200
commitea946678e9ebc00d37b489ec4f22e2bbf2bc04a3 (patch)
treeb4beabaf77385081cc48631e94c8d720b620f7f5 /os-plugins/plugins/xserver/XX_xserver.sh
parent* removed uclibc-busybox from tools folder, too (as it is not being used) (diff)
downloadcore-ea946678e9ebc00d37b489ec4f22e2bbf2bc04a3.tar.gz
core-ea946678e9ebc00d37b489ec4f22e2bbf2bc04a3.tar.xz
core-ea946678e9ebc00d37b489ec4f22e2bbf2bc04a3.zip
First real stage3 implementation (I just thought last time)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2128 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/xserver/XX_xserver.sh')
-rw-r--r--os-plugins/plugins/xserver/XX_xserver.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh
index d37592ff..0d84c84c 100644
--- a/os-plugins/plugins/xserver/XX_xserver.sh
+++ b/os-plugins/plugins/xserver/XX_xserver.sh
@@ -38,11 +38,42 @@ if [ -e /initramfs/plugin-conf/xserver.conf ]; then
sed "s/.*v4 Server Module: //")
# proprietary ATI/NVidia modules listed a different way with hwinfo
[ -z "$xmodule" ] || error "${hcfg_hwsetup}" nonfatal
+ set -x
+
+ if [ $(grep -i -m 1 'Driver Activation Cmd: "modprobe fglrx"' \
+ /etc/hwinfo.data | wc -l) -eq "1" -a $xserver_prefnongpl -eq 1 ]
+ then
+ # we have an ati card here
+ ATI=1
+ MODULE_PATH="/opt/openslx/plugin-repo/xserver/ati/atiroot/usr/lib/xorg/modules/\,\
+/opt/openslx/plugin-repo/xserver/ati/atiroot/usr/X11R6/lib/modules/\,"
+ xmodule="fglrx"
+ LINKAGE="/mnt/var/lib/X11R6/xserver/usr/lib/"
+ cp -r /mnt/opt/openslx/plugin-repo/xserver/ati/atiroot/etc/* /mnt/etc/
+ ln -s \
+ /mnt/opt/openslx/plugin-repo/xserver/ati/atiroot/usr/lib/libGL.so.1.2 \
+ ${LINKAGE}libGL.so.1
+ ln -s \
+ /mnt/opt/openslx/plugin-repo/xserver/ati/atiroot/usr/lib/libGL.so.1.2 \
+ ${LINKAGE}libGL.so.1.2
+
+ # TODO: This is probably Ubuntu-specific
+ echo "/opt/openslx/plugin-repo/xserver/ati/atiroot/usr/lib/\n\
+/opt/openslx/plugin-repo/xserver/ati/atiroot/usr/X11R6/lib/" \
+ > /mnt/etc/ld.so.conf.d/999opengl.conf
+ ldsc="on" # regenerate ld.so.cache
+ fi
+
+ set +x
+
+ # TODO: nvidia module
+
echo -e "# $xfc\n# autogenerated X hardware configuration by the xserver \
plugin in OpenSLX stage3\n# DO NOT EDIT THIS FILE BUT THE PLUGIN INSTEAD" \
> $xfc
echo '
Section "Files"
+ ModulePath "/usr/lib/xorg/modules/"
EndSection
Section "ServerFlags"
Option "AllowMouseOpenFail"
@@ -161,6 +192,13 @@ Section "InputDevice"\
a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents"
}' -i $xfc
fi
+
+
+ if [ "$xserver_prefnongpl" -eq "1" ]; then
+ sed -e "s,ModulePath \",ModulePath \"${MODULE_PATH},g" \
+ -i $xfc
+ fi
+
[ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ...";
# some configurations produce no proper screen resolution without
# Horizsync and Vertrefresh set (more enhancements might be needed for