Loading therm_* modules in d-i on Macs
It'd be rather nice if the new debian-installer could load the
therm_adt746x or therm_windtunnel modules, and register them so that
they're automatically loaded by the installed system.
I can take care of the d-i implementation, but what's the best way to
decide whether the modules are required? As I see it, there are two
obvious methods:
(1) Probe each module unconditionally on powerpc/powermac_newworld,
and register it in /etc/modules if modprobe exited 0. The modules
in question check for the required hardware themselves and exit
-ENODEV if they don't find it.
Pros: simple; should be effective.
Cons: brute-force approach; generates spurious errors which will
probably have to be logged just in case anything real goes wrong;
won't register the module if it's needed by the hardware but the
probe failed for some installer-specific reason.
(2) Take the logic from the respective module *_init functions,
reimplement it in shell by poking about in /proc/device-tree (I've
looked at the kernel code and believe this is straightforward),
and probe and register whatever that says will work.
Pros: accurate about what should go in /etc/modules, regardless of
glitches in the installer environment; no spurious errors, only real
ones.
Cons: code duplication, so would have to stay in sync with the
kernel (although d-i's kernels won't rev very often once we go
stable); more complex.
Do any kernel hackers have an opinion here?
Thanks,
--
Colin Watson [cjwatson@flatline.org.uk]
Reply to: