RISCV: change make-spike-elf to use the coreboot toolchain.
Change-Id: I81ced8c6e02b00a3835e3b42c9cf2669b1b2bd3e Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> [jn: Added XGCC_BIN variable to avoid requiring the tools in $PATH] Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/16955 Tested-by: build bot (Jenkins)
This commit is contained in:
parent
2f72a618f1
commit
3401f5a20c
|
@ -21,9 +21,10 @@ FLAT_FILE="$1"
|
||||||
OBJECT_FILE=$(mktemp /tmp/coreboot-spike.XXXXXX.o)
|
OBJECT_FILE=$(mktemp /tmp/coreboot-spike.XXXXXX.o)
|
||||||
ELF_FILE="$2"
|
ELF_FILE="$2"
|
||||||
TOOL_PATH="$(dirname "$0")"
|
TOOL_PATH="$(dirname "$0")"
|
||||||
|
XGCC_BIN="$TOOL_PATH/../crossgcc/xgcc/bin"
|
||||||
|
|
||||||
riscv64-unknown-linux-gnu-objcopy -I binary -O elf64-littleriscv \
|
"$XGCC_BIN/riscv64-elf-objcopy" -I binary -O elf64-littleriscv \
|
||||||
-B riscv "$FLAT_FILE" "$OBJECT_FILE"
|
-B riscv "$FLAT_FILE" "$OBJECT_FILE"
|
||||||
riscv64-unknown-linux-gnu-ld "$OBJECT_FILE" -T "$TOOL_PATH/spike-elf.ld" \
|
"$XGCC_BIN/riscv64-elf-ld" "$OBJECT_FILE" -T "$TOOL_PATH/spike-elf.ld" \
|
||||||
-o "$ELF_FILE"
|
-o "$ELF_FILE"
|
||||||
rm "$OBJECT_FILE"
|
rm "$OBJECT_FILE"
|
||||||
|
|
Loading…
Reference in New Issue