# Foundry OS build settings. The Makefile includes this file; you can also # override any value on the command line: `make KERNEL_DIR=~/rk test`. # ---- The kernel we build against ------------------------------------------ # Foundry OS runs on the Rustbelt kernel. We never build "whatever is checked # out": we export one exact commit (KERNEL_REV) from the kernel's git store # into out/kernel-src and build it there, with its own target dir. Bump # KERNEL_REV deliberately (and re-run `make test`) when the kernel moves on. KERNEL_DIR ?= /workspace/rust-kernel KERNEL_REV ?= a55b41d KERNEL_VERSION ?= 0.19.0 # ---- The image ------------------------------------------------------------- ARCH ?= x86_64 # Boot contract version (docs/boot-contract.md). v1 = today's layout: # GPT + one FAT32 partition, programs in /bin, kernel runs /mnt/disk0/bin/sh. CONTRACT ?= v1 IMAGE_NAME ?= foundry.img IMAGE_MIB ?= 64 # FAT volume label. Kept as the kernel's TYLERDISK under contract v1 so the # image is the same as the kernel's own disk.img. IMAGE_LABEL ?= TYLERDISK # ---- Programs in /bin ------------------------------------------------------ # Built from this repo (rust/): RUST_PROGRAMS := sh ls cat wc grep mkdir rm touch cp sleep \ ifconfig ping host fetch httpd getty tile random sysinfo # ABI test fixtures that stay in the kernel repo (proposal section 7). For # contract v1 the image still carries them (the self-test runs them), so # they are compiled from the pinned kernel source in out/kernel-src/user. FIXTURE_RUST := hello evil spin demo child overflow forktest cowtest \ mmaptest sigtest threads echoserver ptytest nbtest \ fputest pathtest libctest coretest unixtest FIXTURE_C := rawabi # name:kind, kind = pie (musl-gcc -static-pie), exec (static ET_EXEC at the # user base) or dyn (dynamic; Rustbelt must refuse it). FIXTURE_MUSL := vdsotest:exec piehello:pie piethreads:pie dynhello:dyn remaptest:pie # The order programs are copied into /bin: the same order as the kernel's # build.rs (PROGRAMS, then C_PROGRAMS, then MUSL_PROGRAMS), so `ls` lists # them the same way. BIN_ORDER := sh ls cat wc grep mkdir rm touch cp sleep \ hello evil spin demo child sysinfo overflow \ ifconfig ping host fetch httpd random getty tile \ forktest cowtest mmaptest sigtest threads echoserver ptytest nbtest \ fputest pathtest libctest coretest unixtest \ rawabi vdsotest piehello piethreads dynhello remaptest # ---- Toolchain pins (downloaded into cache/, checked by SHA256) ----------- MUSL_VERSION ?= 1.2.5