[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Driver detection and loading



Michael Meskes wrote:
> 
> On Sun, Nov 05, 2000 at 01:30:21PM +0000, Haug Bürger wrote:
> > a very special one, 905 chip, because there is no driver
> > named for this card. Sorry but my imagination is not so great
> > to guess that i should use a 509 driver.
> 
> That probably won't work. You need the driver for "Vortex/Boomerang". I
> think it is called 3c590/3c900 series.
> 
> I have no idea if this driver is part of the installation kernel. Sorry. But
> it definitely is part of the linux kernel source.
> 
> > Suggestions: Much better would be a database with a PCI IDs and
> > a driver and parameter set. That would make it possible to auto
> > detect the hardware.
> 
> There are hardware autodetection packages out there. At least Corel, Stromix
> and Progeny (chronological order :-)) have one. And they should be open
> source too.
> 
> > To improve the situation i'm willing to help but i need some
> > information about the Debian development process.
> 
> I wonder if these packages will go back into Debian proper or need an
> additional Debian maintainer. Maybe the guys from Progeny and Stormix can
> comment on this. Anyone here from Corel?
> 

Hi,
	Corel has created a modular detection system which detects system
hardware by probing what the kernel has found and by looking for
hardware itself. We are in the finishing stage and will be releasing it
to the open source community shortly.

	In the meantime, please read the attached document for more
information.

Thanks
Robert S. Young




> Michael
> --
> Michael Meskes
> Michael@Fam-Meskes.De
> Go SF 49ers! Go Rhein Fire!
> Use Debian GNU/Linux! Use PostgreSQL!
> 
> --
> To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Title: devices-overview - Hardware Detection and Discovery

devices-overview - Hardware Detection and Discovery

Name

devices-overview - Hardware Detection and Discovery
Updated: 09 November 2000

Purpose

Create a central repository for recording information about system hardware. This system, should be field extensible; that is, a third party should be able to augment the system without affecting other third party additions. To be field extensible, the system is modular; this has a side benefit of allowing pieces to be upgraded independently.

Operation

At boot time, the detection system runs as /etc/rcS.d/S90detector, the script assumes that the file system is stable. The systems executes a series of scripts to scan all known hardware and stores this information in a new file. Next, the system compares the new detection with the previous detection and executes scripts to configure different aspects of the system.

Layout

/etc/devicesThe root of the detection system
/etc/devices/devices.infThe current state of the hardware on the machine
/etc/devices/devices.newHardware detected at boot time
/etc/devices/devices.bakHardware state before boot
/etc/devices/devices.ovrOverrides detected hardware parameters in devices.inf
/etc/devices/det_util/Scripts for detecting the hardware
/etc/devices/det_order/Symlinks to /etc/devices/det_util to indicate the order of hardware detection, see below
/etc/devices/conf_util/Scripts for configuring hardware when a change is detected
/var/log/devices.logLog of detection process; this is created every time the detect script is run

Component Details

Devices.inf

This file contains information about all known devices. Each device starts with an class identifier in square brackets followed by tag = value pairs.
 
[network.1]
hwaddr = 00:90:27:58:63:6C
driver = eepro100.o
manu = Intel Corporation
desc = Intel EtherExpress PRO/100 PCI (82557)
pci = 0x8086, 0x1229, 14

 
Common device classes are:

networkNetwork card
diskhard drive
cdromCD-ROM or CD-RW
zipzip, jazz or ditto (removable mass storage)
keyboardKeyboard
mouseMouse
ideIDE controller (hard disk interface)
scsiSCSI controller
audioSound card
usb-stackUSB controller
usbhubUSB hub plugged into USB controller
bootControl over LILO boot image
floppyFloppy drive
videoVideo card
monitorMonitor connected to video card
displaya virtual device, this controls resolution and refresh rates
NOTE: this list is incomplete, any device class may be added
 
Common device tags are:
descDescription of device
manuManufacturer of device
modelModel of device
driverDriver required to access device
deviceLINUX device
pciPCI bus information
NOTE: all tags are optional

Det_util

This is a collection of shell and Perl scripts that detect hardware. The script should report discovered hardware by printing the information to stdout in the same format as the devices.inf file. The script that invokes the det_util scripts gathers the information and builds one file, devices.new. Some scripts call programs which may probe hardware, other scripts discover information already detected by the kernel or by looking for specific files. A script must be in this directory to be included in the det_order directory.

