foundry
Foundry OS: the operating system built on the Rustbelt kernel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | # Foundry OS -- the single entry point. `make help` lists the targets.
#
# Everything generated goes to out/ (git-ignored); `make clean` removes it.
# Downloads (musl source etc.) go to cache/ (git-ignored, SHA256-checked).
include config.mk
OUT := $(CURDIR)/out
IMAGE := $(OUT)/$(IMAGE_NAME)
STAGING := $(OUT)/staging
RUST_OUT := $(OUT)/rust-target/x86_64-unknown-none/release
FIXTURES := $(OUT)/fixtures
KSRC := $(OUT)/kernel-src
KTARGET := $(OUT)/kernel-target
KBOOT := $(OUT)/kernel/bootimage.bin
KBOOT_HL := $(OUT)/kernel/bootimage-headless.bin
SYSROOT := $(OUT)/sysroot
FCC := $(CURDIR)/toolchain/foundry-cc
C_OUT := $(OUT)/c
# Everything in /bin, in order: the kernel's list, then Foundry OS's own.
ALL_BIN := $(BIN_ORDER) $(FOUNDRY_C) $(FOUNDRY_PORTS)
PORTS_OUT := $(OUT)/ports
.DEFAULT_GOAL := image
:
:
# ---- the pinned kernel -------------------------------------------------------
:
:
# ---- programs ---------------------------------------------------------------
:
: # Our own C programs: gcc + our musl, static-PIE (docs/porting.md).
: # Ports: each one is fetched into cache/ (SHA256-checked) and built once;
# delete out/ports/bin/NAME to rebuild it.
:
: # ---- the image ---------------------------------------------------------------
# Contract v1: rootfs/ minus etc/ (etc/ is for the contract-v2 ext2 root,
# see docs/plan.md) goes to the top of the FAT32 volume, programs to /bin.
: : # ---- booting ----------------------------------------------------------------
: # What the expected-line checks need to know about the pinned kernel.
TEST_ENV := KERNEL_BANNER="$(KERNEL_BANNER)" KERNEL_VERSION=$(KERNEL_VERSION)
: # The baseline: the kernel's own disk.img through the very same checks
# (without Foundry OS's own programs and expected lines, which it lacks).
: : # ---- toolchain ---------------------------------------------------------------
# musl is built once; delete out/sysroot (or run `make musl`) to rebuild it.
:
: :
: |