waffle
is a lightweight Wayland compositor for embedded devices.
- Optimized for Embedded Systems
- Lightweight
- Minimal dependent libraries
- arm64/x64 devices support
- Display backends (Still developing!!)
- Keyboard, mouse and touch inputs support
Install the following dependent libraries to build this software. Here introduce how to install the libraries on Debian-based systems like Ubuntu.
Ubuntu 20.04 or above is recommended to develop and build this software.
- clang
- cmake
- build-essential
- pkg-config
$ sudo apt install clang cmake build-essential pkg-config
- EGL
- xkbcommon
- OpenGL ES (>=3.0)
- SOIL
- libwayland
- wayland-protocols (to generate the source files of Wayland protocols)
$ sudo apt install libegl1-mesa-dev libxkbcommon-dev libgles2-mesa-dev \
libsoil-dev libwayland-dev wayland-protocols
- x11
$ sudo apt install libx11-dev
- libdrm
- libgbm
- libinput
- libudev
- libsystemd
$ sudo apt install libdrm-dev libgbm-dev libinput-dev libudev-dev \
libsystemd-dev
$ mkdir build && cd build
$ cmake -DBACKEND_TYPE=X11 -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build .
$ mkdir build && cd build
$ cmake -DBACKEND_TYPE=DRM-GBM -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build .
$ ./waffle
You need to switch from GUI which is running X11 or Wayland to the Character User Interface (CUI). In addition, WAFFLE_DRM_DEVICE
must be set properly. The default value is /dev/dri/card0
.
$ Ctrl Alt F3 # Switching to CUI
$ sudo WAFFLE_DRM_DEVICE=/dev/dri/card1 ./waffle
If you want to switch back from CUI to GUI, run Ctrl Alt F2 keys in a terminal.
You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group.
You can get more debugging logs using WAFFLE_LOG_LEVELS
that is one of environment variables in waffle
. If you want to do debugging, set WAFFLE_LOG_LEVELS
. The default level is WARNING.
$ WAFFLE_LOG_LEVELS=TRACE ./waffle
$ WAFFLE_LOG_LEVELS=INFO ./waffle
$ WAFFLE_LOG_LEVELS=WARNING ./waffle
$ WAFFLE_LOG_LEVELS=ERROR ./waffle
$ WAFFLE_LOG_LEVELS=FATAL ./waffle