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.
for; do
done
# musl (Debian's musl-tools). Rustbelt 0.19.0 loads static-PIE, so "pie"
# is plain `musl-gcc -static-pie` with no tricks; "exec" is the old
# ET_EXEC-at-the-user-base recipe (kept as a fixture for the loader).
MUSL_LIB=/usr/lib/x86_64-linux-musl
for; do
p= kind=
common=(-O2 -Wall -Wextra -pthread -Wl,--build-id=none)
case in
pie) ;;
dyn) ;;
exec) ;;
*) ; ;;
esac
done
|