No description
  • Shell 86.8%
  • C 11%
  • Python 2.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Denis Benato 0269c33bf2 feat(initrd): exec guest_desktop with Venus ICD and tighter smoke checks
Replace multi-binary init with guest_desktop, set VK_ICD_FILENAMES and devpts,
and assert screen grant plus GPU scanout on the serial log in smoke-launch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 02:07:16 +02:00
guest Add LFS orchestration scripts and guest cross linker wrapper. 2026-10-03 19:40:16 +02:00
kernel Fix guest kernel and toolchain builds on nvidia-path-blocked hosts. 2026-10-03 21:28:56 +02:00
patches Fix guest kernel and toolchain builds on nvidia-path-blocked hosts. 2026-10-03 21:28:56 +02:00
scripts feat(initrd): exec guest_desktop with Venus ICD and tighter smoke checks 2026-10-05 02:07:16 +02:00
sources Replace corrupt linux-6.12.1 tarball and skip nvidia paths on extract. 2026-10-03 20:07:56 +02:00
.gitattributes Replace corrupt linux-6.12.1 tarball and skip nvidia paths on extract. 2026-10-03 20:07:56 +02:00
.gitignore Ignore local configure scratch files in the repo root. 2026-10-04 14:29:29 +02:00
build-arm-virtio.sh tested working 2024-12-12 13:41:56 +01:00
build-host-tools.sh tested working 2024-12-12 13:41:56 +01:00
build-initrd.sh Wire ./run entry point and toolchain to scripted builds. 2026-10-03 19:40:20 +02:00
build-toolchain.sh tested working 2024-12-12 13:41:56 +01:00
build-virtio.sh Fix guest kernel and toolchain builds on nvidia-path-blocked hosts. 2026-10-03 21:28:56 +02:00
build.sh Fix guest kernel and toolchain builds on nvidia-path-blocked hosts. 2026-10-03 21:28:56 +02:00
cross-glibc.ini.in Generate cross-glibc.ini from LFS paths at build time. 2026-10-03 19:40:12 +02:00
external.defaults Keep glibc headers on Linux 6.12.1 tarball separate from guest kernel 7.2. 2026-10-03 19:50:23 +02:00
gen_initrd.py add zlib and mesa 2026-10-02 21:52:33 +02:00
guest.defaults Add LFS orchestration scripts and guest cross linker wrapper. 2026-10-03 19:40:16 +02:00
README.md feat(guest): build guest_desktop and generate ReOS musl Cargo config 2026-10-05 02:07:16 +02:00
reos-mt.c add zlib and mesa 2026-10-02 21:52:33 +02:00
run Fix initrd runtime so Venus ICD and ReOS graphics boot in QEMU. 2026-10-04 14:28:55 +02:00
start-buildroot-initramfs.sh Fix guest boot path so ReOS graphics stack actually starts. 2026-10-04 14:16:04 +02:00
test_compiler.cpp Improve c++ toolchain testing 2024-12-08 02:52:00 +01:00
testvec.c improve build, but still broken at audit 2024-12-10 02:11:45 +01:00
triplets_list.txt Crappy error 2024-12-07 03:49:25 +01:00
unpack-gcc.sh Improve build script 2024-12-08 17:00:20 +01:00
version-check.sh m4 non compila 2024-12-06 19:04:37 +01:00
vulkan_diag.c Add upstream-ready virglrenderer Venus fence feedback patch. 2026-10-03 19:40:20 +02:00
vulkan_probe.c Fix initrd runtime so Venus ICD and ReOS graphics boot in QEMU. 2026-10-04 14:28:55 +02:00

ReOS LFS — build the guest OS and run it in QEMU (Venus / virtio-gpu)

This repository is the single orchestration root for the ReOS demo stack. Sibling repos (../ReOS, ../stuPID1, ../atomrootfsinit) are used automatically when present; otherwise sources are fetched into work/ from GitLab archives.

Guest userspace is started by guest_desktop (QEMU-only harness, same role as demo per ReOS architecture rule 13): one shared Vulkan device, GPU compositor only, in-process service threads. Do not use separate /usr/bin/app_server etc. in init — exec /usr/bin/guest_desktop.

Quick start (after toolchain exists)

cd lfs
chmod +x run scripts/*.sh
./run fast          # virgl + guest binaries + initramfs
./run launch        # QEMU window (needs kernel bzImage — see below)

First-time toolchain + Mesa (long)

cd lfs
./run toolchain     # same as build-virtio.sh → build.sh (hours)
./run guest
./run initrd
./run virgl
./run qemu

Commands (./run)

Command Purpose
fetch Resolve/download ReOS, stuPID1, atomrootfsinit
guest cargo build → install into out/.../rootfs/usr/bin
initrd Pack cpio initramfs → out/initrd/initrd.img
virgl Host virglrenderer + Venus → out/virgl-install
qemu Download/build QEMU 11.1.2 → vendor/qemu-11.1.2-bin (sources under out/qemu-11.1.2-src)
fast virgl + guest + initrd
smoke fetch + guest + initrd (CI-style check)
launch Run QEMU with initrd

Paths (override via environment)

See scripts/env.sh. Important defaults:

  • LFS_ROOTFS — out/x86_64-lfs-linux-gnu/rootfs
  • INITRD_IMG — out/initrd/initrd.img
  • VIRGL_PREFIX — out/virgl-install
  • KERNEL_BZIMAGE — vendor/linux/arch/x86/boot/bzImage
  • MESA_SRC — vendor/mesa
  • SERIAL_LOG — out/stupid1-serial.log

Copy external.defaults → external.local to change GitLab archive URLs.

Guest Vulkan loader

guest/vulkan/loader.c is compiled into the initramfs as libvulkan.so.1 (passthrough to libvulkan_virtio.so).

virglrenderer upstream

Production fix for Venus fence feedback: patches/virglrenderer/0001-*.patch (see patches/virglrenderer/README.md). Build an MR branch with:

./scripts/prepare-virgl-upstream.sh   # -> vendor/virglrenderer-upstream-mr

Default host build applies that patch to vendor/virglrenderer-1.3.0. Set VIRGL_USE_WORKSPACE_LIBVIRGL=1 to use the debug tree under vendor/libvirgl/...8148de0.

Guest Rust cross-build uses guest/lfs-link-wrapper.sh so build scripts link with host gcc while guest binaries link against the LFS sysroot.

Some hosts cannot create paths containing nvidia/ (kernel/QEMU tar extracts skip those trees; ./run kernel applies patches/linux/ and disables forcedeth).

Launch stack: ./run virgl then ./run qemu builds QEMU with SDL + OpenGL linked against patched virglrenderer in out/virgl-install (not the distro package). ./run launch uses virtio-vga-gl,venus=on and virgl_render_server from that prefix.

Legacy scripts at repo parent

../build-guest-reos.sh, ../launch-stupid1-window.sh, etc. forward to ./run.

See ../WORKSPACE.md for what every other top-level folder/file is (and what is safe to delete).