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

RFE: provide an akmod package #16949

Open
ElCoyote27 opened this issue Jan 14, 2025 · 1 comment
Open

RFE: provide an akmod package #16949

ElCoyote27 opened this issue Jan 14, 2025 · 1 comment
Labels
Type: Feature Feature request or new feature

Comments

@ElCoyote27
Copy link

for RHEL-based distros, there is a middle-ground between zfs-dkms (everything compiled every time) and zfs-kmod (statically built packages that don't usually survive a RHEL minor upgrade): provide an akmod package.

Please allow me to provide an example with NVidia proprietary drivers on RHEL (from either Megativo17 or rpmfusionorg):

The repo (here negativo17) provides 3 packages:
akmod-nvidia : akmod source of the nvidia driver:
dkms-nvidia : dkms source of the nvidia set of drivers
kmod-nvidia : static rpm for kABI-compatible loading

All of these are mutually exclusive.
When installed, the akmod rpm will build a version of the nvidia drivers for the current kernel -AND- it will also package them as a kmod which is then injected into the RHEL-like distro.

Here a RHEL8.10 machine where only akmod-nvidia is installed:

# rpm -q kmod-nvidia dkms-nvidia akmod-nvidia 
package kmod-nvidia is not installed
package dkms-nvidia is not installed
akmod-nvidia-565.77-1.el8.x86_64

There is a fresh kmod-nvidia- rpm installed:

# rpm -qa kmod-nvidia*
kmod-nvidia-4.18.0-553.el8_10-565.77-1.el8.x86_64
# modinfo -F filename nvidia
/lib/modules/4.18.0-553.34.1.el8_10.x86_64/extra/nvidia/nvidia.ko.xz
# rpm -qf /lib/modules/4.18.0-553.34.1.el8_10.x86_64/extra/nvidia/nvidia.ko.xz
kmod-nvidia-4.18.0-553.el8_10-565.77-1.el8.x86_64
# rpm -ql kmod-nvidia-4.18.0-553.el8_10-565.77-1.el8.x86_64
/lib/modules/4.18.0-553.34.1.el8_10.x86_64/extra
/lib/modules/4.18.0-553.34.1.el8_10.x86_64/extra/nvidia
/lib/modules/4.18.0-553.34.1.el8_10.x86_64/extra/nvidia/nvidia-drm.ko.xz
/lib/modules/4.18.0-553.34.1.el8_10.x86_64/extra/nvidia/nvidia-modeset.ko.xz
/lib/modules/4.18.0-553.34.1.el8_10.x86_64/extra/nvidia/nvidia-peermem.ko.xz
/lib/modules/4.18.0-553.34.1.el8_10.x86_64/extra/nvidia/nvidia-uvm.ko.xz
/lib/modules/4.18.0-553.34.1.el8_10.x86_64/extra/nvidia/nvidia.ko.xz
/usr/lib/.build-id
/usr/lib/.build-id/09
/usr/lib/.build-id/09/1d8b8c1b4ce72d1b2c33c5d0002405851a4688
/usr/lib/.build-id/48
/usr/lib/.build-id/48/b8f77095299017a7e0ba745a76dac5cf6b0817
/usr/lib/.build-id/8b
/usr/lib/.build-id/8b/de4f40dfaa043d03ea61137cb20b1304cbb28d
/usr/lib/.build-id/d3
/usr/lib/.build-id/d3/212c3b6a82e6d3a6be9e195575897ba3f3d150
/usr/lib/.build-id/fd
/usr/lib/.build-id/fd/c0cbcd4718432c138335842b9f6a3eae344531

The appropriate kmod-nvidia- module got built when the system rebooted into RHEL for the first time with the akmod rpm installed.
There are several advantages to this approach:

  • thanks to akmod, this makes the nvidia driver better equipped to survive a minor upgrade on RHEL-like distros (RHELx.y to RHELx.y+1)
  • Since the akmod rpm ultimately produces other rpms the binary modules produced are: 1) with a checksum in the rpmdb and 2) redistributable to systems with the kernel version but without a compiler.
  • multiple kmod-nvidia- can coexist on the same system (similar to what dkms-nvidia does but unlike kmod-nvidia ).

RPMfusion has info on akmods here:
https://rpmfusion.org/Packaging/KernelModules/Akmods

Here is an example from negativo17's repo:

akmod SPEC file: https://github.com/negativo17/nvidia-kmod/blob/master/nvidia-kmod.spec
regular SPEC file: https://github.com/negativo17/kmod-nvidia/blob/master/kmod-nvidia.spec

@ElCoyote27 ElCoyote27 added the Type: Feature Feature request or new feature label Jan 14, 2025
@joy4eg
Copy link

joy4eg commented Jan 16, 2025

I've seen some work/path[1] for this a while ago, but unfortunately nothing has changed since.

[1] - https://gist.github.com/chenxiaolong/d7f8321a5d45e4770d1dd31e7bc6ce66

P.S. Would love to see akmod as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

2 participants