Author: alexander
Date: 2005-06-29 07:33:01 -0600 (Wed, 29 Jun 2005)
New Revision: 289

Added:
   x86/branches/6.1/etc/X11/xorg.conf
   x86/branches/6.1/packages/hotplug/detect-video.hotplug
Modified:
   x86/branches/6.1/doc/README
   x86/branches/6.1/packages/Xorg/Makefile
   x86/branches/6.1/packages/hotplug/Makefile
Log:
Video card autodetection


Modified: x86/branches/6.1/doc/README
===================================================================
--- x86/branches/6.1/doc/README 2005-06-29 10:02:53 UTC (rev 288)
+++ x86/branches/6.1/doc/README 2005-06-29 13:33:01 UTC (rev 289)
@@ -58,22 +58,23 @@
 
 CONFIGURING X
 ================
-Before you run X for the first time, you must issue this command:
+The Live CD attempts to configure X for your video card automatically. The
+process may fail if you have more than one video card, or if your video card
+doesn't support 24-bit color depth.
 
-Xorg -configure
+You still have to edit /etc/X11/xorg.conf using vim, joe or nano in order to
+configure the keyboard layout and available video modes (otherwise the US
+English keyboard layout and the highest resolution with 60 Hz refresh rate
+will be used). Instructions for doing that are found in the BLFS book, under
+the section Configuring Xorg:
 
-That will produce a file in your home dir called xorg.conf.new.  Edit that
-file using vim, nano or joe according to the instructions found in the BLFS
-book, under the section Configuring Xorg:
-
 http://www.linuxfromscratch.org/blfs/view/svn/x/installing.html#xorg
 
-When you are finished, move xorg.conf.new to /etc/X11/xorg.conf and run
-startx.
+When you are finished, run startx.
 
 NOTE: The default Window Manager is xfce which is intutive and graphically
 pleasing. If you prefer something more minimal, edit the file ~/.xinitrc to
-read 'exec ion'
+read 'exec ion' or 'exec twm'.
 
 CUSTOMIZING THE CD CONTENTS
 ================

Added: x86/branches/6.1/etc/X11/xorg.conf
===================================================================
--- x86/branches/6.1/etc/X11/xorg.conf  2005-06-29 10:02:53 UTC (rev 288)
+++ x86/branches/6.1/etc/X11/xorg.conf  2005-06-29 13:33:01 UTC (rev 289)
@@ -0,0 +1,87 @@
+Section "Files"
+       # Cyrillic users: swap the next two lines
+       FontPath        "/usr/lib/X11/fonts/misc"
+       FontPath        "/usr/lib/X11/fonts/cyrillic"
+       FontPath        "/usr/lib/X11/fonts/100dpi/:unscaled"
+       FontPath        "/usr/lib/X11/fonts/75dpi/:unscaled"
+       FontPath        "/usr/lib/X11/fonts/100dpi"
+       FontPath        "/usr/lib/X11/fonts/75dpi"
+EndSection
+
+Section "Module"
+       Load    "GLcore"
+       Load    "bitmap"
+       Load    "dbe"
+       Load    "ddc"
+       Load    "dri"
+       Load    "extmod"
+       Load    "freetype"
+       Load    "glx"
+       Load    "int10"
+       Load    "record"
+       Load    "type1"
+       Load    "vbe"
+EndSection
+
+Section "InputDevice"
+       Identifier      "Generic Keyboard"
+       Driver          "kbd"
+       Option          "CoreKeyboard"
+       Option          "XkbRules"      "xorg"
+       Option          "XkbModel"      "pc104"
+       # Adjust the layout for your country
+       Option          "XkbLayout"     "us"
+       # Example for Russia:
+       # Option        "XkbLayout"     "us,ru(winkeys)"
+       # Option        "XkbOptions"    "grp:alt_shift_toggle,grp_led:scroll"
+EndSection
+
+Section "InputDevice"
+       Identifier      "Generic Mouse"
+       Driver          "mouse"
+       Option          "CorePointer"
+       Option          "Device"                "/dev/input/mice"
+       Option          "Protocol"              "ImPS/2"
+       Option          "Emulate3Buttons"       "false"
+       Option          "ZAxisMapping"          "4 5"
+EndSection
+
+Section "Device"
+       Identifier      "Generic Video Card"
+       Driver          "vesa"
+EndSection
+
+Section "Monitor"
+       Identifier      "Generic Monitor"
+       Option          "DPMS"
+EndSection
+
+Section "Screen"
+       Identifier      "Default Screen"
+       Device          "Generic Video Card"
+       Monitor         "Generic Monitor"
+       DefaultDepth    24
+       SubSection "Display"
+               Depth           8
+       EndSubSection
+       SubSection "Display"
+               Depth           15
+       EndSubSection
+       SubSection "Display"
+               Depth           16
+       EndSubSection
+       SubSection "Display"
+               Depth           24
+       EndSubSection
+EndSection
+
+Section "ServerLayout"
+       Identifier      "Default Layout"
+       Screen          "Default Screen"
+       InputDevice     "Generic Keyboard"
+       InputDevice     "Generic Mouse"
+EndSection
+
+Section "DRI"
+       Mode    0666
+EndSection

