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 | #!/usr/bin/env bash
# Build the kernel's ABI test programs ("fixtures") from the pinned kernel
# source (out/kernel-src/user, exported by build-kernel.sh), with exactly the
# commands the kernel's build.rs uses. Under boot contract v1 the image
# carries them in /bin because the self-test runs them; they are *not* part
# of Foundry OS and their source stays in the kernel repo.
#
# Usage: scripts/build-fixtures.sh KERNEL_SRC OUT_DIR "rust names" "c names" "musl name:kind ..."
SRC=/user OUT=
RUST= C= MUSL=
RUSTC=
# Use the kernel's toolchain (rust-toolchain.toml in KERNEL_SRC): run from there.
for; do
done
# No libc at all: raw Linux syscalls, an ordinary static ET_EXEC at the
# usual 0x400000 (user space since Rustbelt 0.20.0).
for; do
done
# musl (Debian's musl-tools), always the stock recipes: "pie" is
# `musl-gcc -static-pie`, "exec" is plain `musl-gcc -static` (an ET_EXEC at
# 0x400000; Rustbelt runs that since 0.20.0), "dyn" must be refused.
# Entries are name:kind[:source] (source file in user/, default = name).
for; do
IFS=:
src=/.c
common=(-O2 -Wall -Wextra -pthread -Wl,--build-id=none)
case in
pie) ;;
dyn) ;;
exec) ;;
*) ; ;;
esac
done
|