[ Thinking aloud. ]

Holger Wansing <hwans...@mailbox.org> (2025-05-20):
> That's correct; however that's only within the installer environment.
> There is no need for the (apt-un-aware) copy of the firmware files to 
> /target, 
> since the usual firmware detect mechanism would take care of this (in an
> apt-clean way).

Let's assume a given system requires one (or more) files(s) from the
firmware-sof-signed package.

They're available in the gtk initrds because of the speech synthesis
needs, so the kernel shouldn't log that some files are missing, and the
“usual firmware detection mechanism” (based on parsing dmesg's
output[1]) wouldn't spot that, and wouldn't queue their installation.

But, we also have a modalias-based lookup[2]… which shouldn't work
because firmware-sof-signed doesn't ship DEP-11 metadata. But we're
building a .patterns file manually (via a specific, hardcoded list), it
should work despite the missing DEP-11 metadata.

  1. 
https://salsa.debian.org/installer-team/hw-detect/-/blob/master/hw-detect.post-base-installer.d/50install-firmware?ref_type=heads#L28-L49
  2. 
https://salsa.debian.org/images-team/debian-cd/-/blob/master/tools/generate_firmware_patterns?ref_type=heads#L81-189

In this case, I suppose it wouldn't be too hard to have the list of
files from that package (either including it somewhere in the image,
e.g. under the dep11 directory, next to the .patterns file), or to
locate the .deb on the installation image and look at its contents
[the former would seem easier]… and skip any such files when copying
loose files[3].

  3. 
https://salsa.debian.org/installer-team/hw-detect/-/blob/master/hw-detect.post-base-installer.d/50install-firmware?ref_type=heads#L18-L26

This would be generic enough to work without any more changes (at the
hw-detect level) if we start including firmware-intel-sound contents as
well.

This would also mean not having to care about whether sound modules are
loaded/in use to decide whether to queue installation.


I'm a little torn about this: I'm quite familiar with the debian-cd and
hw-detect sides, and if we were to decide we want to give it a try, that
should be rather easy. If we want to do this, this should happen before
13.0: other things can be considered for a backport post-release, but
changing debian-cd things after the release would seem very wrong to me.
On the other hand, it's really not a critical matter…

I'll think about this a little bit more. I'm pretty certain one of my
test laptops picks up firmware-sof-signed on its own (I'm almost always
testing the graphical installer, so that would confirm the second,
modalias-based mechanism indeed works), or at least did in bookworm when
I had my focus on such things. It should be easy to test whether the
proposed idea works at all… I just need to convince myself I want to
spend more time on that topic, and soon.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant

Attachment: signature.asc
Description: PGP signature

Reply via email to