detect_bootLook for files used to generate the LILO config file
Device class: boot
detect_disksDetect mass storage devices on the IDE, SCSI and PCMCIA busses.
Device classes: disk, cdrom, zip
detect_floppyScan the Kernel messages looking for information about the floppy drives.
Device class: floppy
detect_kbdRead information from /etc/kbd/keymapping
Device class: keyboard
detect_monitorCurrently, this produces a canned list of most VESA modes.Comming soon . . . we are working on reading the DDC information from the monitor.
Device class: monitor
detect_mouseCall the pestcontrol utility; pestcontrol scans the serial ports and checks the PS/2 mouse port.
Device class: mouse
detect_pciThis script calls cprobe; cprobe scans the PCI bus and matches cards in the /etc/pcimap.inf file.
Device classes: video, scsi, ide, floppy, ipi, raid, storage, network, video3d, camera, audio, telephony, serial, parallel, winmodem, keyboard, point, mouse, input, firewire, accessbus, SSA, usb-stack, SMBus, irda, IRcon, RFcon, I2O, TVcon
detect_printerAsk the kernel what it has detected.
Device class: printer
detect_raidThis script translates the information from /etc/raidtab
Device class: raid
detect_usbAsk the kernel what devices are attached to the USB.
Device classes: audio, keyboard, mouse, joystick, printer, usbhub, usb
detect_xserverThis script detects the current version of the X Server to ensure that the config scripts are generated for the correct version.

Det_order

This directory defines the order that the hardware will be detected. This is done by creating symlinks to the det_util directory in the form D##detutil; the ## is a number from 00 to 99, the symlinks are invoked in numerical order. update_det_order should be used to create and remove these links.
 
When installed, the detection package used update_det_order to create symlinks ... update_det_order detect_pci 10
update_det_order detect_usb 20
update_det_order detect_disks 30
update_det_order detect_mouse 41
update_det_order detect_kbd 42
update_det_order detect_monitor 60
update_det_order detect_printer 62
update_det_order detect_xserver 80
update_det_order detect_boot 85
update_det_order detect_floppy 90
update_det_order detect_raid 35

Conf_util

When the detection systems runs, it creates a new set of information called devices.new. The code copies devices.inf to devices.old then compares devices.new to devices.inf. Any differences between the two files are copied to the devices.inf file and the script for the corresponding device class is executed. For example, if the detection discovers that the user has changed their video card, the script conf_util/video will rebuild the X server configuration files to reflect the change of video card.

audioInstall driver in /etc/modules
bootRun fooze
cdromRun fooze, then restart autofs
defaultRun buildxconf
diskRun buildhdinf then fooze
keyboardRun buildxconf
monitorRun buildxconf
mouseCreate a symlink to /dev/mouse then run buildxconf
networkInstall driver in /etc/install and restart the interface
usb-stackInstall driver in /etc/modules
videoSpecial code to load the agpgart module if necessary and then run buildxconf
winmodemInstall driver in /etc/modules
zipRun fooze, then restart autofs

Utilities

/sbin/detectThis is the script which controls the detection process
/etc/init.d/detectorThis script calls detect from the run-levels
This is run as /etc/rcS.d/S90detector.
/sbin/update_det_orderThis utility installs and removes symlinks from the det_order directory.
etcdevQuery or Get information from devices.inf style files
etcdevdiffCompare devices.inf and devices.new, copy changes and execute scripts from the conf_util directory.
etcdevovrApply the devices.ovr file to the devices.new file.
etcdevsetSet information in devices.inf style files
buildhdinfCreate the /etc/harddrive.inf file used by fooze to create the fstab and lilo.conf files.
ddetectiveDisk Detective; determine the contents of a partition.
foozeCreate the /etc/fstab and any necessary mount points as well as building/etc/lilo.conf, /etc/lilop.conf and running lilo.
buildxconfCreate the /etc/X11/XF86Config file to configure the X server.

Operational Overview

/etc/rcS.d/S90detectoris symlinked to /etc/init.d/detector
/etc/init.d/detectorexecutes /sbin/detect probe
/sbin/detectrun the detection system...
copy devices.inf to devices.old
remove /var/log/devices.log
remove devices.new
Execute the symlinks from det_order and pipe the output to devices.new
Use etcdevovr to apply the devices.ovr file to devices.new
Use etcdevdiff to compare and edit devices.inf with devices.new.For each devices class that has changed, run the corresponding conf_util script.
The detection will restart if any changes are detected. This may happen upto 3 times.

Author

Robin Burgener, Corel Corporation, robinb@corel.com

See Also

pcimap.inf, etcdev, update_det_order

Index

Name
Purpose
Operation
Layout
Component Details
        Devices.inf
        Det_util
        Det_order
        Conf_util
Utilities
Operational Overview
Author
See Also
Index


Reply to: