- Shell 86.8%
- C 11%
- Python 2.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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> |
||
| guest | ||
| kernel | ||
| patches | ||
| scripts | ||
| sources | ||
| .gitattributes | ||
| .gitignore | ||
| build-arm-virtio.sh | ||
| build-host-tools.sh | ||
| build-initrd.sh | ||
| build-toolchain.sh | ||
| build-virtio.sh | ||
| build.sh | ||
| cross-glibc.ini.in | ||
| external.defaults | ||
| gen_initrd.py | ||
| guest.defaults | ||
| README.md | ||
| reos-mt.c | ||
| run | ||
| start-buildroot-initramfs.sh | ||
| test_compiler.cpp | ||
| testvec.c | ||
| triplets_list.txt | ||
| unpack-gcc.sh | ||
| version-check.sh | ||
| vulkan_diag.c | ||
| vulkan_probe.c | ||
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/rootfsINITRD_IMG—out/initrd/initrd.imgVIRGL_PREFIX—out/virgl-installKERNEL_BZIMAGE—vendor/linux/arch/x86/boot/bzImageMESA_SRC—vendor/mesaSERIAL_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).