Skip to content
Snippets Groups Projects
Commit 54613433 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Install boot files to /boot

parent 71eb6c35
No related branches found
No related tags found
No related merge requests found
...@@ -6,12 +6,14 @@ template = "custom" ...@@ -6,12 +6,14 @@ template = "custom"
script = """ script = """
rsync -av --delete "${COOKBOOK_SOURCE}/" ./ rsync -av --delete "${COOKBOOK_SOURCE}/" ./
mkdir -v "${COOKBOOK_STAGE}/boot"
function bootloader { function bootloader {
export TARGET="$1" export TARGET="$1"
src="$2" src="$2"
dst="$3" dst="$3"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" "build/${TARGET}/${src}" "${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" "build/${TARGET}/${src}"
cp -v "build/${TARGET}/${src}" "${COOKBOOK_STAGE}/${dst}" cp -v "build/${TARGET}/${src}" "${COOKBOOK_STAGE}/boot/${dst}"
} }
ARCH="$(echo "${TARGET}" | cut -d - -f1)" ARCH="$(echo "${TARGET}" | cut -d - -f1)"
......
...@@ -26,8 +26,9 @@ cargo \ ...@@ -26,8 +26,9 @@ cargo \
--target-dir "${COOKBOOK_BUILD}" \ --target-dir "${COOKBOOK_BUILD}" \
-- \ -- \
--emit link="${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a" --emit link="${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a"
mkdir -v "${COOKBOOK_STAGE}/boot"
"${TARGET}-ld" \ "${TARGET}-ld" \
-o "${COOKBOOK_STAGE}/bootstrap" \ -o "${COOKBOOK_STAGE}/boot/bootstrap" \
--gc-sections \ --gc-sections \
-T "${COOKBOOK_SOURCE}/src/${ARCH}.ld" \ -T "${COOKBOOK_SOURCE}/src/${ARCH}.ld" \
"${COOKBOOK_BUILD}/asm.o" \ "${COOKBOOK_BUILD}/asm.o" \
......
...@@ -29,5 +29,6 @@ done ...@@ -29,5 +29,6 @@ done
env -u CARGO cargo run --manifest-path "${COOKBOOK_SOURCE}/tools/Cargo.toml" --bin redox-initfs-ar -- "${COOKBOOK_BUILD}/initfs" -o "${COOKBOOK_BUILD}/initfs.img" env -u CARGO cargo run --manifest-path "${COOKBOOK_SOURCE}/tools/Cargo.toml" --bin redox-initfs-ar -- "${COOKBOOK_BUILD}/initfs" -o "${COOKBOOK_BUILD}/initfs.img"
cp "${COOKBOOK_BUILD}/initfs.img" "${COOKBOOK_STAGE}/initfs" mkdir -v "${COOKBOOK_STAGE}/boot"
cp "${COOKBOOK_BUILD}/initfs.img" "${COOKBOOK_STAGE}/boot/initfs"
""" """
...@@ -31,5 +31,6 @@ cargo rustc \ ...@@ -31,5 +31,6 @@ cargo rustc \
--strip-debug \ --strip-debug \
kernel.all \ kernel.all \
kernel kernel
cp -v kernel "${COOKBOOK_STAGE}" mkdir -v "${COOKBOOK_STAGE}/boot"
cp -v kernel "${COOKBOOK_STAGE}/boot"
""" """
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment