Building#

How to compile Vitruvian from source on a Debian-based system.

Prerequisites#

Required software:

  • cmake ≥ 3.25
  • gcc ≥ 8
  • libinput ≥ 1.16.4-3
  • ninja

Install all build dependencies:

sudo apt install -y \
  autoconf \
  automake \
  bison \
  build-essential \
  cmake \
  debhelper \
  debootstrap \
  dh-dkms \
  dkms \
  elfutils \
  flex \
  generate-ninja \
  git \
  grub-common \
  grub-efi-amd64-bin \
  grub-pc-bin \
  libbfd-dev \
  libdrm-dev \
  libdw-dev \
  libdwarf-dev \
  libelf-dev \
  libfl-dev \
  libfreetype6-dev \
  libgif-dev \
  libicns-dev \
  libicu-dev \
  libinput-dev \
  libjpeg-dev \
  libncurses-dev \
  libopenexr-dev \
  libpng-dev \
  libtiff-dev \
  libudev-dev \
  libwebp-dev \
  linux-headers-$(uname -r) \
  mtools \
  ninja-build \
  xorriso \
  zlib1g-dev \
  squashfs-tools \
  --fix-missing

Getting the Source#

git clone https://github.com/VitruvianOS/Vitruvian.git

Building VitruvianOS#

git submodule update --init --recursive
mkdir buildtools/ && mkdir generated.x86/
cd buildtools/
cmake -DBUILDTOOLS_MODE=1 .. -GNinja
ninja
cd ../generated.x86 && ../build/scripts/setupenv.sh
../configure --chroot-build
ninja

setupenv.sh uses debootstrap to bootstrap a minimal Debian Trixie (amd64) environment under generated.x86/image_tree/chroot, installs all required -dev packages inside it, and writes imagekernelversion.conf with the chroot kernel version. The compiler and build tools are always taken from the host.

If you only need to build and run Vitruvian locally without producing an image, you can skip setupenv.sh and run ../configure without --chroot-build, building directly against the host libraries instead.

configure options#

The configure script accepts the following options:

OptionDefaultDescription
--build-type=TYPEDebugCMake build type: Debug, Release, or Workflow
--arch=ARCHx86_64Target architecture (see Architectures)
--chroot-buildoffBuild against the chroot sysroot instead of host libraries
--chroot-path=PATH<build>/image_tree/chrootOverride the chroot path (requires --chroot-build)

Example — release build with chroot:

../configure --build-type=Release --chroot-build

Architectures#

ArchitectureStatus
x86_64Supported (default)
arm64Not yet supported

x86_64 is selected by default. To make the selection explicit:

../configure --arch=x86_64

Building the .deb Package#

After a successful ninja build:

cd generated.x86 && cpack

Creating a Live ISO Image#

After building and generating the .deb packages:

chmod +x ./build/scripts/mkiso.sh
cd generated.x86 && ../build/scripts/mkiso.sh

Creating a Live Raw Image#

After building and generating the .deb packages:

chmod +x ./build/scripts/mkraw.sh
cd generated.x86 && ../build/scripts/mkraw.sh