summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-01-19 00:35:53 +0100
committerDirk von Suchodoletz2006-01-19 00:35:53 +0100
commit1076a92a812b6ee88ef9c50d9a1edc071f145ee4 (patch)
tree51e8af31bde3001b307f9b6cfbcb363c5370b48c /initrd/initrd-stuff
parentHässlichen Bug bei dhclient IP Konfig. beseitig. Etliche Services (diff)
downloadcore-1076a92a812b6ee88ef9c50d9a1edc071f145ee4.tar.gz
core-1076a92a812b6ee88ef9c50d9a1edc071f145ee4.tar.xz
core-1076a92a812b6ee88ef9c50d9a1edc071f145ee4.zip
Hardware-Erkennung erweitert (erste Basics für CD und HD, Quickhack für
USB-Maus). Kleinere Fixes in Timings der Parallelisierung ... git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@19 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff')
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg47
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig3
-rwxr-xr-xinitrd/initrd-stuff/init17
3 files changed, 49 insertions, 18 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index 52bf3d0c..a1f6f5de 100755
--- a/initrd/initrd-stuff/bin/hwautocfg
+++ b/initrd/initrd-stuff/bin/hwautocfg
@@ -82,11 +82,11 @@ local Modelines='
\tModeline "lcd1280x1024" 108.00 1280 1328 1440 1688 1024 1025 1028 1066\n
\tModeline "lcd1400x1050" 160.00 1400 1472 1672 1880 1050 1052 1055 1100'
local Device='\tIdentifier\t"StdGraphics"\n
-\tVendorName\t\t"XDESC"\n
+\tVendorName\t"XDESC"\n
\tDriver\t\t"XMODULE"'
local Screen='\tIdentifier\t"Screen 1"\n
-\tDevice\t"StdGraphics"\n
-\tMonitor\t"Default"\n
+\tDevice\t\t"StdGraphics"\n
+\tMonitor\t\t"Default"\n
\tDefaultColorDepth CDP'
local ServerLayout='\tIdentifier\t"Simple Layout"\n
\tScreen\t"Screen 1"\n
@@ -258,7 +258,20 @@ fi
. /etc/sysconfig/config
. /etc/distro-functions
-( hwsetup -v > /tmp/hwsetup.info && echo "hwsetup" > /tmp/completed ) &
+# set X11 configuration file
+if [ -n "${XF86CONFFILE}" ] ; then
+ XF86CONFFILE="/mnt/${XF86CONFFILE}"
+else
+ XF86CONFFILE="/mnt/etc/X11/xorg.conf"
+ error " You should define the variable XF86CONFFILE in yours distro \
+configuration\n file" nonfatal
+fi
+
+# USB core is needed for presence of /proc/bus/usb
+( modprobe ${MODPRV} usbcore && mount -n -t usbfs usbfs /proc/bus/usb ) &
+
+# start the knoppix hardware autodetection tool
+( hwsetup -v > /tmp/hwsetup.info && echo "hwsetup" > /tmp/hwrun1 ) &
# ACPI configuration
#if [ -d /proc/acpi ]; then
@@ -281,7 +294,7 @@ modprobe ${MODPRV} agpgart || \
modprobe ${MODPRV} agpgart agp_try_unsupported=1
# wait for /tmp/hwsetup.info to appear
-waitfor /tmp/completed 50000 || \
+waitfor /tmp/hwrun1 50000 || \
error " Expected information from hwsetup to appear in \
/tmp/hwsetup.info.\n Unable to configure parts of the systems hardware. \
Please check that\n hwsetup is properly installed and executable."
@@ -298,10 +311,9 @@ for DRIVER in ohci-hcd uhci-hcd ehci-hcd \
modprobe ${MODPRV} ${DRIVER}
DRIVERLIST="${DRIVERLIST} ${DRIVER}"; }
done
-## modules for already plugged devices might not be loaded in ramdisk
-#if [ -n "$USB" ] ; then
-#
-#fi
+# remove usb core if USB not present
+[ -z "$USB" ] && rmmod usbcore
+# check for PCMCIA / cardbus stuff
for DRIVER in yenta_socket i82365 pd6729 tcic; do
strinfile ${DRIVER} /tmp/hwsetup.info && {
modprobe ${MODPRV} ${DRIVER}
@@ -322,13 +334,13 @@ done
# sound card setup
. /etc/sysconfig/sound || DRIVER="snd-dummy"
modprobe ${MODPRV} ${DRIVER}
-DRIVERLIST="${DRIVERLIST} ${DRIVER}"
+DRIVERLIST="${DRIVERLIST} ${DRIVER} "
# remaining drivers listed in /tmp/hwsetup.info
cat /tmp/hwsetup.info| while read LINE ; do
if strinstr "driver:" "${LINE}"; then
DRIVER=${LINE##driver: }
- if ! strinstr "${DRIVER}" "${DRIVERLIST}"; then
+ if ! strinstr " ${DRIVER} " "${DRIVERLIST}"; then
strinstr "Card:" "${DRIVER}" || strinstr "ps/2" "${DRIVER}" || {
modprobe ${MODPRV} ${DRIVER} &
usleep 10; }
@@ -336,6 +348,16 @@ cat /tmp/hwsetup.info| while read LINE ; do
fi
fi
done
+# rerun the knoppix hardware autodetection tool for USB and ide devices
+# like dvd or harddisk - wait a few seconds so hopefully the ide driver
+# is initialized
+( usleep 20 &&
+hwsetup -v > /tmp/hwsetup.info
+strinfile "genericwheelusb" /tmp/hwsetup.info && modprobe ${MODPRV} usbhid
+if strinfile "IDE" /tmp/hwsetup.info ;then
+ strinfile "CDROM" /tmp/hwsetup.info && modprobe ${MODPRV} ide_cd
+ strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} ide_disk &
+fi ) &
# configure some variables from configuration file - wait for dhcp or ldap
# confiurator to complete
@@ -357,11 +379,10 @@ echo -e "#!/bin/sh\n# entry added by $0: $date" \
>>/mnt/etc/${INITDIR}/boot.ld
echo -e "loadkeys -q ${KEYTABLE}\n" >>/mnt/etc/${INITDIR}/boot.ld
[ -n "${CONSOLE_FONT}" ] && consolefont
-
# run X11 / Xorg configurator
. /etc/sysconfig/xserver >/dev/null 2>&1 || error " The xserver \
configuration file generated by hwsetup could not\n be found." nonfatal
-displaysetup "/mnt/etc/X11/xorg.conf" #${XF86CONFFILE}"
+displaysetup ${XF86CONFFILE}
echo "finished" > /tmp/hwcfg
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index a18576f1..55827289 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -132,7 +132,7 @@ config_syslog "02" "20"
config_dreshal "03" "18"
# acpi and powersave - distro dependent function config_acpi
-config_acpi "10" "10"
+config_acpi "10" "12"
#######################################################################
# network(ed) services
@@ -289,3 +289,4 @@ if [ "x$nis_domain" != "x" ] && [ "x$nis_servers" != "x" ] ; then
strinfile "+::::::" /mnt/etc/passwd || echo "+::::::" >>/mnt/etc/passwd
fi
+echo "finished" > /tmp/svcfg
diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init
index 0b7b6a11..a392f173 100755
--- a/initrd/initrd-stuff/init
+++ b/initrd/initrd-stuff/init
@@ -26,8 +26,12 @@ echo 256 > /proc/sys/kernel/real-root-dev
# start device auto discovery (just the first case is tested yet)
if [ -x /bin/udev -a -x /bin/udevstart ] ; then
- echo "Starting udev"
- echo "/bin/udev" > /proc/sys/kernel/hotplug
+# if [ -x /bin/hotplug.sh ]; then
+# echo "/bin/hotplug.sh" > /proc/sys/kernel/hotplug
+# testmkd /events
+# else
+ echo "/bin/udev" > /proc/sys/kernel/hotplug
+# fi
/bin/udevstart &
elif [ -x /bin/hotplug ] ; then
echo "Enabling hotplug"
@@ -284,6 +288,8 @@ else
rm -rf /root/* >/dev/null 2>&1
# run some specific stuff !?
fi
+# script for stuff to execute during early bootup
+echo -e "#!/bin/sh\n# skeleton written from $0" >/mnt/etc/${INITDIR}/boot.ld
echo "fs complete" >/tmp/fscmpl
# write debug file information after filesystem setup completed
@@ -332,9 +338,11 @@ cp /etc/machine-setup /mnt/etc
waitfor /tmp/hwcfg 20000 || error " For some reason the hardware autoconfig \
of this client did not finish in\n time. You might check the process list \
and list the modules loaded until\n now."
-
+waitfor /tmp/svcfg 20000 || error " For some reason the software config \
+of this client did not finish in\n time. You might check the process list \
+and list the modules loaded until\n now."
date
-ash
+#ash
# IP configuration is made and should not be updated automatically
killall -9 dhcpcd dhclient pump 2>/dev/null
# unmount the bind mounted modules directory
@@ -348,6 +356,7 @@ is no regular one. It is needed\n for the bootup procedure to follow."
umount -n /sys || error " Unmount of the kernel sys directory \
failed for some\nreason. You will get some error messages that some files \
could not be\n removed." nonfatal
+umount -n /proc/bus/usb >/dev/null 2>&1
mount -n --move /dev /mnt/dev
cd /mnt
umount -n /proc