All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] board/spike/riscv64/start.sh: add buildroot host dir in PATH
@ 2022-01-12 20:26 Julien Olivain
  2022-01-13 19:38 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Olivain @ 2022-01-12 20:26 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

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.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 board/spike/riscv64/start.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/board/spike/riscv64/start.sh b/board/spike/riscv64/start.sh
index 75b1412df8..6fbbced806 100755
--- a/board/spike/riscv64/start.sh
+++ b/board/spike/riscv64/start.sh
@@ -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 \
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] board/spike/riscv64/start.sh: add buildroot host dir in PATH
  2022-01-12 20:26 [Buildroot] [PATCH 1/1] board/spike/riscv64/start.sh: add buildroot host dir in PATH Julien Olivain
@ 2022-01-13 19:38 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2022-01-13 19:38 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

On Wed, 12 Jan 2022 21:26:40 +0100
Julien Olivain <ju.o@free.fr> wrote:

> 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.
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
>  board/spike/riscv64/start.sh | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-13 19:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 20:26 [Buildroot] [PATCH 1/1] board/spike/riscv64/start.sh: add buildroot host dir in PATH Julien Olivain
2022-01-13 19:38 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.