As it happens I’ve recently done this myself, so I can point you to what I did. This may be more convoluted than strictly necessary but I’ve been happy with the results.
(I don’t know how familiar you are with this stuff so I apologize if this is too granular/not granular enough)
These are the steps I took to get an image with the drivers I needed:
- Put together an
akmod
package with the driver.
- Build that package in a Copr.
- PR a script into akmods that adds the package to their
extras
image.
- Create a Bluefin derivative which uses that package and rebase into that.
Here’s how I completed each step:
1. Package the driver
This step is probably the hardest to get into if you’re not already used to packaging software. I couldn’t find any good documentation on creating akmod
packages specifically, so my effort was mostly trolling the Fedora docs and looking at existing driver packages to figure it out.
You can see what I did in my repo.
There are two .spec
files. One is for the driver itself (system76-io-kmod.spec
) and the other (system76-io.spec
) packages “common” files like the README and the driver list.
Your best bet might be to copy what I have and make changes. In particular, you want the URL
field in the -kmod.spec
file to point to the upstream repo while in the other .spec
you want to point to the repo where you’re doing your work.
I’m sure there’s a less convoluted way to do this but it worked for me 
2. Build the package in a Copr
Next you want to sign up for a Copr account if you don’t already have one.
Once you’re set up create a project. Most of the fields should be pretty self-explanatory but under Build Options → Chroots you want to check:
fedora-40-x86_64
fedora-41-x86_64
fedora-rawhide-x86_64
and leave the rest alone.
Once you have your project you want to create two packages. Go into the “Packages” tab in your project and click “New package”.
You want to create a aorus-laptop-kmod
package and an aorus-laptop
package. For both of these make sure the Clone url
field points to your Github repo with the .spec
files. The Spec file
field should list which .spec
file is associated with that package (i.e. the -kmod
variant or not)
Once you have that set up you can click the “Rebuild all” button on the Packages page to try building them. It might take a few iterations of building then reading logs to see what went wrong. If you get stuck on this part you can paste the logs here and I’ll help if I can!
3. PR the package into akmods
Once your packages are building you can open a PR into akmods
! You can look at one I did a bit ago for a sense of what to do: feat: add system76-io driver by ssweeny · Pull Request #284 · ublue-os/akmods · GitHub
You basically add a script which builds the RPM, then add that to Containerfile.extra
. I was able to test this locally using podman build -f Containerfile.extra
which was nice for cleaning things up before posting for review.
Assuming all the tests pass you should be able to get reviewed and merged relatively quickly.
4. Create a custom image
Since the extras
aren’t installed by default in the Universal Blue images you’re going to have to make a custom image based on e.g. Bluefin which also includes your drivers.
Personally I think the easiest thing to do here is to use the BlueBuild system. It’s recipe-based and as a non-cloud-native developer this was easier for me to get my head around than the UBlue template.
I would follow their instructions to create your repo from their template then add an akmods
section that lists your driver. You can see how I did it here: ublue-ssweeny/recipes/recipe-bluefin-dx-hwe.yml at 454e99968fdfb685e4534feaf1edd0fbc22021a4 · ssweeny/ublue-ssweeny · GitHub
I realize this is a lot, so give it a try and if you get stuck give me a ping and I’ll be happy to help out!