diff options
Diffstat (limited to 'initramfs/stage3-stuff/bin/hwautocfg')
-rwxr-xr-x | initramfs/stage3-stuff/bin/hwautocfg | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/initramfs/stage3-stuff/bin/hwautocfg b/initramfs/stage3-stuff/bin/hwautocfg index fee54a16..fdf9f485 100755 --- a/initramfs/stage3-stuff/bin/hwautocfg +++ b/initramfs/stage3-stuff/bin/hwautocfg @@ -1,6 +1,6 @@ #!/bin/ash # Copyright (c) 2003..2006 - RZ Uni Freiburg -# Copyright (c) 2006..2009 - OpenSLX GmbH +# Copyright (c) 2006..2010 - OpenSLX GmbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -28,6 +28,40 @@ done echo "0 0 0 0" >/proc/sys/kernel/printk echo "/sbin/mdev" >/proc/sys/kernel/hotplug modprobe -a ${MODPRV} usbhid hid-bright 2>/dev/null & +# get information on the graphics adaptor if bootsplash or xserver plugins are +# present and the new drm/kms infrastructure is present +if strinfile "vga=" /proc/cmdline; then + ( modprobe -a vesafb fbcon 2>/dev/null + hwinfo --gfxcard >/etc/hwinfo.gfxcard ) & +elif [ -e /etc/init-hooks/00-started/xserver.sh -o \ + -e /etc/init-hooks/05-started/bootsplash.sh ] && \ + [ -e /lib/modules/${KERNEL}/kernel/drivers/gpu ]; then + # check for the standard modules (single gpu, multiple connector only) + ( hwinfo --gfxcard >/etc/hwinfo.gfxcard + case $(cat /etc/hwinfo.gfxcard) in + *i915*) + modprobe -a ${MODPRV} i915 2>/dev/null + ;; + *intel*|*Intel*) + modprobe -a ${MODPRV} i810 i830 i915 2>/dev/null + ;; + *nvidia*|*NVidia*|*nouveau*) + modprobe ${MODPRV} nouveau 2>/dev/null + ;; + *radeon*|*Radeon*) + modprobe ${MODPRV} radeon 2>/dev/null + ;; + *mga*|*matrox*|*Matrox*) + modprobe ${MODPRV} mga 2>/dev/null + ;; + *) + modprobe -a ${MODPRV} r128 savage sis tdfx ttm via + ;; + esac + modprobe -a drm fbcon; mdev -s ) & +fi + +# check and then load appropriate network card modules nwcardlist=$(echo ${slxconf_listnwmod}|sed "s/\ /|/g") # save results for later info and for Xen plugin when starting Xen VM hwinfo --netcard --usb-ctrl >/etc/hwinfo.netcard-usbctrl @@ -38,6 +72,7 @@ if [ $(grep -ic "virtio_pci" /etc/modprobe.base) -ge 1 ]; then echo "modprobe virtio_net" >>/etc/modprobe.base fi ash /etc/modprobe.base; mdev -s + # optimization possible: exclude network and usb base drivers from the # following list (bios detection for non-hwautocfg component) ( hwinfo --pci >/etc/hwinfo.data; echo "read pci device list at $(sysup)" \ |