https://blue-build.org/ logo
Adding broadcom wl driver to an image
# questions
p
New to this, how do I add the proprietary Broadcom wifi driver (wl)?
a
message has been deleted
b
I can't properly format this on mobile, but if you give me a minute I can show you what you'd want to do. You'll want to add either Terra or RPM Fusion to get it, but I think RPM Fusion will disable negativo17 and Terra will conflict with it if you don't do it right, let me sanity check that first.
p
thank you! take your time
b
Aight I'm on a PC now, so you got two different options like I said, Terra or RPM Fusion. I'll give you the TL;DR, but I've gone down this rabbit hole already with other packages, so it'd be good to understand what you're actually doing on blue build because it doesn't work like a normal dnf install and I didn't know what negativo17 was when I started using ublue images. Let me just check real quick how the RPM Fusion one worked and I can give you a couple suggestions.
Okay, so if you want to go down the RPM Fusion route, what I would suggest doing is enabling the repository and installing broadcom-wl last in you recipe. I wouldn't run any dnf modules after that if you can help it, I'll explain in a bit, but you want a module like this:
Copy code
- type: dnf
    repos:
      nonfree: rpmfusion #this installs both free and nonfree repos + updates, blue build understands the logic, this confused me when I tried it before
    install:
      packages:
      - broadcom-wl
As long as that's the last dnf module you run, I think it would work fine. You could alternatively use terra. I didn't even realize they ship broadcom. but according to repology they do. The process is similar, run this module last:
Copy code
- type: dnf
    repos:
      files:
      - https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo
    install:
      packages:
      - broadcom-wl
So, if you need any packages besides those from either repo, be careful how you install them. Blue build won't fix dependency issues on its own if you have conflicting repositories like dnf normally does. There's a few reasons for this, which I've found out today, but the important one here is that ublue uses negativo17 instead of RPM Fusion for codecs and proprietary software. Some of the stuff that is available on RPM Fusion is also available there, but the packages are named differently and are NOT compatible with eachother. You can install Steam, Nvidia drivers, Blender, Spotify and Handbrake from negativo17 and it packages codecs like ffmpeg for you already with them enabled on ublue images. If you want more packages from Terra, you can either run it last like here and use the from-repo option in the dnf module, but Terra can butt heads with negativo17 in some cases too. I'd either give it a low priority or run it last in the build like I said.
p
oh sorry, missed this! reading now
i'm a bit headspun, one moment
is there a way to rip out negativo and just set up RPM fusion more or less like standard fedora?
b
I tried that. I got it to work for the most part I think, but it required me to replace a ton of packages. I realized it was probably going to be easier to just stick with negativo17. I had to replace packages from multiple different repos.
This is what I ended up with, hated it, and decided to stop fighting it:
Copy code
- type: dnf
    replace:
    - from-repo: rpmfusion-free-updates
      allow-erasing: true
      packages:
      - old: libavcodec
        new: ffmpeg-libs
      - old: libavdevice
        new: ffmpeg-libs
      - old: libavfilter
        new: ffmpeg-libs
      - old: libavformat
        new: ffmpeg-libs
      - old: libavutil
        new: ffmpeg-libs
      - old: libswresample
        new: ffmpeg-libs
      - old: libswscale
        new: ffmpeg-libs
      - ffmpeg-libs
      - libfreeaptx
      - x264-libs
      - x265-libs
    - from-repo: updates
      allow-erasing: true
      packages:
      - libva
      - intel-gmmlib
    - from-repo: fedora
      allow-erasing: true
      packages:
      - old: libfdk-aac
        new: fdk-aac-free
    - from-repo: terra
      allow-erasing: true
      packages:
        - kvazaar-libs
I asked in Ublue why they use negativo17, I got a response from Kyle right away (bazzite founder). He said they prefered the akmods from negativo17 over RPM Fusion, so they decided to just switch all of the codecs to it in order to make life easier for them.
p
...can i get WL from negativo then?
😭
b
As far as I can tell, no, but like I said, running RPM Fusion last will prevent it from fighting with negativo17 and it will only install the packages you ask it to. broadcom-wl should work fine if that's all you needed.
p
yep!
so this?
b
Yeah, just make sure you run that specific dnf module after all of your other dnf modules if you have one or more. I don't think anything else would be an issue unless you run a script with dnf commands (which is not recommended anyway).
If the build fails because of a package dependency issue, then paste the output here, but I don't think broadcom has any dependencies from RPM Fusion, so it should be fine.
g
You can add a
cleanup: true
under the
repos:
section and the module will remove any added repo files from that call for situations like this
b
That's what that does?
Can that be put in the documentation? I had no idea that's what it did.
b
I don't think it says anything right now.
g
I coulda sworn I put that in the docs
It's short tho
b
I suppose it does, but I ain't gonna lie, my dummy head didn't understand what that meant, so I never even gave it a second thought.
g
I use it all the time when installing a specific package from a repo that I won't use again
b
So if you do rpmfusion then, does it automatically re enable negativo17?
After I mean
g
No, it will just remove rpmfusion. Enabling one will remove the other
Since they conflict
b
Good to know then.
p
...so how do i
g
We tried to make getting those repos setup easily for users since it can be a real pain
p
how do I add rpmfusion and then put things back
how they were
g
You can add
cleanup: true
p
i'm lost, sorry!
the only other thing i want to do is upload ISOs to buzzheavier, never done CI before so that's daunting
b
You can still do what I said and run it last, but you can also add the cleanup option. That would still be my recommendation.
p
ohh, okay
and then negativo will be
fixed?
g
If you ever need to use negativo for other things, you can set it back to
nonfree: negativo17
In a later module statement
p
but it already comes with codecs right
sorry this is all very new to me
g
b
Yeah, all of those are pre installed on ublue images. Don't try and replace them with the RPM Fusion ones, it was a nightmare and gets you litterally the same result anyway.
b
I think cleanup has to go above the line with nonfree.
p
ah
also it says I'm using ublue's image
g
No it just needs to be a part of
repos:
properties
The order between
nonfree
and
cleanup
doesn't matter
But you do need a space between
cleanup:
and
true
p
i fixed that, thank you!
base-image: ghcr.io/ublue-os/silverblue-main image-version: latest
p
ghcr.io/blue-build/base-images/fedora-silverblue?
b
Yeah, all blue build images use the ublue ones. I think it says in the docs you could try and use regular silverblue, but it isn't officially supported? (I might be talking out of my ass with that one)
g
We don't use their images, we installed the same packages as their main images. These are images we maintain now
We base off of the fedora ostree desktop images
p
am i outdated then?
g
We just wanted to be compatible with whatever Ublue started
p
so should I be using the ghcr.io/blue-build/base-images/fedora-silverblue or the default ublue image
g
You can use whatever image you want. I would suggest our base images if you want better support from us. We don't track everything Ublue does anymore
p
ohh okay
is that outdated bc i used workshop or smth?
g
Workshop might be outdated. It hasn't been touched in a while
p
makes sense, i got a dependabot nag as soon as I created the repo
not a deps issue but
ERROR: Not to be used as root; start as user or 'akmodsbuild' instead.
b
I'm ngl, I've only needed broadcom one time on a system, and I don't think I installed akmods-wl, but it worked, so idk what to do there.
p
with no helpful info because the CLI isn't verbose enough
2012 model could use b43 but the 2013 doesn't support it (4360)
the 2012 model was a fucking cakewalk by comparison,
i don't have a pentalobe driver to try swapping the AirPort cards between them
b
Aight, I think you're actually on the right track here more than I was originally, but you need to add 'base: main' to the akmods module.
Then I think it will work.
p
oh
lmao
will try
b
Copy code
- type: akmods
  base: main
  install:
    - wl
Like that, I think.
no dice
same error, no idea what to do
any ideas @gmpinder ?
g
This is the closest I could find
We had to do some weird changes to build scripts for the nvidia kmod to get around the same issue
7 Views