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

Re: hardware detection



Thierry Laronde wrote:
> 
> On Tue, Feb 20, 2001 at 05:15:32PM +0100, Thierry Laronde wrote:
> > I don't if you have already looked at that, but there are already some
> > scripts using the informations in /proc to find the kind of hardware
> > installed.
> >
> > There are several scripts using Perl, and that's not usable on floppy.
> > This one uses only Bourne Shell.
> >
> > But the question is ? How do you want to use the information collected ?
> 
> FWIW, one can find a mapping of PCI Vendor/Product IDs to driver names.
> Worth using it for "user-friendly" autodetection. Just search for
> `linux-kernel-ids' to find some.

My personal opinion about how hardware detection should work is that it
should be done by two seperate complemetary stages/programs.

The initial stage should just parse information from /proc, it will just
detect what hardware the linux kernel has detected and should be
useable. This stage is what the scripts you mention above could do, i
also did some work on a c program called kdetect that attempts to do
this, its in cvs and i hadnt touched it for a while, i just started to
look at it again yesterday.

The other detection process has to be capable of detecting hardware that
the kernel didnt detect and getting them into a useable state, which i
guess is really configuration so could be considered a seperate step.
Programs that do this sort of thing are libpci, libisa( if thats its
name).

kudzu (redhats hardware detection) and libdetect (mandrake) use both
methods in the one program. I think seperating the stages would make
things more flexible.

For the debian-installer the information that is collected should be
passed through to cdebconf, prompting for user interaction where
required. Then partitioning tools for example can also be based on
cdebconf and ask a couple of questions to do the partitioning, such as
what partition (or area of disk)to work on, what operation to perform
(creat partition, listpartition, delete partition etc), it will allready
have all the information about this from the initial detection stage.

This is the angle that David is working on for partkit i think, but i
havent looked at it very closely.

I will looking at partitioning again now since i have busybox dpkg under
control.


Glenn



Reply to: