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>
This commit is contained in:
Ronald G. Minnich 2016-10-07 06:57:03 -07:00
parent 0910f4e76f
commit aa9df0f0de
1 changed files with 4 additions and 2 deletions

View File

@ -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"