Merge pull request #5 from tuxedocomputers/master

Master
This commit is contained in:
Christian Loritz 2018-08-20 18:23:56 +02:00 committed by GitHub
commit 6ab61fda0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 7 deletions

View file

@ -24,15 +24,23 @@ Additions
- linux-headers - linux-headers
- dkms (Only when use this module with the DKMS functionality) - dkms (Only when use this module with the DKMS functionality)
## Warning on installing the module:
Use either method only. Do not combine installation methods, such as starting with the build step below and proceeding to use the same build artifacts with the DKMS module. Otherwise the module built via dkms will fail to load with an `exec_format` error on newer kernels due to a mismatched version magic.
This is why the DKMS build step begins with a `make clean` step.
For convenience, on platforms where DKMS is in use, skip to the DKMS section directly.
## Build the Module ## Build the Module
```sh ```sh
make clean && make make clean && make
``` ```
## dkms ## The DKMS route:
### Add as DKMS Module ### Add as DKMS Module:
At first point add the Module At first point add the Module
```sh ```sh
@ -56,7 +64,7 @@ Load the module with modprobe
modprobe tuxedo_keyboard modprobe tuxedo_keyboard
``` ```
### Remove DKMS Module ### Uninstalling the DKMS Module:
Remove the dkms module Remove the dkms module
```sh ```sh
@ -76,7 +84,7 @@ sudo rm -rf /usr/src/tuxedo_keyboard-1
modprobe tuxedo_keyboard modprobe tuxedo_keyboard
``` ```
## Load at Boot-Up ## Load the module on boot:
Add Module to /etc/modules Add Module to /etc/modules
```sh ```sh
@ -85,12 +93,17 @@ echo tuxedo_keyboard >> /etc/modules
``` ```
Default Parameters at start. Default Parameters at start.
In this example we start the kernel module with
In this example, we start the kernel module with the following settings:
- mode 0 (Custom / Default Mode) - mode 0 (Custom / Default Mode)
- red color for the left side of keyboard - red color for the left side of keyboard
- green color for the center of keyboard - green color for the center of keyboard
- blue color for the right side of keyboard - blue color for the right side of keyboard
Note that we write its' settings to a `.conf` file under `/etc/modprobe.d` named `tuxedo_keyboard.conf`.
```sh ```sh
sudo su sudo su
echo "options tuxedo_keyboard mode=0 color_left=0xFF0000 color_center=0x00FF00 color_right=0x0000FF" > /etc/modprobe.d/tuxedo_keyboard.conf echo "options tuxedo_keyboard mode=0 color_left=0xFF0000 color_center=0x00FF00 color_right=0x0000FF" > /etc/modprobe.d/tuxedo_keyboard.conf
@ -184,4 +197,4 @@ Value: 5
Value: 6 Value: 6
## WAVE ## WAVE
Value: 7 Value: 7

View file

@ -5,6 +5,6 @@ DEST_MODULE_LOCATION=/kernel/lib/
BUILT_MODULE_NAME=tuxedo_keyboard BUILT_MODULE_NAME=tuxedo_keyboard
BUILT_MODULE_LOCATION=src/ BUILT_MODULE_LOCATION=src/
MAKE="make -C . KERNELDIR=/lib/modules/${kernelver}/build" MAKE="make -C . KDIR=/lib/modules/${kernelver}/build"
CLEAN="make -C src/ clean" CLEAN="make -C src/ clean"
AUTOINSTALL="yes" AUTOINSTALL="yes"