From aa9df0f0dec62794dbea1d97852fc0d32a81ca14 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Fri, 7 Oct 2016 06:57:03 -0700 Subject: [PATCH] RISCV: have the make-spike-elf.sh script use the riscv tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/16918 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer --- util/riscvtools/make-spike-elf.sh | 6 ++++-- 1 file 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"