Comments (3)
I think I might have found a solution here:
https://wiki.kubuntu.org/Kernel/Dev/DKMSPackaging
They give an example Makefile:
obj-m := hello.o
KVERSION := $(shell uname -r)
all:
$(MAKE) -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:
$(MAKE) -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
... and specify the need for using the KVERSION variable below:
"Please use a variable to keep the kernel version we want to compile. In the above example, it is $(KVERSION). We usually run dkms build under the various kernel version, and the DKMS will pass the target kernel version to Makefile."
I will test if this works for me.
from hp_n36-40-54l_health_led_drivers.
It seems like the KVERSION variable also needs to be specified in the dkms.conf MAKE command with reference to the dkms variable $kernelver
Add dkms.conf and put it with your Makefile
Here is an example dkms.conf for hello-0.1
PACKAGE_NAME="hello"
PACKAGE_VERSION="0.1"
CLEAN="make clean"
MAKE[0]="make all KVERSION=$kernelver"
BUILT_MODULE_NAME[0]="hello"
DEST_MODULE_LOCATION[0]="/updates"
AUTOINSTALL="yes"
PACKAGE_NAME, PACKAGE_VERSION is necessary information, it shall be the same with the information or your folder name.
CLEAN is the command to clean up the folder. Every time before build, it will be executed. If unset, it is assumed to be "make clean"
MAKE[0] is the first command to build the kernel object. Since this is an example, this is the only command we have. This field tells DKMS how to build the kernel object, and we can pass the target kernel version by using $kernelver that DKMS provides us.
from hp_n36-40-54l_health_led_drivers.
Ok, so I looked around for some other dkms modules, and how they handled Makefiles and dkms.conf, and I was able to make the files in this project work with AUTOINSTALL=yes
By using variables, dkms can build against other kernel version headers, and still default to the currently running kernel version, if needed.
from hp_n36-40-54l_health_led_drivers.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hp_n36-40-54l_health_led_drivers.