Modified: x86/branches/6.1/packages/Xorg/Makefile
===================================================================
--- x86/branches/6.1/packages/Xorg/Makefile     2005-06-29 10:02:53 UTC (rev 
288)
+++ x86/branches/6.1/packages/Xorg/Makefile     2005-06-29 13:33:01 UTC (rev 
289)
@@ -43,6 +43,7 @@
        @echo "/tmp/.ICE-unix dir 1777 root root" >> /etc/sysconfig/createfiles
        @echo -e "#!/bin/sh\nexec /usr/X11R6/bin/X -nolisten tcp" 
>/etc/X11/xinit/xserverrc
        @chmod 755 /etc/X11/xinit/xserverrc
+       @install -m644 $(ROOT)/etc/X11/xorg.conf /etc/X11/xorg.conf
        @cp $(ROOT)/etc/fonts/local.conf /etc/fonts/local.conf && \
         fc-cache
        @make clean

Modified: x86/branches/6.1/packages/hotplug/Makefile
===================================================================
--- x86/branches/6.1/packages/hotplug/Makefile  2005-06-29 10:02:53 UTC (rev 
288)
+++ x86/branches/6.1/packages/hotplug/Makefile  2005-06-29 13:33:01 UTC (rev 
289)
@@ -31,6 +31,8 @@
         touch /var/log/hotplug/events && \
         echo eepro100 >>/etc/hotplug/blacklist && \
         echo 8139cp >>/etc/hotplug/blacklist && \
+        mkdir /etc/hotplug.d/pci && \
+        install -m755 ../detect-video.hotplug /etc/hotplug.d/pci && \
         mkdir -p /lib/firmware ; fi
        @make clean
         

Added: x86/branches/6.1/packages/hotplug/detect-video.hotplug
===================================================================
--- x86/branches/6.1/packages/hotplug/detect-video.hotplug      2005-06-29 
10:02:53 UTC (rev 288)
+++ x86/branches/6.1/packages/hotplug/detect-video.hotplug      2005-06-29 
13:33:01 UTC (rev 289)
@@ -0,0 +1,16 @@
+#!/bin/sh
+[ "$ACTION" = "add" ] || exit 0
+[ "$PCI_CLASS" = "030000" ] || exit 0
+
+SUB_VENDOR_ID=${PCI_SUBSYS_ID%:*}
+SUB_DEVICE_ID=${PCI_SUBSYS_ID#*:}
+
+VENDOR_ID=${PCI_ID%:*}
+DEVICE_ID=${PCI_ID#*:}
+
+X_DRIVER=`/usr/X11R6/bin/getconfig.pl -b "0x$SUB_DEVICE_ID" -c 0x0300 \
+       -d "0x$DEVICE_ID" -s "0x$SUB_VENDOR_ID" -v "0x$VENDOR_ID" 2>/dev/null`
+if [ -n "$X_DRIVER" ] ; then
+       echo "Using \"$X_DRIVER\" as a video driver"
+       sed -i -e "s/vesa/$X_DRIVER/" /etc/X11/xorg.conf
+fi


Property changes on: x86/branches/6.1/packages/hotplug/detect-video.hotplug
___________________________________________________________________
Name: svn:executable
   + *

-- 
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to