From 1076a92a812b6ee88ef9c50d9a1edc071f145ee4 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 18 Jan 2006 23:35:53 +0000 Subject: 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 --- initrd/distro-specs/servconf | 26 ------------- initrd/distro-specs/suse-10.0/functions-suse-10.0 | 2 +- initrd/initrd-stuff/bin/hwautocfg | 47 ++++++++++++++++------- initrd/initrd-stuff/bin/servconfig | 3 +- initrd/initrd-stuff/init | 17 ++++++-- initrd/mkdxsinitrd | 2 +- 6 files changed, 51 insertions(+), 46 deletions(-) delete mode 100644 initrd/distro-specs/servconf (limited to 'initrd') diff --git a/initrd/distro-specs/servconf b/initrd/distro-specs/servconf deleted file mode 100644 index 1a5897f1..00000000 --- a/initrd/distro-specs/servconf +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# Description: universal (distro independent) configuration script -# for linux diskless clients (executed within initial -# ramdisk) -# -# Author(s): Dirk von Suchodoletz , 06-01-2006 -# Blabla -# Blub -# -# Copyright: (c) 2003, 2005 - RZ Universitaet Freiburg -# -# Version: 0.0.1a - -# check for configuration files to source - -# functions common for all distros -. /etc/functions -# configuration settings (several file and directory variables) -. /etc/sysconfig/config - -# - -# ldap, dhcp, file - - diff --git a/initrd/distro-specs/suse-10.0/functions-suse-10.0 b/initrd/distro-specs/suse-10.0/functions-suse-10.0 index fb018b89..be6f3fc8 100644 --- a/initrd/distro-specs/suse-10.0/functions-suse-10.0 +++ b/initrd/distro-specs/suse-10.0/functions-suse-10.0 @@ -143,7 +143,7 @@ fi # create links to desktop-session chooser [ -f /mnt/usr/bin/X11/wmlist ] && wmlist=`cat /mnt/usr/bin/X11/wmlist` - +testmkd /mnt/etc/X11/sessions for i in `echo $windowmanagers|sed -e "s/,/ /g"` ; do # beware!! quickhack for VMware sessions strinstr "$i" "$wmlist" || \ 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 diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index d1bf2e8d..b9f33417 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -277,7 +277,7 @@ case "${DISTRO}.${DISVER}" in DISTRO=suse-10.0 # hotplug/udev style and stuff cp -a /etc/udev /etc/hotplug ${INSTDIR}/etc - cp -a /etc/sysconfig/hardware ${INSTDIR}/etc/sysconfig + #cp -a /etc/sysconfig/{hardware,network} ${INSTDIR}/etc/sysconfig ;; Debian*|debian*|Sarge*|sarge*) DISTRO=debian -- cgit v1.2.3-55-g7522