Skip to content

[ISSUE] Bring Up Minimal Wayland Compositor and wl_shm Client on /dev/fb0 and evdev #264

Done

Description

@marcobuschini

Goal

Enable running a minimal software-rendered Wayland stack (libwayland-server / libwayland-client, a lightweight fbdev/evdev compositor, and a wl_shm client such as weston-simple-shm or a terminal) in EL0 on milo, rendering to /dev/fb0 (virtio-gpu) and reading input from /dev/input/event* (virtio-input).

Existing Foundation

milo already provides:

  • AArch64 MMU, EL0 ELF64 + PT_INTERP dynamic linking, and musl/distro ABI
  • AF_UNIX stream sockets (socketpair, bind, listen, accept, connect) and ppoll
  • /dev/fb0 (virtio-gpu) with MAP_SHARED mmap and FBIOGET_* / flush ioctls
  • /dev/input/event* (virtio-input tablet + keyboard) exposing Linux input_event
  • tmpfs (/tmp), devfs (/dev), ext2 (/mnt/disk), signals, and fork/execve

Missing Kernel & ABI Milestones

  1. SCM_RIGHTS FD Passing over AF_UNIX (sendmsg / recvmsg):
    • Implement struct msghdr / struct cmsghdr ancillary data handling for SOL_SOCKET / SCM_RIGHTS so clients and compositors can transfer shared-memory FDs across processes (FdTable ref-counted File* transfer, MSG_CMSG_CLOEXEC).
  2. Cross-Process MAP_SHARED on tmpfs & memfd_create:
    • Implement sys_memfd_create (and/or shm_open via /dev/shm backed by tmpfs) and ensure MAP_SHARED mmap on tmpfs/memfd shares the exact same physical pages between client and compositor without copying.
  3. epoll, eventfd, and timerfd Event Loop Primitives:
    • Implement epoll_create1, epoll_ctl, epoll_wait / epoll_pwait, eventfd2, and timerfd_create / timerfd_settime / timerfd_gettime required by libwayland-server's wl_event_loop.
  4. Userspace Threads (clone CLONE_THREAD) & futex:
    • Support thread-group sharing (CLONE_VM | CLONE_THREAD | CLONE_FILES | CLONE_SIGHAND | CLONE_SETTLS, set_tid_address, exit vs exit_group) and sys_futex (FUTEX_WAIT / FUTEX_WAKE) for libinput / pixman / pthread consumers.
  5. Userspace Wayland Bring-Up & Verification:
    • Cross-compile libwayland (and libffi / expat / pixman / minimal compositor + weston-simple-shm or custom wl_shm test client) for aarch64-linux-musl.
    • Boot QEMU and verify a Wayland client connects to the compositor over /tmp/wayland-0, shares a wl_shm buffer via SCM_RIGHTS, renders frames to /dev/fb0, and receives keyboard/pointer events from /dev/input/event*.

Out of Scope (Follow-Up)

  • Full Linux DRM/KMS (/dev/dri/card0), virtio-gpu 3D/virgl, Mesa/OpenGL, and udev/AF_NETLINK (KOBJECT_UEVENT) required for unmodified desktop compositors like sway or weston DRM backend.

Acceptance Criteria

  • SCM_RIGHTS FD passing, memfd_create / tmpfs MAP_SHARED, epoll + eventfd + timerfd, and clone(CLONE_THREAD) + futex are implemented with host ASan/UBSan and QEMU shell tests.
  • A Wayland compositor + wl_shm client run in QEMU on milo, rendering visible output on /dev/fb0 and handling /dev/input/event* input.
  • make format && make clean-tests && make -j"$(nproc)" all && make -j"$(nproc)" quality passes with zero warnings.

Activity

  1. added
    enhancement
    on Dec 3, 2026
  2. self-assigned this
    on Dec 3, 2026
  3. moved this from Todo to Backlog in kernelite/miloon Dec 3, 2026
  4. moved this from Backlog to Todo in kernelite/miloon Dec 4, 2026
  5. moved this from Todo to In progress in kernelite/miloon Dec 4, 2026
  6. added a commit that references this issue on Dec 4, 2026
    0392c8f
  7. moved this from In progress to In review in kernelite/miloon Dec 4, 2026
  8. moved this from In review to Done in kernelite/miloon Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions