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

not completely integrated with DKMS #6

Open
R-Chandra opened this issue Sep 8, 2017 · 0 comments
Open

not completely integrated with DKMS #6

R-Chandra opened this issue Sep 8, 2017 · 0 comments

Comments

@R-Chandra
Copy link

R-Chandra commented Sep 8, 2017

In the subdirectory awusb, there is a dkms.conf, but the Makefile only works for the currently running kernel (because it calls "uname -r"). Wish I knew how I might submit a suggested fix directly, but "git push" says I don't have permission. So, instead I offer this diff:

diff --recursive --unified sunxi-livesuite/awusb/Makefile sunxi-livesuite-local/awusb/Makefile
--- sunxi-livesuite/awusb/Makefile	2017-09-08 14:08:55.554315565 -0400
+++ sunxi-livesuite-local/awusb/Makefile	2017-09-08 14:10:10.699068437 -0400
@@ -1,5 +1,15 @@
 obj-m := awusb.o
+
+# The following works on DKMS *only* under the currently running
+# kernel.  While installing a new kernel, "uname -r" is not helpful.
+# If building manually, KERNELVERSION is not defined anywhere, this
+# is inherited from being called under DKMS.
+ifeq ($(KERNELVERSION),)
 KDIR := /lib/modules/$(shell uname -r)/build
+else
+KDIR := /lib/modules/$(KERNELVERSION)/build
+endif
+
 PWD := $(shell pwd)
 
 default:
@@ -7,4 +17,3 @@
 clean:
 	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
 	rm -rf Module.markers module.order module.sysvers 
-	

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant