You are not logged in.

#1 2017-10-12 11:49:41

simgunz
Member
Registered: 2012-09-04
Posts: 14

Manually compiled kernel module and kernel update.

I need to patch a kernel module to disable the BIOS fan control on a dell laptop (it adds a function to the module drivers/hwmon/dell-smm-hwmon.c). I managed to do it and I created the AUR package 'dell-smm-hwmon-i8kutils'. The problem is that at every minor update of the kernel (every few days) I need to recompile the kernel module and reinstall it. Is it there a faster solution to do this? Can I use the same compiled patched module across minor updates of the kernel?

Offline

#2 2017-10-12 12:00:10

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Manually compiled kernel module and kernel update.

Look into providing the package as a -dkms variant, this will automatically rebuild every time there is a kernel update.
https://wiki.archlinux.org/index.php/Dy … e_creation


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-10-13 08:55:11

unixman
Member
Registered: 2015-03-12
Posts: 64

Re: Manually compiled kernel module and kernel update.

simgunz wrote:

Can I use the same compiled patched module across minor updates of the kernel?

Yes,  but you  have to use --force parameter  as "modprobe --force  your_module"

Offline

#4 2017-10-13 09:47:11

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Manually compiled kernel module and kernel update.

simgunz wrote:

I need to recompile the kernel module and reinstall it.

"I"? Write a script to automate the recompilation at bootup, when needed.

Offline

#5 2017-10-15 07:37:07

simgunz
Member
Registered: 2012-09-04
Posts: 14

Re: Manually compiled kernel module and kernel update.

The module I want to patch and install is:
drivers/hwmon/dell-smm-hwmon.ko

My current PKGBUILD is here:
https://aur.archlinux.org/packages/dell … -i8kutils/

I'm trying to build the module with the dkms option. Some questions:
1) In the previous PKGBUILD I was downloading the full linux zip in order to retrieve the source for that specific module, but I guess there is a faster/lighter way to only get the sources of the specific module I need. Can you suggest me something?
2) Is dkms.conf fine like this? (Modified from the one in the linked Arch wiki page)

PACKAGE_NAME="@_PKGNAME@"
PACKAGE_NAME="@_PKGNAME@"
PACKAGE_VERSION="@PKGVER@"
MAKE[0]="make --uname_r=$kernelver"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="dell-smm-hwmon"
DEST_MODULE_LOCATION[0]="/updates"
AUTOINSTALL="yes"

3) In the current PGBUILD I compile the whole hwmon folder, can I only compile dell-smm-hwmon as in the dpkg.conf above?

Offline

#6 2017-10-15 07:48:16

simgunz
Member
Registered: 2012-09-04
Posts: 14

Re: Manually compiled kernel module and kernel update.

Regarding point 1). As it is now, the download link for the kernel sources is dependent on $pkgver (that is the current kernel version). So being the download link dependent on the minor version of the kernel I want to patch, I need to update the PKGBUILD everytime. So in this sense the dkms option doesn't solve my original problem.

@brebs The script you suggest is also a good alternative.

Offline

Board footer

Powered by FluxBB