Building

This guide provides instructions for building skiftOS from source.

Prerequisites

  • Linux or macOS
  • Clang (16 or later)
  • Python (3.11.5 or later)
  • Tools: llvm, clang, ninja, nasm, qemu
  • Installation: Use your system's package manager (e.g., apt on Ubuntu) to install these dependencies.

Instructions

  1. Prerequisites:

    Verify that you have the required dependencies installed.

    Ubuntu
    apt update
    
    apt install build-essential git ninja-build libsdl2-dev nasm gcc-multilib qemu-system-x86 mtools liburing-dev
    
    bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" llvm 17
    
    Arch Linux
    pacman -Syu git clang llvm nasm qemu-full gptfdisk mtools liburing sdl2
    
  2. Clone the Repository:

    git clone https://github.com/skift-org/skift.git
    
    cd skift
    
  3. Check Build Status (Optional):

    Look at the build status badge for any potential issues:

    Build

  4. Set Up Build Environment:

    ./skift.sh tools setup
    

    🛈 Note
    On Ubuntu, this step also installs dependencies.

  5. Verify Setup:

    ./skift.sh tools doctor
    
  6. Download Dependencies:

    ./skift.sh model install
    
  7. Build and Run:

    • In Virtual Machine:

      ./skift.sh image start
      

      🛈 Note
      Requires a graphical environment and QEMU with graphics support (SDL or GTK). For headless servers, build a disk image instead: ./skift.sh image build --format=hdd

    • In simulator:

      ./skift.sh builder run --mixins=release hideo-shell
      

      🛈 Note
      The --mixins=release flag is optional and can be omitted for a debug build.

    Enjoy! You now have a working installation of skiftOS.

    Need Help? Join the Discord server for assistance in the #build-issues channel.