mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: 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. BUG=None BRANCH=None TEST=None Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/16918 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net> Change-Id: Ib8bf85a3299dd75b779e7fa3757f5b62c9c7170b Reviewed-on: https://chromium-review.googlesource.com/396227 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
44d7b9655d
commit
e9b60dca84
1 changed files with 4 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue