Skip to content

Commit

Permalink
Fix buildroot when launched from install script
Browse files Browse the repository at this point in the history
  • Loading branch information
jordancarlin committed Jan 13, 2025
1 parent 528ecfb commit 7af4f82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bin/wally-tool-chain-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ fi

# Determine script directory to locate related scripts
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WALLY=$(dirname "$dir")
export WALLY

# Get Linux distro and version
source "${dir}"/wally-distro-check.sh
Expand Down
5 changes: 4 additions & 1 deletion linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OBJDUMPS := $(foreach name, $(OBJDUMPS), $(DIS)/$(name).objdump)

all: check_environment check_write_permissions clean download Image disassemble install dumptvs

check_environment: $(RISCV)
check_environment: $(RISCV) $(WALLY)
ifeq ($(findstring :$(RISCV)/lib:,:$(LD_LIBRARY_PATH):),)
@(echo "ERROR: Your environment variables are not set correctly." >&2 \
&& echo "Make sure to source setup.sh or install buildroot using the wally-tool-chain-install.sh script." >&2 \
Expand Down Expand Up @@ -66,6 +66,9 @@ $(RISCV):
@ echo "ERROR: No $(RISCV) directory. Make sure you have installed the Wally Toolchain."
@ echo "and sourced setup.sh"

$(WALLY):
@ echo "ERROR: $$WALLY is not set. Make sure you have sourced setup.sh"

# Disassembly rules ---------------------------------------------------
disassemble: check_environment
rm -rf $(BUILDROOT)/output/images/disassembly
Expand Down

0 comments on commit 7af4f82

Please sign in to comment.