Skip to content

Installation

cybersnakeh edited this page Jan 15, 2026 · 2 revisions

Installation

This page covers building, installing, and maintaining the driver and library. Use deploy.sh for the automated path.

Requirements

  • Linux kernel 6.1+ on x86_64 (stealth VMA unlinking relies on Maple Tree)
  • Kernel headers matching the running kernel
  • Build tools: gcc/g++, make, clang/llvm, cmake
  • libelf development headers
  • DKMS (recommended) for kernel updates
  • Optional: AppArmor (apparmor_parser), SELinux tooling (selinux-policy-devel/checkpolicy)

Quick start (recommended)

./deploy.sh build
sudo ./deploy.sh install
sudo ./deploy.sh load

Secure Boot (optional)

If Secure Boot blocks module loading, sign the module after building:

./sign-module.sh

Follow the MOK enrollment prompts and reboot if required.

deploy.sh commands

  • deps (root): install build dependencies
  • build: build kernel module + userland lib
  • install (root): install everything (DKMS by default), udev, modprobe config, security profiles if available
  • uninstall (root): remove module, DKMS, libs, configs, security artifacts
  • load / unload / reload (root): control the module
  • status: show module/DKMS/device state and recent dmesg lines
  • clean: remove build artifacts
  • vm: optional rsync to a VM
  • Options: --debug, --no-dkms, --no-selinux, --no-apparmor, --force, --prefix=PATH, -j/--jobs N

Manual build (kernel)

cd kernel
make
sudo insmod snakedrv.ko   # or sudo modprobe snakedrv

Manual build (userland)

cd userland
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)

Installation paths (default prefix /usr/local)

  • Libraries: /usr/local/lib/libsnakedrv.so (and .a if built)
  • Headers: /usr/local/include/snakeengine/
  • Device: /dev/snakedrv
  • Modprobe config: /etc/modprobe.d/snakedrv.conf
  • udev: /etc/udev/rules.d/99-snakedrv.rules
  • DKMS source: /usr/src/snakedrv-<version>/ (if DKMS enabled)

Post-install

sudo modprobe snakedrv
sudo usermod -aG snakeengine $USER
udevadm control --reload-rules && udevadm trigger

Removal

sudo ./deploy.sh unload
sudo ./deploy.sh uninstall

Notes

  • Secure Boot may require module signing.
  • Keep debug_level to 1 in production; increase only for debugging.

Clone this wiki locally