0

so I've been following this guide for making a driver for my keyboard lighting:

Reverse-Engineer Driver for Multi-colored Backlit Keyboard on Clevo Laptops

It works but I can't seem to add it to the list of modules that load on boot.

When I try the step

sudo cp ~/dev/clevo-wmi-code/clevo_wmi.ko /lib/modules/`uname -r`/kernel/drivers/platform/x86/

it comes back to me with target/kernel/drivers/platform/x86/is not a directory.

Is there any other way for me to apply this module?

1 Answers1

0

uname -r isn't properly substituted in the directory path. You should use $(uname -r) in order for the right kernel version to be appended to your path. Try the following command instead:

sudo cp ~/dev/clevo-wmi-code/clevo_wmi.ko /lib/modules/$(uname -r)/kernel/drivers/platform/x86/

Also make sure to run depmod -a and to add your module name to the /etc/modules file.

Zebaz
  • 156
  • 4
  • OK, I tried that and now it says: cp: cannot stat ‘/root/dev/clevo-wmi-code/clevo_wmi.ko’: No such file or directory – Robert Dunne Feb 28 '15 at 23:42
  • Please retry by explicitly defining the path, I think that your file is in your /home//dev directory, while running a command as sudo and using the `~` character, the command will look in the home directory of the `root` user. `sudo cp /home//dev/clevo-wmi-code/clevo_wmi.ko /lib/modules/$(uname -r)/kernel/drivers/platform/x86/` should do the trick in that case. – Zebaz Mar 01 '15 at 15:52
  • Unfortunately still no joy. The file is in home then dev. I tried inputting the command without the username but that didn't work either. – Robert Dunne Mar 01 '15 at 16:03