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

Re: HW detection done right?



[Petter Reinholdtsen]
> I want to rewrite the hw detection modules.

I finally found time to start on the rewrite.  I've rewritten
disk-detect and cdrom-detect to have the common parts in
/bin/hwdetect, and the special parts in the postinst.  I've also
started on a ethdetect rewrite to change it from C code to shell
script, and to let it use the same script as the two former ones.  A
few open questions about naming and package organization are left.

This is my intention:

> There should probably be two menu entries for this
> 
>  - one loading initial modules.  This should be done before anna, and
>    load all the modules currently available on the boot floppy, based
>    on short HW detection lists available on the floppy.
> 
>  - one loading all remaining modules, based on complete hw detection
>    lists loaded by anna.  This must be done after anna fetched the
>    kernel module udebs.

The script hwdetect should be called twice, preferable automatically.
It will need to be in a separate package from cdrom-detect,
disk-detect and ethdetect, because these packages are not used for all
installations.

The new dependency/order graph for the packages could look like this.
cdrom-detect needs /bin/hwdetect and is only used for CD
installs. ethdetect need the same and is only used for network
installs.  disk-detect is placed after anna, and will detect all hw
(it is badly named).

       CDROM-install   common   NETWORK-install

                    discover-udeb
                         |
                          ?
                      /       \
        cdrom-detect              ethdetect
                      \       /
                        anna
                          |
                     disk-detect

One idea is to move /bin/hwdetect into discover-udeb.  All the HW
detection packages need discover-udeb to do the actually detection.  I
am not very comfortable with this, as the maintainers of discover are
not very active, and we would need to do NMU every time we wanted to
update the HW detection script

On the other hand, if we move all hw autodetect functionality into
/bin/hwdetect, and let this script be part of the discover-udeb, we
will have no problems moving to discover2.  The new version of
discover would just have to contain a new version of /bin/hwdetect
supporting the new version of discover.

My question is really, do anyone god a good suggestion for names of
the common package?  I got one suggestion: hw-detect-basic (and
renaming disk-detect to hw-detect-full).  I want to move both these
new packages into the ddetect source directory, and drop disk-detect
when the ftpmasters accept the new package.  We will end up with the
following depend graph.  We would only have to change one package,
hw-detect-basic, to adjust to discover2.

       CDROM-install   common   NETWORK-install

                    discover-udeb
                         |
                   hw-detect-basic
                      /       \
        cdrom-detect              ethdetect
                      \       /
                        anna
                          |
                   hw-detect-full


And if anyone can test and check the replacement ethdetect (it is in
CVS as ethdetect.sh), and let me know if I managed to replicate the
behavior of the C program, that would be very nice.



Reply to: