As a followup to this old post of mine (that AFAIK no progress has been
made on), here's a new idea, to handle the case of firmware needed early
in d-i.

hw-detect could be made smart about detecting when a module it's loading 
needs firmware. This is pretty easy to do by modifiying
/lib/udev/firmware.agent to log the names of the module and firware file
if firmware cannot be found. Something like:

+echo "$PHYSDEVDRIVER $FIRMWARE" >>/tmp/needed-firmware
+
 debug_mesg "Cannot find the $FIRMWARE firmware"
 exit 1

Then the module would still fail to initialize[1] -- and hw-detect can notice
this file, and prompt the user for firmware, and then remove and reload the
module if it's provided.

Prompting for firmware in this scenario means loading something like a
driver floppy, or more usefully, a usb stick containing firmware debs or
udebs. We already have floppy-retriever and load-floppy, that basically do
this, and that hw-detect already uses. They have dated names, and they don't
look at all the usb device files, otherwise they're just about perfect. :-)

If firmware debs are found, they could be later installed into /target as
well. apt-setup could also be set to default to installing non-free.

This should allow us to support ethernet and hard drive controllers that
need non-free firmware. Even the nslu2 could be supported by this, probably.

-- 
see shy jo

[1] The alternative, of trying to get the firmware while the module is still
    loading, is tricky both because there's no good way to access debconf
    from inside firmware.agent and because the request_firmware call
    seems to time out after several seconds.

Attachment: signature.asc
Description: Digital signature

Reply via email to