mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-20 20:04:19 +08:00
Without this the virtual addresses will not match the file offsets for the final initfs blob on AArch64 as there it will align to 64k by default.
25 lines
725 B
TOML
25 lines
725 B
TOML
[source]
|
|
git = "https://gitlab.redox-os.org/redox-os/bootstrap.git"
|
|
|
|
[build]
|
|
template = "custom"
|
|
script = """
|
|
ARCH="$(echo "${TARGET}" | cut -d - -f1)"
|
|
cargo \
|
|
-Zbuild-std=core,alloc,compiler_builtins \
|
|
-Zbuild-std-features=compiler-builtins-mem rustc \
|
|
--target "${TARGET}" \
|
|
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
|
--release \
|
|
--target-dir "${COOKBOOK_BUILD}" \
|
|
-- \
|
|
--emit link="${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a"
|
|
mkdir -v "${COOKBOOK_STAGE}/boot"
|
|
"${TARGET}-ld" \
|
|
-o "${COOKBOOK_STAGE}/boot/bootstrap" \
|
|
--gc-sections \
|
|
-T "${COOKBOOK_SOURCE}/src/${ARCH}.ld" \
|
|
-z max-page-size=4096 \
|
|
"${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a"
|
|
"""
|