summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config/xconfig.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-12-01 22:25:58 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-12-01 22:25:58 (GMT)
commit2d84ba41b2bf4939372e9765af40b268b57dfb01 (patch)
tree2f05d1be49964536d98ca8c249d47bd99c4d8dee /abs/core-testing/LinHES-config/xconfig.sh
parent60a85896eec2c8e0e8b1c78c83cc39222649ceae (diff)
downloadlinhes_pkgbuild-2d84ba41b2bf4939372e9765af40b268b57dfb01.zip
linhes_pkgbuild-2d84ba41b2bf4939372e9765af40b268b57dfb01.tar.gz
linhes_pkgbuild-2d84ba41b2bf4939372e9765af40b268b57dfb01.tar.bz2
Early support for deciding if the nvidia 96xx video drivers should be used
instead of the latest. touch /etc/sysconfig/IGNORE_X if you don't want xconfig.sh to do anything while running in basic mode.
Diffstat (limited to 'abs/core-testing/LinHES-config/xconfig.sh')
-rwxr-xr-xabs/core-testing/LinHES-config/xconfig.sh115
1 files changed, 61 insertions, 54 deletions
diff --git a/abs/core-testing/LinHES-config/xconfig.sh b/abs/core-testing/LinHES-config/xconfig.sh
index 39b5ae6..db03e6f 100755
--- a/abs/core-testing/LinHES-config/xconfig.sh
+++ b/abs/core-testing/LinHES-config/xconfig.sh
@@ -1,6 +1,7 @@
#!/bin/bash
BASE=""
. /etc/profile
+NVIDIA_96XX="$TEMPLATES/xorg/96xx_supported.txt"
#TEMPLATES="/usr/share/templates"
function Xvalues {
@@ -11,6 +12,8 @@ function Xvalues {
VGACARDTYPE=vesa
else
VGACARDTYPE=`lspci|grep -i vga|sort -r|head -n 1| cut -d: -f3|cut -d" " -f 2`
+ CARDID=`lspci -n |grep 10de | cut -d" " -f3 |cut -d: -f2 `
+ VENDORID=`lspci -n |grep 10de | cut -d" " -f3 |cut -d: -f1`
fi
echo $VGACARDTYPE
currentmode=`cat $BASE/etc/X11/xorg.conf |grep Modes|awk -Fs ' { print $2 } '`
@@ -33,7 +36,12 @@ then
setupAdvancedX
fi
else
- setupX
+ if [ -f /etc/sysconfig/IGNORE_X ]
+ then
+ echo "Will not run xconfig.sh due to presence of /etc/sysconfig/IGNORE_X"
+ else
+ setupX
+ fi
fi
}
@@ -67,10 +75,9 @@ echo "#doing the advanced" > /tmp/options
ML="\t Modes \"${Xres}\""
fi
- echo $ML
+# echo $ML
case $Xcardtype in
NVIDIA|nVidia )
-
case $Xconnection in
DVI) ConnectedMonitor=DFP ;;
vga) ConnectedMonitor=CRT;;
@@ -112,50 +119,43 @@ echo "#doing the advanced" > /tmp/options
-e "/INSERT MODELINE/r $TEMPLATES/xorg/modeline.$Xcatagory" \
-e "s/^.*DisplaySize.*$/ $DS/" \
-e "s/^#.*HorizSync.*$/ $HS/g" \
- -e "s/^#.*VertRefresh.*$/ $VR/g" \
+ -e "s/^#.*VertRefresh.*$/ $VR/g" \
-e "/INSERT HERE/r /tmp/options" $TEMPLATES/xorg/xorg.conf.nvidia > $XORG_CONF
- ;;
+ ;;
ati|ATI)
- case $Xconnection in
- DVI) ConnectedMonitor="tmds1,nocrt1,notv";;
- VGA) ConnectedMonitor="crt1,notmds1,notv" ;;
- TV) ConnectedMonitor="tv,nocrt1,notmds1"
- echo "Option \"TVStandard\" \"$XTVstandard\"" >>/tmp/options
- echo "Option \"TVFormat\" \"$XTVconnection\"" >> /tmp/options
- ;;
-
- esac
-
-
- if [ x$XignoreEDID = x1 ]
- then
- DS=" DisplaySize $XDisplaysize"
- HS=" HorizSync $XHsync"
- VR=" VertRefresh $XVrefresh"
- else
- DS="# Display size edid used "
- HS="#Hsync edid used "
- VR="#Vertrefresh edid used "
-
- fi
-
- echo "Option \"ForceMonitors\" \"$ConnectedMonitor\"" >> /tmp/options
-
+ case $Xconnection in
+ DVI) ConnectedMonitor="tmds1,nocrt1,notv";;
+ VGA) ConnectedMonitor="crt1,notmds1,notv" ;;
+ TV) ConnectedMonitor="tv,nocrt1,notmds1"
+ echo "Option \"TVStandard\" \"$XTVstandard\"" >>/tmp/options
+ echo "Option \"TVFormat\" \"$XTVconnection\"" >> /tmp/options
+ ;;
+ esac
+ if [ x$XignoreEDID = x1 ]
+ then
+ DS=" DisplaySize $XDisplaysize"
+ HS=" HorizSync $XHsync"
+ VR=" VertRefresh $XVrefresh"
+ else
+ DS="# Display size edid used "
+ HS="#Hsync edid used "
+ VR="#Vertrefresh edid used "
+ fi
+
+ echo "Option \"ForceMonitors\" \"$ConnectedMonitor\"" >> /tmp/options
+
sed -e "s/^.*Modes.*$/\t $ML/" \
- -e "/INSERT MODELINE/r $TEMPLATES/xorg/modeline.$Xcatagory" \
- -e "s/^.*DisplaySize.*$/ $DS/" \
- -e "s/^#.*HorizSync.*$/ $HS/g" \
- -e "s/^#.*VertRefresh.*$/ $VR/g" \
- -e "/INSERT HERE/r /tmp/options" $TEMPLATES/xorg/xorg.conf.ati > $XORG_CONF
- ;;
+ -e "/INSERT MODELINE/r $TEMPLATES/xorg/modeline.$Xcatagory" \
+ -e "s/^.*DisplaySize.*$/ $DS/" \
+ -e "s/^#.*HorizSync.*$/ $HS/g" \
+ -e "s/^#.*VertRefresh.*$/ $VR/g" \
+ -e "/INSERT HERE/r /tmp/options" $TEMPLATES/xorg/xorg.conf.ati > $XORG_CONF
+ ;;
- via|VIA|Via) echo "no via here"
- ;;
+ via|VIA|Via) echo "no via here" ;;
- *)
- echo "unknown card type"
- ;;
+ *) echo "unknown card type" ;;
esac
}
@@ -163,7 +163,7 @@ echo "#doing the advanced" > /tmp/options
function setupX {
Xvalues
- echo "$currentmode ____ ${Xres}"
+ #echo "$currentmode ____ ${Xres}"
#if [ ! x${currentmode} = x\"${Xres}\" ]
if [ x = x ]
then
@@ -172,9 +172,19 @@ function setupX {
sed -e "s/^.*Modes.*$/\t Modes \"${Xres}\"/" $TEMPLATES/xorg/xorg.conf.nvidia > $XORG_CONF
if [ ! x$TESTMODE = "xtest" ]
then
- pacman --noconfirm -R libgl-dri
-# pacman --noconfirm -S nvidia-STB nvidia-utils
- pacman --noconfirm -S nvidia nvidia-utils
+ #nvidia check right here
+ grep -q $CARDID $NVIDIA_96XX
+ if [ $? = 0 ]
+ then
+ #install 96xx drivers
+ echo "installing nvidia 96xx drivers"
+ pacman --noconfirm -R libgl-dri > /dev/null 2>&1
+ pacman --noconfirm -S nvidia-96xx nvidia-96xx-utils > /dev/null 2>&1
+ else
+ #install latest drivers
+ pacman --noconfirm -R libgl-dri > /dev/null 2>&1
+ pacman --noconfirm -S nvidia nvidia-utils > /dev/null 2>&1
+ fi
fi
;;
VMware )
@@ -185,8 +195,8 @@ function setupX {
sed -e "s/^.*Modes.*$/\t Modes \"${Xres}\"/" $TEMPLATES/xorg/xorg.conf.via > $XORG_CONF
if [ ! x$TESTMODE = "xtest" ]
then
- pacman --noconfirm -R nvidia-STB nvidia-utils
- pacman --noconfirm -S libgl-dri
+ pacman --noconfirm -R nvidia nvidia-utils > /dev/null 2>&1
+ pacman --noconfirm -S libgl-dri > /dev/null 2>&1
fi
;;
@@ -194,20 +204,17 @@ function setupX {
sed -e "s/^.*Modes.*$/\t Modes \"${Xres}\"/" $TEMPLATES/xorg/xorg.conf.intel > $XORG_CONF
if [ ! x$TESTMODE = "xtest" ]
then
- pacman --noconfirm -Rd nvidia-utils
- pacman --noconfirm -S libgl-dri
+ pacman --noconfirm -R nvidia-utils > /dev/null 2>&1
+ pacman --noconfirm -S libgl-dri > /dev/null 2>&1
fi
;;
vesa) sed -e "s/^.*Modes.*$/\t Modes \"${Xres}\"/" $TEMPLATES/xorg/xorg.conf.vesa > $XORG_CONF
;;
- *) #XCONF=`hwd -x |grep etc`
- #XCONF=`hwd -x |grep etc|tr -d [:cntrl:]|cut -d\/ -f 2-`
- XCONF=/root/xorg.conf.new
+ *) XCONF=/root/xorg.conf.new
X -configure
- echo $XORG_CONF
grep -v Modes $XCONF | sed -e '/Depth.*16/a Modes "800x600"' -e '/Depth.*24/a Modes "800x600"' -e 's/dev\/mouse/dev\/psaux/g'> $XORG_CONF
- rm -f $XCONF
+ rm -f $XCONF 2>&1 > /dev/null
;;
esac
fi