Author: branden Date: 2004-05-27 14:21:03 -0500 (Thu, 27 May 2004) New Revision: 1454
Modified: trunk/debian/CHANGESETS trunk/debian/TODO trunk/debian/changelog trunk/debian/xserver-xfree86.config.in trunk/debian/xserver-xfree86.templates Log: Rework xserver-xfree86/config/device/driver debconf logic. + Attempt to populate driver choices by scanning filesystem first. + observe() if we do not find any. + Set default driver on an architecture-specific basis. Use vga for alpha; vesa for amd64, hurd-i386, and i386; and fbdev for everyone else, except mips and mipsel boxen that report themselves as "SGI Ind*" machines via /proc/cpuinfo, for which we default to newport. (Closes: #226193, #249614) Update xserver-xfree86/config/device/bus_id logic. + Add comments describing why we don't default to a blank answer all the time. + Use "1" as the default answer on systems that identify themselves as "SGI Indigo2" machines via /proc/cpuinfo. + Update template description to tell SGI Indigo2 XL users to specify "1" for the BusID. Modified: trunk/debian/CHANGESETS =================================================================== --- trunk/debian/CHANGESETS 2004-05-27 18:44:07 UTC (rev 1453) +++ trunk/debian/CHANGESETS 2004-05-27 19:21:03 UTC (rev 1454) @@ -14,4 +14,17 @@ #251119: Fix breakage of NumLock. 1452 +Rework xserver-xfree86/config/device/driver debconf logic. Attempt to populate +driver choices by scanning filesystem first. observe() if we do not find any. +Set default driver on an architecture-specific basis. Use vga for alpha; vesa +for amd64, hurd-i386, and i386; and fbdev for everyone else, except mips and +mipsel boxen that report themselves as "SGI Ind*" machines via /proc/cpuinfo, +for which we default to newport. (Closes: #226193, #249614) Update +xserver-xfree86/config/device/bus_id logic. Add comments describing why we +don't default to a blank answer all the time. Use "1" as the default answer on +systems that identify themselves as "SGI Indigo2" machines via /proc/cpuinfo. +Update template description to tell SGI Indigo2 XL users to specify "1" for the +BusID. + 1454 + vim:set ai et sts=4 sw=4 tw=80: Modified: trunk/debian/TODO =================================================================== --- trunk/debian/TODO 2004-05-27 18:44:07 UTC (rev 1453) +++ trunk/debian/TODO 2004-05-27 19:21:03 UTC (rev 1454) @@ -37,8 +37,6 @@ configuration with readline frontend; lack of defaults + #229097: xserver-xfree86: [debconf] should tell the user the file is not going to be rewritten earlier [BR] - + #226193: xserver-xfree86: [debconf] need better (and arch-specific) video - driver defaults when discover fails [BR] + #226365: xserver-xfree86: [debconf] ask monitor/selection-method at medium priority, and make the default answer medium [BR] + #149586: xserver-xfree86: [debconf] errors from discover should not be @@ -54,8 +52,6 @@ + #229850: xserver-xfree86: [debconf] monitor selection methods need to be more careful about clobbering autodetected monitor sync ranges; study Jay Berkenbilt's feedback [BR] - + #249614: xserver-xfree86: [debconf] autodetect SGI Indy and Indigo2 systems - [BR] * hurd-i386 MANIFEST, and probably some debhelper files, are out of date. * Should xc/include/{Xw32defs.h,Xwinsock.h} be installed (and shipped) for the benefit of cross-compilers? Check upstream Imakeage. Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2004-05-27 18:44:07 UTC (rev 1453) +++ trunk/debian/changelog 2004-05-27 19:21:03 UTC (rev 1454) @@ -4,8 +4,25 @@ warped the XKB types/basic file 7 years backwards in time. (Closes: #251119) - -- Branden Robinson <[EMAIL PROTECTED]> Thu, 27 May 2004 03:58:57 -0500 + * Rework xserver-xfree86/config/device/driver debconf logic. + + Attempt to populate driver choices by scanning filesystem first. + + observe() if we do not find any. + + Set default driver on an architecture-specific basis. Use vga for + alpha; vesa for amd64, hurd-i386, and i386; and fbdev for everyone else, + except mips and mipsel boxen that report themselves as "SGI Ind*" + machines via /proc/cpuinfo, for which we default to newport. + (Closes: #226193, #249614) + * Update xserver-xfree86/config/device/bus_id logic. + + Add comments describing why we don't default to a blank answer all the + time. + + Use "1" as the default answer on systems that identify themselves as + "SGI Indigo2" machines via /proc/cpuinfo. + + Update template description to tell SGI Indigo2 XL users to specify "1" + for the BusID. + + -- Branden Robinson <[EMAIL PROTECTED]> Thu, 27 May 2004 14:07:59 -0500 + xfree86 (4.3.0.dfsg.1-2) unstable; urgency=low Changes by Branden Robinson: Modified: trunk/debian/xserver-xfree86.config.in =================================================================== --- trunk/debian/xserver-xfree86.config.in 2004-05-27 18:44:07 UTC (rev 1453) +++ trunk/debian/xserver-xfree86.config.in 2004-05-27 19:21:03 UTC (rev 1454) @@ -548,81 +548,108 @@ # priority of xserver-xfree86/config/device/driver PRIORITY=high -# set a failsafe answer for xserver-xfree86/config/device/driver -DEFAULT=vesa +DRIVER_DIR=/usr/X11R6/lib/modules/drivers + +# Build list of available video drivers, omitting the atimisc, r128, and +# radeon sub-modules (the ati driver knows when and how to load these). +# v4l is not a display driver, and dummy is for advanced users. +DRIVER_LIST="$(echo $(find "$DRIVER_DIR" -name '*_drv.o' 2>/dev/null \ + | sed 's|^.*/\(.*\)_drv\.o|\1|' \ + | egrep -v '(atimisc|dummy|r128|radeon|v4l)' | sort) \ + | sed 's/ /, /g')" + +if [ -z "$DRIVER_LIST" ]; then + observe "no video driver modules found in $DRIVER_DIR" +fi + +# Set a hard-coded module list (if necessary) and default driver module on an +# architecture-specific basis. +case "$ARCH" in + alpha) + DRIVER_LIST=${DRIVER_LIST:=ati, cirrus, glint, mga, nv, rendition, s3, s3virge, savage, siliconmotion, tdfx, tga, vga} + DEFAULT_DRIVER=vga + ;; + amd64) + DRIVER_LIST=${DRIVER_LIST:=apm, ark, ati, chips, cirrus, cyrix, fbdev, glint, i128, i740, i810, imstt, mga, neomagic, newport, nsc, nv, rendition, s3, s3virge, savage, siliconmotion, sis, tdfx, tga, trident, tseng, vesa, vga, via, vmware} + DEFAULT_DRIVER=vesa + ;; + arm|hppa) + DRIVER_LIST=${DRIVER_LIST:=ati, chips, fbdev, glint, mga, nv, s3, s3virge, savage, sis, tdfx, trident, vga} + DEFAULT_DRIVER=fbdev + ;; + hurd-i386) + DRIVER_LIST=${DRIVER_LIST:=apm, ark, ati, chips, cirrus, cyrix, fbdev, glint, i128, i740, i810, imstt, mga, neomagic, newport, nsc, nv, rendition, s3, s3virge, savage, siliconmotion, sis, tdfx, tga, trident, tseng, vesa, vga, vmware} + DEFAULT_DRIVER=vesa + ;; + i386) + DRIVER_LIST=${DRIVER_LIST:=apm, ark, ati, chips, cirrus, cyrix, fbdev, glide, glint, i128, i740, i810, imstt, mga, neomagic, newport, nsc, nv, rendition, s3, s3virge, savage, siliconmotion, sis, tdfx, tga, trident, tseng, vesa, vga, vmware} + DEFAULT_DRIVER=vesa + ;; + ia64) + DRIVER_LIST=${DRIVER_LIST:=apm, ark, ati, chips, cirrus, cyrix, fbdev, glint, i128, i740, i810, imstt, mga, neomagic, newport, nv, rendition, s3, s3virge, savage, siliconmotion, sis, tdfx, tga, trident, tseng, vesa, vga, vmware} + DEFAULT_DRIVER=fbdev + ;; + m68k|powerpc) + DRIVER_LIST=${DRIVER_LIST:=ati, chips, fbdev, glint, imstt, mga, nv, s3, s3virge, savage, sis, tdfx, trident, vga} + DEFAULT_DRIVER=fbdev + ;; + mips|mipsel) + DRIVER_LIST=${DRIVER_LIST:=ati, chips, fbdev, glint, mga, newport, nv, s3, s3virge, savage, sis, tdfx, trident} + # Are we dealing with an SGI Indy or Indigo2? + if [ -e /proc/cpuinfo ]; then + if grep -q "system type.*:.*SGI Ind"; then + PRIORITY=medium + DEFAULT_DRIVER=newport + fi + fi + DEFAULT_DRIVER=${DEFAULT_DRIVER:=fbdev} + ;; + sparc) + DRIVER_LIST=${DRIVER_LIST:=apm, ark, ati, chips, cirrus, fbdev, glint, i128, i740, imstt, mga, neomagic, nv, rendition, s3virge, savage, siliconmotion, sunbw2, suncg14, suncg3, suncg6, sunffb, sunleo, suntcx, tdfx, trident, vesa, vga} + DEFAULT_DRIVER=fbdev + ;; + *) + internal_error "no driver list known for architecture $ARCH" + ;; +esac + +observe "available video driver list set to \"$DRIVER_LIST\"" + # attempt to autodetect -if which discover > /dev/null 2>&1; then +if which discover >/dev/null 2>&1; then if [ "$AUTODETECT_VIDEO_CARD" = "true" ]; then if [ $NDRIVERS -eq 0 ]; then - debug_echo "could not autodetect X server driver: no video card detected, or no driver known for it" + observe "could not autodetect X server driver: no video card" \ + "detected, or no driver known for it" elif [ $NDRIVERS -eq 1 ]; then - debug_echo "autodetected X server driver: $DRIVERS" + observe "autodetected X server driver: $DRIVERS" PRIORITY=low - DEFAULT="$DRIVERS" + DEFAULT_DRIVER="$DRIVERS" elif [ $NDRIVERS -gt 1 ]; then - debug_echo "could not autodetect X server driver: multiple drivers for video cards" - VIDEOCARD_DRIVER_REPORT=$(echo "$DISCOVERED_VIDEO" | awk 'BEGIN { FS="\t"; printf " %-30s%30s\n .\n", "Detected Video Card", "Suggested driver module" } { printf " %-50s%10s\n", $1, $3 } END { printf " .\n" }') - # can't do this until there is a way to embed newlines into debconf command streams :( - #db_subst shared/multiple_possible_x-drivers detected_cards "$VIDEOCARD_DRIVER_REPORT" - debug_echo "$VIDEOCARD_DRIVER_REPORT" + observe "could not autodetect X server driver: multiple drivers for" \ + "video cards" + VIDEOCARD_DRIVER_REPORT=$(echo "$DISCOVERED_VIDEO" \ + | awk 'BEGIN { FS="\t"; printf " %-30s%30s\n .\n", "Detected Video Card", "Suggested driver module" } { printf " %-50s%10s\n", $1, $3 } END { printf " .\n" }') + # can't do this until there is a way to embed newlines into debconf + # command streams :( + # db_subst shared/multiple_possible_x-drivers detected_cards \ + # "$VIDEOCARD_DRIVER_REPORT" + observe "$VIDEOCARD_DRIVER_REPORT" + PRIORITY=high db_input "$(priority_ceil high)" xserver-xfree86/multiple_possible_x-drivers || debug_report_status "db_input $(priority_ceil high) xserver-xfree86/multiple_possible_x-drivers" "$?" db_go fi else - debug_echo "user declined video card autodetection (driver)" + observe "user declined video card autodetection (driver)" fi else - debug_echo "could not autodetect X server driver: discover not found" + observe "could not autodetect X server driver: discover not found" fi -# Build list of available video drivers, omitting the atimisc, r128, and -# radeon sub-modules (the ati driver knows when and how to load these). -# v4l is not a display driver, and dummy is for advanced users. -DRIVER_LIST="$(echo $(find /usr/X11R6/lib/modules/drivers -name '*_drv.o' \ - 2>/dev/null | sed 's|^.*/\(.*\)_drv\.o|\1|' \ - | egrep -v '(atimisc|dummy|r128|radeon|v4l)' | sort) \ - | sed 's/ /, /g')" - -if [ -z "$DRIVER_LIST" ]; then - observe "no modules found in module directory; falling back to hard-coded" \ - "list for $ARCH" - case "$ARCH" in - alpha) - DRIVER_LIST="ati, cirrus, glint, mga, nv, rendition, s3, s3virge, savage, siliconmotion, tdfx, tga, vga" - ;; - amd64) - DRIVER_LIST="apm, ark, ati, chips, cirrus, cyrix, fbdev, glint, i128, i740, i810, imstt, mga, neomagic, newport, nsc, nv, rendition, s3, s3virge, savage, siliconmotion, sis, tdfx, tga, trident, tseng, vesa, vga, via, vmware" - ;; - arm|hppa) - DRIVER_LIST="ati, chips, fbdev, glint, mga, nv, s3, s3virge, savage, sis, tdfx, trident, vga" - ;; - hurd-i386) - DRIVER_LIST="apm, ark, ati, chips, cirrus, cyrix, fbdev, glint, i128, i740, i810, imstt, mga, neomagic, newport, nsc, nv, rendition, s3, s3virge, savage, siliconmotion, sis, tdfx, tga, trident, tseng, vesa, vga, via, vmware" - ;; - i386) - DRIVER_LIST="apm, ark, ati, chips, cirrus, cyrix, fbdev, glide, glint, i128, i740, i810, imstt, mga, neomagic, newport, nsc, nv, rendition, s3, s3virge, savage, siliconmotion, sis, tdfx, tga, trident, tseng, vesa, vga, via, vmware" - ;; - ia64) - DRIVER_LIST="apm, ark, ati, chips, cirrus, cyrix, fbdev, glint, i128, i740, i810, imstt, mga, neomagic, newport, nv, rendition, s3, s3virge, savage, siliconmotion, sis, tdfx, tga, trident, tseng, vesa, vga, vmware" - ;; - m68k|powerpc) - DRIVER_LIST="ati, chips, fbdev, glint, imstt, mga, nv, s3, s3virge, savage, sis, tdfx, trident, vga" - ;; - mips|mipsel) - DRIVER_LIST="ati, chips, fbdev, glint, mga, newport, nv, s3, s3virge, savage, sis, tdfx, trident" - ;; - sparc) - DRIVER_LIST="apm, ark, ati, chips, cirrus, fbdev, glint, i128, i740, imstt, mga, neomagic, nv, rendition, s3virge, savage, siliconmotion, sunbw2, suncg14, suncg3, suncg6, sunffb, sunleo, suntcx, tdfx, trident, vesa, vga" - ;; - *) - internal_error "no driver list known for architecture $ARCH" - ;; - esac -fi - db_subst xserver-xfree86/config/device/driver choices "$DRIVER_LIST" -auto_answer db_input "$(priority_ceil $PRIORITY)" xserver-xfree86/config/device/driver "$DEFAULT" +auto_answer db_input "$(priority_ceil $PRIORITY)" \ + xserver-xfree86/config/device/driver "$DEFAULT_DRIVER" # card identifier; try to set a sensible default DEFAULT= @@ -657,6 +684,11 @@ # BusID PRIORITY=low DEFAULT= + +# Some PowerPCs need to be told where to find the video card even if there is +# only one in the machine (broken PCI bus code in the XFree86 X server, most +# likely). If there are multiple video cards, we need to configure one as the +# primary head. if [ "$ARCH" = "powerpc" -o "$MULTIHEAD" = "yes" ]; then if [ "$ARCH" = "powerpc" ]; then PRIORITY=medium @@ -676,6 +708,16 @@ fi fi fi + +# SGI Indigo2 XLs require a special hack, per Guido Guenther (see Debian +# #249614). +if [ -e /proc/cpuinfo ]; then + if grep -q "system type.*:.*SGI Indigo2"; then + PRIORITY=medium + DEFAULT=1 + fi +fi + # this question requires input validation if [ -n "$DEFAULT" ]; then auto_answer validate_bus_id_db_input "$(priority_ceil $PRIORITY)" xserver-xfree86/config/device/bus_id "$DEFAULT" Modified: trunk/debian/xserver-xfree86.templates =================================================================== --- trunk/debian/xserver-xfree86.templates 2004-05-27 18:44:07 UTC (rev 1453) +++ trunk/debian/xserver-xfree86.templates 2004-05-27 19:21:03 UTC (rev 1454) @@ -157,6 +157,8 @@ heads. Further configuration will have to be done manually in the X server configuration file, /etc/X11/XF86Config-4. . + Users of SGI Indigo2 XL machines should specify simply "1" here. + . You may wish to use the "lspci" command to determine the bus location of your PCI or AGP video card. Keep in mind that lspci reports the bus, device, and function numbers in hexadecimal, not decimal. @@ -164,8 +166,8 @@ When possible, this question has been pre-answered for you and you should accept the default unless you know it doesn't work. . - Users of non-PowerPC machines with only one video card should leave this - entry blank. + Users of machines other than PowerPCs or SGI Indigo2 XLs with only one video + card should leave this entry blank. Template: xserver-xfree86/config/device/bus_id_error Type: note