fix(build): kernel fetch should use host target (#159)

This commit is contained in:
Alex Zenla 2024-05-16 11:13:04 -07:00 committed by GitHub
parent 023063327f
commit 94790ce7dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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"