diff --git a/recipes/kernel/recipe.toml b/recipes/kernel/recipe.toml index 3cdd91c15f3864177c7f2b6ed765525d944429d7..69794d4d7b500a3b9c4526a5ba1ae9cdf670ba29 100644 --- a/recipes/kernel/recipe.toml +++ b/recipes/kernel/recipe.toml @@ -7,20 +7,15 @@ script = """ export RUST_TARGET_PATH="${COOKBOOK_SOURCE}/targets" ARCH="$(echo "${TARGET}" | cut -d - -f1)" cargo rustc \ - --lib \ + --bin kernel \ --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \ --target "${COOKBOOK_SOURCE}/targets/${ARCH}-unknown-kernel.json" \ --release \ -Z build-std=core,alloc \ -- \ -C soft-float \ - --emit link="${PWD}/libkernel.a" -"${TARGET}-ld" \ - --gc-sections \ - -z max-page-size=0x1000 \ - -T "${COOKBOOK_SOURCE}/linkers/${ARCH}.ld" \ - -o kernel.all \ - libkernel.a + -C link-arg=-T -Clink-arg="${COOKBOOK_SOURCE}/linkers/${ARCH}.ld" \ + --emit link="${PWD}/kernel.all" "${TARGET}-objcopy" \ --only-keep-debug \ kernel.all \