board/spike/riscv64/start.sh: add buildroot host dir in PATH
PATCH 1/1 board/spike/riscv64/start.sh: add buildroot host dir in PATH
commit 0d0f84d2004b04bc93d5ceb58c86640f190e5d78 added the missing host-dtc dependency to riscv-isa-sim.
The spike simulator calls the dtc binary at its startup. The host dtc command needs to be in the PATH at that time.
This commit add the buildroot host binary directory into the PATH of the start.sh helper script. It make sure spike will use the buildroot dtc version. This commit fixes this start.sh script on host not providing the dtc command. Since the "spike" binary is now in the PATH, the binary name is also simplified.
--- board/spike/riscv64/start.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
board/spike/riscv64/start.sh +5 -1
@@ -3,9 +3,13 @@ SCRIPT_DIR="$(dirname "$0")" BR_BASEDIR="$(readlink -e "${SCRIPT_DIR}/../../..")" +# spike uses dtc at runtime startup, so make sure buildroot host +# directory is in the PATH +export PATH="${BR_BASEDIR}/output/host/usr/bin:$PATH" + # Use Buildroot host spike by default, but allow the caller to # redefine another spike binary -: "${SPIKE:=${BR_BASEDIR}/output/host/usr/bin/spike}" +: "${SPIKE:=spike}" exec "${SPIKE}" \ --initrd "${BR_BASEDIR}"/output/images/rootfs.cpio \
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni
AppliedQuoted 12 lines · On Wed, 12 Jan 2022 21:26:40 +0100 Julien Olivain <[email protected]> wrote:
commit
0d0f84d2004b04bc93d5ceb58c86640f190e5d78added the missing host-dtc dependency to riscv-isa-sim.The spike simulator calls the dtc binary at its startup. The host dtc command needs to be in the PATH at that time.
This commit add the buildroot host binary directory into the PATH of the
start.shhelper script. It make sure spike will use the buildroot dtc version. This commit fixes thisstart.shscript on host not providing the dtc command. Since the "spike" binary is now in the PATH, the binary name is also simplified.
Quoted 4 lines
Signed-off-by Julien Olivain <[email protected]>--- board/spike/riscv64/start.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot