# ClaudeOS build environment # # Provides everything needed to build and test a bare-metal i386 kernel: # - Clang + LLD for cross-compilation to i386-elf # - GRUB 2 tools for generating bootable ISO and floppy images # - QEMU (i386) for running integration tests # - CMake + Ninja for the build system # - xorriso and mtools used internally by grub-mkrescue / grub-mkimage FROM debian:bookworm-slim ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ # Core build tools clang \ lld \ cmake \ ninja-build \ make \ git \ # GRUB image generation grub-pc-bin \ grub-common \ xorriso \ mtools \ # QEMU for running the OS qemu-system-x86 \ # Handy utilities file \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Verify the cross-compilation toolchain can produce an i386-elf binary. RUN echo 'void _start(void){for(;;)__asm__("hlt");}' > /tmp/test.c \ && clang -target i386-elf -m32 -march=i386 -ffreestanding -fno-stack-protector \ -nostdlib -fuse-ld=lld -Wl,-e,_start \ /tmp/test.c -o /tmp/test.elf \ && file /tmp/test.elf | grep -q "ELF 32-bit.*80386" \ && echo "Toolchain OK" \ && rm /tmp/test.c /tmp/test.elf WORKDIR /workspaces/claude-os