Closed rusanovd7 closed 4 years ago
The tag wasn't annotated which is why it didn't work, I have force pushed tag changes so it should work now as is.
Can you please check?
Now "make dkms" seems to work:
root@host:/home/user/hddleds/hddled_tmj33# make dkms
Creating symlink /var/lib/dkms/hddled_tmj33/0.1-0-g7b05b17/source ->
/usr/src/hddled_tmj33-0.1-0-g7b05b17
DKMS: add completed.
Preparing kernel 5.4.0-0.bpo.4-amd64 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper...(bad exit status: 2)
Warning: using /usr/src/linux-headers-5.4.0-0.bpo.4-amd64/.config
(I hope this is the correct config for this kernel)
make oldconfig...(bad exit status: 2)
make prepare-all...(bad exit status: 2)
Building module:
cleaning build area...
make -j2 KERNELRELEASE=5.4.0-0.bpo.4-amd64 TARGET=5.4.0-0.bpo.4-amd64...
cleaning build area...
cleaning kernel tree (make mrproper)...(bad exit status: 2)
DKMS: build completed.
hddled_tmj33.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.4.0-0.bpo.4-amd64/updates/dkms/
depmod...
DKMS: install completed.
root@host:/home/user/hddleds/hddled_tmj33#
I am totally new to makefiles and DKMS, so I am not sure if I should be worried about "bad exit status: 2" or the fact that the driver is not copied to /usr/lib/modules/5.4.0-0.bpo.4-amd64/kernel/drivers/misc/ as dkms.conf suggests (the same behaviors as with the "workaround"), but I am able to change the LED colors and load the module at boot.
Full disclosure, I use NixOS on my Terramaster so I don't really mess with dkms. I just copied and modified this Makefile from another project to include dkms so it's easier for others to make use of it as well.
It seems that dkms is trying to use generic make targets that are often used in projects (mrproper
, oldconfig
and prepare-all
) but are not present in my Makefile. As they are not needed it doesn't matter that they return with exit code 2 and dkms build doesn't fail because it's fine with these not existing. But I'm just guessing here.
It should be installing it to /lib/modules/5.4.0-0.bpo.4-amd64/kernel/drivers/misc/
(no /usr
prefix).
If not, you can try running find /lib/modules/5.4.0-0.bpo.4-amd64 -name hddled_tmj33.ko
.
My mistake about the "/usr/lib...". Still the module is not in /lib/modules/5.4.0-0.bpo.4-amd64/kernel/drivers/misc/
root@host:/# find /lib/modules/5.4.0-0.bpo.4-amd64/ -name hddled_tmj33.ko
/lib/modules/5.4.0-0.bpo.4-amd64/updates/dkms/hddled_tmj33.ko
root@host:/#
Anyway, the module is working as expected and the reason I opened the issue is resolved. Thanks again!
P.S. I was getting the (bad exit status: 2)
messages because of this line:
@dkms build -m $(DRIVER) -v $(DRIVER_VERSION) --kernelsourcedir=$(KERNEL_BUILD)
Once I removed --kernelsourcedir=$(KERNEL_BUILD)
these messages stopped appearing.
Hello,
First of all, thanks a lot for the driver! I tried to install it on a F2-221 running OpenMediaVault 5.3.10-1 (Debian based), but I got this error during make:
As far as I could understand, this error was generated here: DRIVER_VERSION := $(shell git describe --long) //Makefile, line 32
As a workaround I changed it to: DRIVER_VERSION := $(shell git describe --tags) and it got installed, but it is probably not the best way to fix it.