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

Re: hardware detection using libpci



> 
> Ive committed my pcidetect (for lack of a better name) program to
> debians cvs under /debian/installer/tools/pcidetect
> 
> To avoid duplicating our work we should come to some sort of agreement
> about which is the best path to take. There is enough of pcidetect there
> to see how it works, although i didnt pay much attention to how it
> presents its info, it should really log it to a file.

I agree.  I don't have cvs privelages (Joey indicated he'd set that up
for me if I behaved :-) ) so I'll have to direct you to my web page to
take a look at what I have.

My feeling is this: I think libdetect is the way to go, but I'll defer
to Glenn's judgement on this issue since someone needs to decide.  If
after looking at the libdetect way he wants to go libpci, I vote
libpci also, this isn't a big deal.

If we decide we want to go the uC-libc route: I built libdetect and
linked it successfully with uC-libc.  I encountered some problems when
exercising the whole library which I haven't had time to look into,
but for the ethernet card detection it worked fine. The setup for
linking with uc-libc is rather sloppy at the moment as I don't know
where (if anywhere) uC-libc should live on a system (i.e. should there
be a /usr/include/uC/ and a /usr/lib/uClib.a ?) and also I needed some
local modification to make it work (I have sent the mods to uc-libc's
author, Erik Anderson)

I think the real pro of libdetect is that we will be able to use to
same library to detect _anything_.  To demonstrate I cooked up
'snddetect', it detects sound cards.  It is very easy to write a tiny
program with libdetect that detects any sort of hardware one would
want to detect.  I included report.c from libdetect in my tar ball.
report.c shows all the things that libdetect knows about (cdrom, tape,
tvcard, modem, scanner, webcam, joystick etc. (see report.c for the
full list))

Most recent version of 'ddetect', now two detection utilities can be
found at: http://www.gordian.com/users/davidw/debian.html

-David



Reply to: