summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/bin/hwautocfg
diff options
context:
space:
mode:
authorDirk von Suchodoletz2010-08-11 18:16:18 +0200
committerDirk von Suchodoletz2010-08-11 18:16:18 +0200
commit44bfc41117021e76df1942f79a60800892900dfd (patch)
treed8db3d27091f1591e3718eb1cf2d2c5ea8002ad2 /initramfs/stage3-stuff/bin/hwautocfg
parentAdd firmwares for the graphic adaptors (at least required by radeon (diff)
downloadcore-44bfc41117021e76df1942f79a60800892900dfd.tar.gz
core-44bfc41117021e76df1942f79a60800892900dfd.tar.xz
core-44bfc41117021e76df1942f79a60800892900dfd.zip
Cleaned up module loading for graphic adaptors (needed for newer Ubuntu
and SuSEs ...)
Diffstat (limited to 'initramfs/stage3-stuff/bin/hwautocfg')
-rwxr-xr-xinitramfs/stage3-stuff/bin/hwautocfg29
1 files changed, 23 insertions, 6 deletions
diff --git a/initramfs/stage3-stuff/bin/hwautocfg b/initramfs/stage3-stuff/bin/hwautocfg
index 8ade70ba..77b4f215 100755
--- a/initramfs/stage3-stuff/bin/hwautocfg
+++ b/initramfs/stage3-stuff/bin/hwautocfg
@@ -33,12 +33,29 @@ modprobe -a ${MODPRV} usbhid hid-bright 2>/dev/null &
if [ -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
- fbmodlist="i810 i830 i915 mga nouveau r128 radeon savage sis tdfx ttm via"
- modprobe -a ${MODPRV} ${fbmodlist} drm fbcon 2>/dev/null
- ( hwinfo --gfxcard >/etc/hwinfo.gfxcard
- gfxcard=$(grep " Driver: " /etc/hwinfo.gfxcard|sed "s/.*Driver: //;s/\"//g")
- # remove unneeded fb drivers after module detection
- for mod in $fbmodlist ; do [ $mod = $gfxcard ] || rmmod $mod; done ) &
+ # 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} radeon 2>/dev/null
+ ;;
+ *)
+ modprobe -a ${MODPRV} r128 savage sis tdfx ttm via
+ ;;
+ esac
+ modprobe -a drm fbcon ) &
fi
# check and then load appropriate network card modules