Discussion:
Bug#992699: debian-installer: Firmwares required for some sound cards
(too old to reply)
Cyril Brulebois
2021-08-22 14:10:01 UTC
Permalink
As mentioned in the Bullseye errata, there seems to be a number of
sound cards that require loading a firmware to be able to emit sound
(e.g. Intel SOF). Unfortunately currently the installer loads firmware
after loading the ISO image, while speech synthesis is needed at the
very first interaction with the user, which is usually before that. We'd
thus want (for the firmware-enabled image) to include firmware in the
initrd somehow.
For context, that's sof I was fighting with:
https://tracker.debian.org/news/1245087/accepted-hw-detect-1147-source-into-unstable/
We discussed a bit on IRC, possibly we could just, at debian-cd step,
catenate the cpio archives, or unpack/assemble/repack, or ship several
initrds.
Let's clarify a little:
- Shipping several initrds would probably mean having an empty,
placeholder-like “extrastuff.gz” set by the debian-installer build,
that we would replace with some firmware-containing initrd for some
builds in debian-cd; that would mean that src:debian-installer would
still be responsible for setting up the relevant bootloader config,
instead of having part of it in debian-installer, and another part
in debian-cd.
- But I don't think that's required, adjusting the initrd in debian-cd
should be far easier.

I thought about the “combine archives” part and smcv confirmed we should
just be able to cat (compressed) CPIO archives together. I've tried the
following with a netboot-gtk build (easier than trying to edit a
firmware-enabled ISO :D), keeping in mind my cpio-speak is rusty:

dpkg -x firmware-sof-signed_1.7-1_all.deb tmp
(cd tmp; find lib | cpio -Hnewc -o) | gzip -9 > ~/debian-installer/installer/build/firmware-sof-signed.cpio.gz
cd ~/debian-installer/installer
patch -p1 < ~/0001-Talk-to-me.patch # attached this time

make -C build/ rebuild_netboot-gtk USE_UDEBS_FROM=bullseye

I have *not* conducted extended testing, but that still boots
successfully within qemu with -soundhw all, and speaks when using the
's' shortcut for speech synthesis.

And once booted on my sof-enabled laptop, it starts speaking, so I
suppose that's a successful PoC; next step is to confirm whether
tweaking debian-cd to do the cat dance looks good to Steve as well.


Cheers,
--
Cyril Brulebois (***@debian.org) <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
Cyril Brulebois
2021-08-22 14:10:02 UTC
Permalink
As mentioned in the Bullseye errata, there seems to be a number of
sound cards that require loading a firmware to be able to emit sound
(e.g. Intel SOF). Unfortunately currently the installer loads firmware
after loading the ISO image, while speech synthesis is needed at the
very first interaction with the user, which is usually before that. We'd
thus want (for the firmware-enabled image) to include firmware in the
initrd somehow.
For context, that's sof I was fighting with:
https://tracker.debian.org/news/1245087/accepted-hw-detect-1147-source-into-unstable/
We discussed a bit on IRC, possibly we could just, at debian-cd step,
catenate the cpio archives, or unpack/assemble/repack, or ship several
initrds.
Let's clarify a little:
- Shipping several initrds would probably mean having an empty,
placeholder-like “extrastuff.gz” set by the debian-installer build,
that we would replace with some firmware-containing initrd for some
builds in debian-cd; that would mean that src:debian-installer would
still be responsible for setting up the relevant bootloader config,
instead of having part of it in debian-installer, and another part
in debian-cd.
- But I don't think that's required, adjusting the initrd in debian-cd
should be far easier.

I thought about the “combine archives” part and smcv confirmed we should
just be able to cat (compressed) CPIO archives together. I've tried the
following with a netboot-gtk build (easier than trying to edit a
firmware-enabled ISO :D), keeping in mind my cpio-speak is rusty:

dpkg -x firmware-sof-signed_1.7-1_all.deb tmp
(cd tmp; find lib | cpio -Hnewc -o) | gzip -9 > ~/debian-installer/installer/build/firmware-sof-signed.cpio.gz
cd ~/debian-installer/installer
patch -p1 < ~/0001-Talk-to-me.patch
make -C build/ rebuild_netboot-gtk USE_UDEBS_FROM=bullseye

I have *not* conducted extended testing, but that still boots
successfully within qemu with -soundhw all, and speaks when using the
's' shortcut for speech synthesis.

And once booted on my sof-enabled laptop, it starts speaking, so I
suppose that's a successful PoC; next step is to confirm whether
tweaking debian-cd to do the cat dance looks good to Steve as well.


Cheers,
--
Cyril Brulebois (***@debian.org) <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
Samuel Thibault
2022-02-13 19:00:01 UTC
Permalink
Control: reassign -1 debian-cd

Hello,
Post by Cyril Brulebois
As mentioned in the Bullseye errata, there seems to be a number of
sound cards that require loading a firmware to be able to emit sound
(e.g. Intel SOF). Unfortunately currently the installer loads firmware
after loading the ISO image, while speech synthesis is needed at the
very first interaction with the user, which is usually before that. We'd
thus want (for the firmware-enabled image) to include firmware in the
initrd somehow.
https://tracker.debian.org/news/1245087/accepted-hw-detect-1147-source-into-unstable/
We discussed a bit on IRC, possibly we could just, at debian-cd step,
catenate the cpio archives, or unpack/assemble/repack, or ship several
initrds.
And once booted on my sof-enabled laptop, it starts speaking, so I
suppose that's a successful PoC; next step is to confirm whether
tweaking debian-cd to do the cat dance looks good to Steve as well.
I had a try at adding support to debian-cd, I can up with this:
https://salsa.debian.org/images-team/debian-cd/-/merge_requests/23

It actually follows the debian-edu way which uses cpio -oA to append
content. That makes it simpler for anybody who would be trying to gunzip
the initrd.gz

Cyril, could you try on the actual hardware the resulting image:
https://people.debian.org/~sthibault/tmp/debian-sid-amd64-NETINST-1.iso

debian-cd people, could you have a look?

It would be also very worth applying to the bullseye images.

Samuel
Debian Bug Tracking System
2022-02-13 19:00:01 UTC
Permalink
Post by Samuel Thibault
reassign -1 debian-cd
Bug #992699 [debian-installer] debian-installer: Firmwares required for some sound cards
Bug #985696 [debian-installer] debian-installer: Speech synthesis and Intel SOF firmware
Bug reassigned from package 'debian-installer' to 'debian-cd'.
Bug reassigned from package 'debian-installer' to 'debian-cd'.
No longer marked as found in versions debian-installer/20210731.
No longer marked as found in versions debian-installer/20210731.
Ignoring request to alter fixed versions of bug #992699 to the same values previously set
Ignoring request to alter fixed versions of bug #985696 to the same values previously set
--
985696: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985696
992699: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992699
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Cyril Brulebois
2022-02-13 19:10:01 UTC
Permalink
Hi,
Post by Samuel Thibault
https://people.debian.org/~sthibault/tmp/debian-sid-amd64-NETINST-1.iso
Please don't block on me, I'm *very* low on free time, and I don't see
that improving until March or so.


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