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

powermate kernel module missing #408

Closed
PaulBatchelor opened this issue Jan 2, 2018 · 5 comments
Closed

powermate kernel module missing #408

PaulBatchelor opened this issue Jan 2, 2018 · 5 comments

Comments

@PaulBatchelor
Copy link

@PaulBatchelor PaulBatchelor commented Jan 2, 2018

Greetings,

I would like to be able to my Griffin Powermate USB knob with GalliumOS. It would appear that the kernel that I am using (4.8.17-galliumos) does not have the "powermate" module installed.

How difficult would it be to add the powermate module into the galliumos kernel?

Thanks,

-P

@mswanson-me
Copy link
Member

@mswanson-me mswanson-me commented Mar 7, 2018

Modules do not need to be rolled into the kernel. In fact, by design they are... modular! Using

modprobe

you can load new modules on the fly.

For info about modprobe, check out this article: https://www.cyberciti.biz/faq/add-remove-list-linux-kernel-modules/

@PaulBatchelor
Copy link
Author

@PaulBatchelor PaulBatchelor commented Mar 7, 2018

Oh great! I wasn't sure if they could be dynamically loaded like that or not. Does that mean I could just find a compatible binary of the driver and load it in? Surely it must be harder than that...

@PaulBatchelor
Copy link
Author

@PaulBatchelor PaulBatchelor commented Mar 7, 2018

It would seem to be a bit harder. I'm running into this error PKCS#7 signature not signed with a trusted key when I run dmesg. I'm also getting powermate: disagrees about version of symbol module_layout. I have no idea what I'm doing.

I have a working custom kernel built with the same version number as my current galliumos kernel. I plopped the powermate.ko into the same directory, ran depmod -a and then modprobe powermate.

@PaulBatchelor
Copy link
Author

@PaulBatchelor PaulBatchelor commented Mar 7, 2018

Okay! I got things working. It's been a very educational evening for me. Main breakthrough was reading this stackoverflow post

For documentation purposes, I will write what I did.

First I cloned the source code from here with
git checkout -b v4.8.17 https://github.com/GalliumOS/linux-pre4.11.git

I then needed to copy some files from the linux-headers:

.config:

cp /usr/src/linux-headers-4.8.17-galliumos/.config .

Module.symvers:

cp /usr/src/linux-headers-4.8.17-galliumos/Module.symvers .

I then opened up .config and found CONFIG_INPUT_POWERMATE and added the line CONFIG_INPUT_POWERMATE=m

After that, I ran make prepare

Then, make SUBDIRS=scripts/mod.

I had to find the directory where the powermate driver was, which ended up being in drivers/input/misc/. I then ran make SUBDIRS=drivers/input/misc/ modules.

After this, I copied the ko file into the system directory with
sudo cp drivers/input/misc/powermate.ko /lib/modules/4.8.17-galliumos/kernel/drivers/input/misc/powermate.ko.

Then sudo depmod and finally sudo modprobe powemate.

Thanks for the response, @mswanson-me! I had already given up on this issue.

@mswanson-me
Copy link
Member

@mswanson-me mswanson-me commented Mar 7, 2018

I'm so glad! Thank you very much for documenting your process for other users!

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

Successfully merging a pull request may close this issue.

None yet
2 participants