summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2016-10-07 06:57:03 -0700
committerRonald G. Minnich <rminnich@gmail.com>2016-10-08 16:03:22 +0200
commitaa9df0f0dec62794dbea1d97852fc0d32a81ca14 (patch)
tree6c02ef80f01dcfebe416ee0a9a4e3545fa712da0 /util
parent0910f4e76f05798e1a5d96cb4e7f202b290fb62e (diff)
downloadcoreboot-aa9df0f0dec62794dbea1d97852fc0d32a81ca14.tar.xz
RISCV: have the make-spike-elf.sh script use the riscv tools
We do this so that the riscv objdump can be used on the coreboot.elf file. Change-Id: Ib8bf85a3299dd75b779e7fa3757f5b62c9c7170b Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/16918 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Diffstat (limited to 'util')
-rwxr-xr-xutil/riscvtools/make-spike-elf.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/riscvtools/make-spike-elf.sh b/util/riscvtools/make-spike-elf.sh
index 4241c5418a..20ae23c5a3 100755
--- a/util/riscvtools/make-spike-elf.sh
+++ b/util/riscvtools/make-spike-elf.sh
@@ -22,6 +22,8 @@ OBJECT_FILE=$(mktemp /tmp/coreboot-spike.XXXXXX.o)
ELF_FILE="$2"
TOOL_PATH="$(dirname "$0")"
-objcopy -I binary -O elf32-i386 --binary-architecture i386 "$FLAT_FILE" "$OBJECT_FILE"
-ld -m elf_i386 "$OBJECT_FILE" -T "$TOOL_PATH/spike-elf.ld" -o "$ELF_FILE"
+riscv64-unknown-linux-gnu-objcopy -I binary -O elf64-littleriscv \
+ -B riscv "$FLAT_FILE" "$OBJECT_FILE"
+riscv64-unknown-linux-gnu-ld "$OBJECT_FILE" -T "$TOOL_PATH/spike-elf.ld" \
+ -o "$ELF_FILE"
rm "$OBJECT_FILE"