diff options
| author | James Meyer <james.meyer@operamail.com> | 2008-12-01 22:25:58 (GMT) | 
|---|---|---|
| committer | James Meyer <james.meyer@operamail.com> | 2008-12-01 22:25:58 (GMT) | 
| commit | 2d84ba41b2bf4939372e9765af40b268b57dfb01 (patch) | |
| tree | 2f05d1be49964536d98ca8c249d47bd99c4d8dee /abs/core-testing | |
| parent | 60a85896eec2c8e0e8b1c78c83cc39222649ceae (diff) | |
| download | linhes_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')
| -rwxr-xr-x | abs/core-testing/LinHES-config/PKGBUILD | 2 | ||||
| -rw-r--r-- | abs/core-testing/LinHES-config/templates/xorg/96xx_supported.txt | 46 | ||||
| -rwxr-xr-x | abs/core-testing/LinHES-config/xconfig.sh | 115 | 
3 files changed, 108 insertions, 55 deletions
| diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD index 10f0604..de51f4f 100755 --- a/abs/core-testing/LinHES-config/PKGBUILD +++ b/abs/core-testing/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@  pkgname=LinHES-config  pkgver=1.0 -pkgrel=54 +pkgrel=59  conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )  pkgdesc="Install and configure your system"  depends=(bc libstatgrab  mysql-python expect curl dnsutils parted sg3_utils nmbscan ) diff --git a/abs/core-testing/LinHES-config/templates/xorg/96xx_supported.txt b/abs/core-testing/LinHES-config/templates/xorg/96xx_supported.txt new file mode 100644 index 0000000..eddcbd4 --- /dev/null +++ b/abs/core-testing/LinHES-config/templates/xorg/96xx_supported.txt @@ -0,0 +1,46 @@ +    NVIDIA GPU product                    Device PCI ID +    ----------------------------------    ---------------------------------- +    GeForce2 MX/MX 400                    0x0110 +    GeForce2 MX 100/200                   0x0111 +    GeForce2 Go                           0x0112 +    Quadro2 MXR/EX/Go                     0x0113 +    GeForce4 MX 460                       0x0170 +    GeForce4 MX 440                       0x0171 +    GeForce4 MX 420                       0x0172 +    GeForce4 MX 440-SE                    0x0173 +    GeForce4 440 Go                       0x0174 +    GeForce4 420 Go                       0x0175 +    GeForce4 420 Go 32M                   0x0176 +    GeForce4 460 Go                       0x0177 +    Quadro4 550 XGL                       0x0178 +    GeForce4 440 Go 64M                   0x0179 +    Quadro NVS 400                        0x017A +    Quadro4 500 GoGL                      0x017C +    GeForce4 410 Go 16M                   0x017D +    GeForce4 MX 440 with AGP8X            0x0181 +    GeForce4 MX 440SE with AGP8X          0x0182 +    GeForce4 MX 420 with AGP8X            0x0183 +    GeForce4 MX 4000                      0x0185 +    Quadro4 580 XGL                       0x0188 +    Quadro NVS 280 SD                     0x018A +    Quadro4 380 XGL                       0x018B +    Quadro NVS 50 PCI                     0x018C +    GeForce2 Integrated GPU               0x01A0 +    GeForce4 MX Integrated GPU            0x01F0 +    GeForce3                              0x0200 +    GeForce3 Ti 200                       0x0201 +    GeForce3 Ti 500                       0x0202 +    Quadro DCC                            0x0203 +    GeForce4 Ti 4600                      0x0250 +    GeForce4 Ti 4400                      0x0251 +    GeForce4 Ti 4200                      0x0253 +    Quadro4 900 XGL                       0x0258 +    Quadro4 750 XGL                       0x0259 +    Quadro4 700 XGL                       0x025B +    GeForce4 Ti 4800                      0x0280 +    GeForce4 Ti 4200 with AGP8X           0x0281 +    GeForce4 Ti 4800 SE                   0x0282 +    GeForce4 4200 Go                      0x0286 +    Quadro4 980 XGL                       0x0288 +    Quadro4 780 XGL                       0x0289 +    Quadro4 700 GoGL                      0x028C
\ No newline at end of file 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 | 
