From 2224bc0655707e23d7f5203ebcd00cb5484bf42c Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Mon, 21 Apr 2025 19:12:00 +0200 Subject: [PATCH] Move bootstrap into the base repo --- recipes/core/base-initfs/recipe.toml | 18 ++++++++++++++++++ recipes/core/bootstrap/recipe.toml | 24 ------------------------ recipes/core/initfs/recipe.toml | 1 - 3 files changed, 18 insertions(+), 25 deletions(-) delete mode 100644 recipes/core/bootstrap/recipe.toml diff --git a/recipes/core/base-initfs/recipe.toml b/recipes/core/base-initfs/recipe.toml index efbd082e..1da38231 100644 --- a/recipes/core/base-initfs/recipe.toml +++ b/recipes/core/base-initfs/recipe.toml @@ -18,4 +18,22 @@ done #ln -sv zerod "${COOKBOOK_STAGE}/usr/bin/nulld" cp "${COOKBOOK_STAGE}/usr/bin/zerod" "${COOKBOOK_STAGE}/usr/bin/nulld" + +ARCH="$(echo "${GNU_TARGET}" | cut -d - -f1)" +cargo \ + -Zbuild-std=core,alloc,compiler_builtins \ + -Zbuild-std-features=compiler-builtins-mem rustc \ + --target "${TARGET}" \ + --manifest-path "${COOKBOOK_SOURCE}/bootstrap/Cargo.toml" \ + --release \ + --target-dir "${COOKBOOK_BUILD}" \ + -- \ + --emit link="${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a" +mkdir -v "${COOKBOOK_STAGE}/boot" +"${GNU_TARGET}-ld" \ + -o "${COOKBOOK_STAGE}/boot/bootstrap" \ + --gc-sections \ + -T "${COOKBOOK_SOURCE}/bootstrap/src/${ARCH}.ld" \ + -z max-page-size=4096 \ + "${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a" """ diff --git a/recipes/core/bootstrap/recipe.toml b/recipes/core/bootstrap/recipe.toml deleted file mode 100644 index 5512bb2f..00000000 --- a/recipes/core/bootstrap/recipe.toml +++ /dev/null @@ -1,24 +0,0 @@ -[source] -git = "https://gitlab.redox-os.org/redox-os/bootstrap.git" - -[build] -template = "custom" -script = """ -ARCH="$(echo "${GNU_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" -"${GNU_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" -""" diff --git a/recipes/core/initfs/recipe.toml b/recipes/core/initfs/recipe.toml index ad1f1659..b1ccbde6 100644 --- a/recipes/core/initfs/recipe.toml +++ b/recipes/core/initfs/recipe.toml @@ -5,7 +5,6 @@ git = "https://gitlab.redox-os.org/redox-os/redox-initfs.git" template = "custom" dependencies = [ "base-initfs", - "bootstrap", "drivers-initfs", "redoxfs", ]