Skip to content

Testing and Installing

Maximilian Luz edited this page Jul 3, 2020 · 5 revisions

To test these modules, you need a custom kernel with the patches found in this repository applied. These patches are in the mainline kernel since v5.6. For a full set of patches, see [this][patches-linux-surface] repository. Furthermore, you need to ensure that the following config values are set:

CONFIG_SERIAL_DEV_BUS=y
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y

If you're using a mainline v5.6 kernel from one of the common distros (Ubuntu, Debian, Arch, ..., basically anything that's intended for desktop use), this should all be set. If you have all the prequisites, you can

Build/Test the modules

You can build the modules by running make inside the module/ directory. After that, you can load the modules by running the ssam-modprobe script, found in the scripts/ directory with insmod as parameter from the module directory (i.e. sudo ../scripts/ssam-modprobe insmod). After testing remove it with ssam-modprobe rmmod.

If you have the linux-surface kernel installed, you will need to unload the built-in SAM modules first. Similar to loading the externally built modules, you can do this by running sudo ./scripts/ssam-modprobe -r. You can load the in-kernel modules again after testing via sudo ./scripts/ssam-modprobe.

Permanently install the modules

If you want to permanently install the modules (or ensure it is loaded during boot), you can run make dkms-install. To uninstall it, run make dkms-uninstall. In case you've installed a patched kernel already contiaining the in-kernel version of this module, dkms should detect this and override the in-kernel modules with the externally built ones. This should get reverted by uninstalling the modules via the command above.

Clone this wiki locally