Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for immutable versions of Fedora #192

Open
PVermeer opened this issue Dec 2, 2024 · 1 comment
Open

Support for immutable versions of Fedora #192

PVermeer opened this issue Dec 2, 2024 · 1 comment

Comments

@PVermeer
Copy link

PVermeer commented Dec 2, 2024

Hey @WeirdTreeThing!

I've created a copr repo to support immutable fedora distro's!

https://copr.fedorainfracloud.org/coprs/pvermeer/chromebook-linux-audio
https://github.com/PVermeer/chromebook-linux-audio

It works by packaging this repo and the alsa-ucm-conf-cros repo while disabling the git clone in your script. The alsa-ucm-conf-cros repo is then copied to /tmp so the script can use it.

The script run in the %post step so it has write access to the system and can make the necessary adjustments.

Let me know what you think!

@WeirdTreeThing
Copy link
Owner

Hi, thanks for showing interest in this. While I would like support for immutable distros using ostree, I don't feel like running the script and allowing it to modify system files is the correct approach.

If we take a look at the script, it does the following:

  • Run platform-specific configuration
  • Installs UCM
  • Installs wireplumber configuration

The last two are easy enough to just package. As part of a collaboration between Fyra Labs and chrultrabook, chromebook ucm is packaged in Fyra's terra repo, with automatic updates. Various other packages for chromebooks are also packaged in that repo.

If we take a look at platform-specific config cases:

  • hifi2_audio: Installs a modprobe config to use the sof driver and enable sof debug mode to fix a driver bug. The default driver to use is just a kernel config and I have a kernel patch to enable debug mode by default.
  • avs_audio: Prints a warning about max98357a and gives users the option to enable support or not. To be safe this could always be off (maybe a separate package could be installed to enable it?). Copies topology from the repo, I believe prebuilts from intel have been upstreamed. If not, once again can be packaged. Installs a modprobe config to use the avs driver instead of the skl driver. I have a kernel patch to do this automatically. Installs a wireplumber config, can be packaged. Installs updated DSP firmware, this is mostly a backport that probably isnt needed and is already in fedora.
  • apl_audio: Simply gives the option to choose between sof and avs. Since driver selection should really be in the kernel, this may have to be hardcoded. A separate package with a modprobe config could be used to override if desired.
  • sof_audio: Installs firmware. Symlinks certain topology files, which can be packaged. Installs backported topology for JSL, probably not needed anymore.
  • amd_audio: Only does something on mendocino (ryzen 7000) and just installs firmware which can be packaged. This may even be in upstream now, I haven't checked in a while.

As kernel patches are needed for a few, a chromebook kernel could be used instead of a script. See this for more details on the patches.
And all of them install any needed firmware, which can also be dependencies of a "chromebook-audio" package.

All of the logic in this script can be kernel patches or packages, which I believe is the best way to support immutable distros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants