hypha: build init with musl, trace logging, and now map console optionally

This commit is contained in:
Alex Zenla
2024-02-01 11:50:33 +00:00
parent c17aacb6c8
commit 7eda5ea185
4 changed files with 34 additions and 34 deletions

View File

@ -1,12 +1,14 @@
#!/usr/bin/env bash
set -e
TARGET="x86_64-unknown-linux-musl"
export RUSTFLAGS="-Ctarget-feature=+crt-static"
cd "$(dirname "${0}")/.."
HYPHA_DIR="${PWD}"
cargo build --bin hyphactr --release --target x86_64-unknown-linux-gnu
cargo build --bin hyphactr --release --target "${TARGET}"
INITRD_DIR="$(mktemp -d /tmp/hypha-initrd.XXXXXXXXXXXXX)"
cp "target/x86_64-unknown-linux-gnu/release/hyphactr" "${INITRD_DIR}/init"
cp "target/${TARGET}/release/hyphactr" "${INITRD_DIR}/init"
chmod +x "${INITRD_DIR}/init"
cd "${INITRD_DIR}"
mkdir -p "${HYPHA_DIR}/target/initrd"