summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorDirk2013-02-20 16:04:30 +0100
committerDirk2013-02-20 16:04:30 +0100
commit5287d03ee04343d98cf1dab2f2335a4f7e292bd5 (patch)
tree3ab0a539935104ac9282fd674a8426f79a52465e /data
parentfunctions common (diff)
downloadtm-scripts-5287d03ee04343d98cf1dab2f2335a4f7e292bd5.tar.gz
tm-scripts-5287d03ee04343d98cf1dab2f2335a4f7e292bd5.tar.xz
tm-scripts-5287d03ee04343d98cf1dab2f2335a4f7e292bd5.zip
Most probably broken init ...
Diffstat (limited to 'data')
-rwxr-xr-xdata/stage3.1/init40
1 files changed, 40 insertions, 0 deletions
diff --git a/data/stage3.1/init b/data/stage3.1/init
index 15b6c947..a2a4981f 100755
--- a/data/stage3.1/init
+++ b/data/stage3.1/init
@@ -20,11 +20,51 @@ mount -n -t tmpfs -o 'mode=755' run "/run"
[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc
[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys
+# read primary graphic adaptor configuration (without proprietary drivers yet)
+( hwinfo --gfxcard >/etc/hwinfo.gfxcard
+ case $(cat /etc/hwinfo.gfxcard) in
+ *i915*)
+ modprobe -a i915 2>/dev/null
+ ;;
+ *intel*|*Intel*)
+ modprobe -a i810 i830 i915 2>/dev/null
+ ;;
+ *nvidia*|*NVidia*|*nouveau*)
+ modprobe -q nouveau 2>/dev/null
+ ;;
+ *radeon*|*Radeon*)
+ modprobe -q radeon 2>/dev/null
+ ;;
+ *mga*|*matrox*|*Matrox*)
+ modprobe -q mga 2>/dev/null
+ ;;
+ *)
+ modprobe -qa r128 savage sis tdfx ttm via viafb
+ ;;
+ esac
+ modprobe -a drm fbcon; mdev -s ) &
+
+# load required network and usb controller drivers, filter out wireless adaptors
+nwcardlist="forcedeth e1000e e1000 e100 tg3 via-rhine r8169 pcnet32"
+echo "modprobe -qa usbhid hid-bright" >/etc/modprobe.base
+grep modprobe /etc/hwinfo.netcard-usbctrl | grep -E "$nwcardlist|hcd" \
+ | grep -v ehci | sed 's/.* Cmd: "//;s/"//;s/modprobe/modprobe -qb/' \
+ | sort -u >>/etc/modprobe.base
+# virtio hack
+if [ $(grep -ic "virtio_pci" /etc/modprobe.base) -ge 1 ]; then
+ echo "modprobe -q virtio_net" >>/etc/modprobe.base
+fi
+sh /etc/modprobe.base; mdev -s
+
#modprobe -a squashfs aufs 2>/dev/null
insmod /lib/modules/aufs.ko
insmod /lib/modules/squashfs.ko
+# load basic filesystem modules
+#modprobe -qa aufs squashfs nfs
+
+
mkdir -p /dev/shm/union /dev/shm/uniontmp /rorootfs
mount -n /mnt/openslx.sqfs /rorootfs