fix(build): kernel fetch should use host target

This commit is contained in:
Alex Zenla 2024-05-16 13:06:40 +00:00
parent 023063327f
commit b6e139919c
No known key found for this signature in database
GPG Key ID: 067B238899B51269

View File

@ -6,6 +6,7 @@ cd "$(dirname "${REAL_SCRIPT}")/../.."
KRATA_DIR="${PWD}"
cd "${KRATA_DIR}"
HOST_RUST_TARGET="$(TARGET_ARCH="" TARGET_LIBC="" ./hack/build/target.sh)"
TARGET_ARCH="$(./hack/build/arch.sh)"
if [ "${1}" != "-u" ] && [ -f "target/kernel/kernel-${TARGET_ARCH}" ]
@ -14,4 +15,5 @@ then
fi
export TARGET_ARCH
exec ./hack/build/cargo.sh run -q --bin build-fetch-kernel ghcr.io/edera-dev/kernels:latest
TARGET_ARCH="" TARGET_LIBC="" RUST_TARGET="${HOST_RUST_TARGET}" ./hack/build/cargo.sh build -q --bin build-fetch-kernel
exec "target/${HOST_RUST_TARGET}/debug/build-fetch-kernel" "ghcr.io/edera-dev/kernels:latest"