diff options
author | Andreas Loibl <andreas@andreas-loibl.de> | 2011-03-04 00:18:40 +0100 |
---|---|---|
committer | Andreas Loibl <andreas@andreas-loibl.de> | 2011-03-04 00:18:40 +0100 |
commit | c7965bfd207b8ae3f4f563f6eceec00734f7bafc (patch) | |
tree | f02237243476ae031cf3f21029ef048ae3b5e039 | |
parent | 7ca499d0effeec3119587f68bdd5e33e97367c1d (diff) | |
download | kanotix-c7965bfd207b8ae3f4f563f6eceec00734f7bafc.zip kanotix-c7965bfd207b8ae3f4f563f6eceec00734f7bafc.tar.gz |
pcidetect + gfxoverlay
4 files changed, 97 insertions, 0 deletions
diff --git a/config/chroot_local-includes/usr/share/initramfs-tools/hooks/pcidetect b/config/chroot_local-includes/usr/share/initramfs-tools/hooks/pcidetect new file mode 100755 index 0000000..0af110b --- /dev/null +++ b/config/chroot_local-includes/usr/share/initramfs-tools/hooks/pcidetect @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +PREREQ="" + +prereqs() +{ + echo "${PREREQ}" +} + +case "${1}" in + prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +copy_exec /lib/libresolv* /lib +copy_exec /usr/lib/libpci.so.* /lib +copy_exec /usr/bin/lspci /bin + diff --git a/config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-top/pcidetect b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-top/pcidetect new file mode 100755 index 0000000..743c4a4 --- /dev/null +++ b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-top/pcidetect @@ -0,0 +1,53 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +if [ "$gfx" = "auto" -o "$gfx" = "on" ]; then +lspci -n | while read x class card x +do + VENDOR=${card%:*} + DEVICE=${card#*:} + case $class in + 0300:) + case $VENDOR in + 1002) + case $DEVICE in + 6700|6701|6702|6703|6704|6705|6706|6707|6708|6709|6718|6719|671c|671d|6720|6721|6722|6723|6724|6725|6726|6727|6728|6729|6738|6739|6740|6741|6742|6743|6744|6745|6746|6747|6748|6749|6750|6758|6759|6760|6761|6762|6763|6764|6765|6766|6767|6768|6770|6779|6880|6888|6889|688a|688c|688d|6890|6898|6899|689c|689d|689e|68a0|68a1|68a8|68a9|68b0|68b1|68b8|68b9|68ba|68be|68bf|68c0|68c1|68c7|68c8|68c9|68d0|68d1|68d8|68d9|68da|68de|68e0|68e1|68e4|68e5|68e8|68e9|68f0|68f1|68f2|68f8|68f9|68fe|9400|9401|9402|9403|9405|940a|940b|940f|9440|9441|9442|9443|9444|9446|9447|944a|944b|944c|944e|944f|9450|9451|9452|9456|945a|945b|945e|9460|9462|946a|946b|947a|947b|9480|9487|9488|9489|948a|948f|9490|9491|9495|9498|949c|949e|949f|94a0|94a1|94a3|94b1|94b3|94b4|94b5|94c0|94c1|94c3|94c4|94c5|94c6|94c7|94c8|94c9|94cb|94cc|9500|9501|9504|9505|9506|9507|9508|9509|950f|9511|9513|9515|9517|9519|9540|9541|9542|954e|954f|9552|9553|9555|9557|955f|9580|9581|9583|9586|9587|9588|9589|958a|958b|958c|958d|958e|958f|9590|9591|9593|9595|9596|9597|9598|9599|959b|95c0|95c2|95c4|95c5|95c6|95c7|95c9|95cc|95cd|95ce|95cf|9610|9611|9612|9613|9614|9615|9616|9640|9641|9642|9643|9644|9645|9647|9648|9649|964a|964b|964c|964e|964f|9710|9711|9712|9713|9714|9715|9802|9803|9804|9805) + echo "blacklist radeon" >> /etc/modprobe.d/pcidetect.conf + echo "fglrx" > /etc/gfxoverlay + break + ;; + esac + ;; + 10de|12d2) + case $DEVICE in + 0008|0009|0010|0018|0019) continue;; + 0020|0028|0029|002c|002d|00a0|0100|0101|0103|0150|0151|0152|0153) continue;; + 0110|0111|0112|0113|0170|0171|0172|0173|0174|0175|0176|0177|0178|0179|017a|017c|017d|0181|0182|0183|0185|0188|018a|018b|018c|01a0|01f0|0200|0201|0202|0203|0250|0251|0253|0258|0259|025b|0280|0281|0282|0286|0288|0289|028c) continue;; + 00fa|00fb|00fc|00fd|00fe|0301|0302|0308|0309|0311|0312|0314|031a|031b|031c|0320|0321|0322|0323|0324|0325|0326|0327|0328|032a|032b|032c|032d|0330|0331|0332|0333|0334|0338|033f|0341|0342|0343|0344|0347|0348|034c|034e) continue;; + *) + echo "blacklist nouveau" >> /etc/modprobe.d/pcidetect.conf + echo "nvidia" > /etc/gfxoverlay + break + ;; + esac + ;; + esac + ;; + esac +done +fi + diff --git a/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay new file mode 100755 index 0000000..d648beb --- /dev/null +++ b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -e /etc/gfxoverlay ]; then + overlay="$(echo /root/live/image/gfxoverlay/$(cat /etc/gfxoverlay).*)" + if [ -f "$overlay" ]; then + #overlay_dev="$(losetup -f)" + #losetup "$overlay_dev" "$overlay" + mkdir -p /live/gfxoverlay /root/live/gfxoverlay + mount -o loop "$overlay" /live/gfxoverlay + mount -o remount,add:1:/live/gfxoverlay /root + mount -n -o move /live/gfxoverlay /root/live/gfxoverlay + fi +fi + diff --git a/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/02blacklist b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/02blacklist new file mode 100755 index 0000000..1312363 --- /dev/null +++ b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/02blacklist @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -e /etc/modprobe.d/initramfs.conf ]; then + cp /etc/modprobe.d/initramfs.conf /root/etc/modprobe.d/initramfs.conf +fi + |