Attempt 1 #1

Open
seeseemelk wants to merge 8 commits from attempt-1 into master
2 changed files with 67 additions and 0 deletions
Showing only changes of commit bbd7d3725b - Show all commits

43
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,43 @@
# 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

View File

@@ -0,0 +1,24 @@
{
"name": "ClaudeOS Dev",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cmake-tools",
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack"
],
"settings": {
"cmake.generator": "Ninja",
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/cmake/toolchain-i386-clang.cmake"
}
}
}
},
"postCreateCommand": "echo 'ClaudeOS devcontainer ready!'",
"remoteUser": "root"
}