site  contact  subhomenews

Xlibre server and drivers compiled in EasyOS

June 05, 2026 — BarryK

Easy version 7.3.8, the latest release, is built with Xlibre Devuan .deb packages, from here:

https://github.com/xlibre-debian/devuan/

...a couple of problems with that; firstly, the xf86-video-amdgpu driver requires some packages from 'excalibur-backports' repository, secondly, not all of the video drivers have been compiled.

So, decided to compile it all myself. This was a good starting point:

https://github.com/X11Libre/xserver/wiki/Building-XLibre

However, I got a bit messed up with how they have done it. Instead, decided that it is better to compile in the normal way that source packages expect, with, most importantly, "--prefix=/usr --sysconfdir=/etc/X11 --localstatedir=/var". Installation can be to wherever required, by "DESTDIR=..." prefix in autotools make, or "--prefixdir ..." for meson.

I will split up these blog posts, firstly explaining about compiling the Xlibre server. This is script '1xserver':

#!/bin/sh
#ref: https://github.com/X11Libre/xserver/wiki/Building-XLibre

-d build ] && rm -rf build
mkdir build
-d image ] && rm -rf image
mkdir -p image/usr

export XLIBRE_SRC="$(pwd)"
export XLIBRE_BUILD="${XLIBRE_SRC}/build"
export XLIBRE_PREFIX="${XLIBRE_SRC}/image"

-d xserver ] && rm -rf xserver
git clone https://github.com/X11Libre/xserver.git "${XLIBRE_SRC}/xserver" --depth=1

echo -n "ENTER: "read keepgoing

cd xserver
#installs into usr/lib/xorg/modules/xlibre-25, remove 'xlibre-25':
sed -i "s%^module_abi_tag =.*%module_abi_tag = ''%" meson.build

#modules install path is wrong for debian and devuan...
sed -i 's%^input_drivers_dir=.*%input_drivers_dir=@moduledir@/input%' xlibre-server.pc.in #was: input_drivers_dir=@moduledir@/drivers/input
sed -i 's%^video_drivers_dir=.*%video_drivers_dir=@moduledir@/drivers%' xlibre-server.pc.in #was: video_drivers_dir=@moduledir@/drivers/video
sed -i 's%^input_drivers_dir=.*%input_drivers_dir=@moduledir@/input%' xorg-server.pc.in
sed -i 's%^video_drivers_dir=.*%video_drivers_dir=@moduledir@/drivers%' xorg-server.pc.in

# -Dsha1=libnettle instead of -Dsha1=libcrypto (openssl) (debian has nettle, oe has openssl)
# debian: libunwind=true xselinux=true
#-Dlibdir=lib prevents install into usr/lib/x86_64-linux-gnu
meson setup --prefix /usr "$XLIBRE_BUILD" --buildtype release --localstatedir /var --sysconfdir /etc/X11 -Dxnest=true -Ddtrace=false -Dint10=x86emu -Dxkb_output_dir=/var/lib/xkb -Dudev=true -Ddga=true -Ddri1=true -Ddri2=true -Ddri3=true -Dglx=true -Dglamor=true -Dlibunwind=true -Dsystemd_logind=false -Dxinerama=true -Dxvfb=false -Dxephyr=true -Dsha1=libnettle -Dxorg=true -Dxwin=false -Dxquartz=false -Dgbm=true -Dglx_dri=true -Dglx=true -Dxdmcp=true -Dpciaccess=true -Dudev=true -Dudev_kms=true -Dsystemd_notify=false -Dscreensaver=true -Dxres=true -Dxselinux=false -Dxv=true -Dxvmc=true -Dmitshm=true -Ddrm=true -Dseatd_libseat=false -Dlibdir=lib

echo -n "ENTER: "read keepgoing

ninja -C "$XLIBRE_BUILD"

echo -n "ENTER: "read keepgoing

#use meson, not ninja, as meson allows --destdir
meson install -C "$XLIBRE_BUILD" --destdir "${XLIBRE_PREFIX}"

#no, avoid trouble with .h files, copy to /usr/include...
##hack .h path for compiling drivers...
#sed -i "s%includedir=.*%includedir=${XLIBRE_PREFIX}/usr/include%" ${XLIBRE_PREFIX}/usr/lib/pkgconfig/xlibre-server.pc
cp -a -f --remove-destination ${XLIBRE_PREFIX}/usr/include/xorg/* /usr/include/xorg/
#also a hack, probably not necessary (running in devx container with xephyr so this ok)
cp -a -f --remove-destination ${XLIBRE_PREFIX}/usr/lib/xorg/modules/*.so /usr/lib/xorg/modules/
cp -a -f --remove-destination ${XLIBRE_PREFIX}/usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/
sync

Compiling in EasyOS is very simple, just click on the "devx" desktop icon, and you are flipped into a full desktop in a container, with all required "-dev" Devuan/Debian Excalibur/Trixie packages automatically installed. Well almost, there were some missing, but that will be fixed in the next release of Easy, so all that you will need is to download the '1xserver' and others that I will post for compiling the drivers, and just run them -- they should be in a partition with ext4 filesystem -- don't do it within the "/" folder hierarchy as EasyOS is running in RAM and there is limited RAM space.

So, download to a ext4 partition, open a terminal, and run the script "# ./1xserver", and you will find the result installed to folder "image".

There are four scripts, and they will be in woofQ2, the EasyOS build system. However, have uploaded '1xserver', with a false ".gz" appended, here. It may change, the latest will be found in woofQ2.

I was a little bit concerned that when compiling the drivers, that they see the correct .h header files, so copied them to /usr/include/xorg as you can see near the end of the script.

Note that installation is to image/usr/lib/xorg/modules/xlibre-25; however, I don't want that, want a result that will completely replace the current Xorg installation, so want the exact same paths. So I emptied the "module_abi_tag" variable in 'meson.build'. See also the video and input drivers paths had to be fixed for Debian. Also see "-Dlibdir=lib" to prevent installation into usr/lib/x86_64-linux-gnu

Meson has been configured with lots of options, that are defaults anyway, but I put them in explicitly in case a missing library won't just silently fall back to disabled. Notice "-Dxselinux=false" as I don't use selinux in EasyOS.

Enough explanation I think. The next post will explain '2input', compiling the input drivers.   

Tags: easy