Skip to content

Commit

Permalink
improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lgaeher committed Jan 29, 2024
1 parent 142f669 commit ba81580
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
27 changes: 22 additions & 5 deletions macos.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@

# Instructions for getting the build running on MacOS
# Instructions for getting the build of the security monitor running on MacOS

1. Install the Risc-V toolchain.

2. environment variables
TODO see diff
1. Install basic dependencies.
```
brew install coreutils # to have nproc available
brew install autoconf automake curl python libmpc mpfr gmp gawk flex texinfo libtool bc expat # for OpenSBI build
```

3.
2. Install the Risc-V toolchain.
```
# https://github.com/riscv-software-src/homebrew-riscv
brew tap riscv-software-src/riscv
brew install riscv-gnu-toolchain
```

3. Source environment variables.
```
source macos_env
```

4. Build the security monitor:
```
make security_monitor
```
2 changes: 0 additions & 2 deletions macos_env
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ export RISCV_GNU_TOOLCHAIN_WORK_DIR=/opt/homebrew/Cellar/riscv-gnu-toolchain/mai

export PATH=$RISCV_GNU_TOOLCHAIN_WORK_DIR/bin:$PATH
export CROSS_COMPILE=riscv64-unknown-elf-
alias nproc="sysctl -n hw.logicalcpu"

2 changes: 1 addition & 1 deletion security-monitor/rust-crates/opensbi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cd ${OPENSBI_SOURCE_DIR}/
git reset --hard
find $PATCH_DIR -type f -name '*.patch' -print0 | xargs -0 git apply

make CROSS_COMPILE=${CROSS_COMPILE} O=${WORK_DIR} PLATFORM=generic -j$(sysctl -n hw.logicalcpu)
make CROSS_COMPILE=${CROSS_COMPILE} O=${WORK_DIR} PLATFORM=generic -j$(nproc)
make CROSS_COMPILE=${CROSS_COMPILE} I=${WORK_DIR} PLATFORM=generic install

echo "done"
Expand Down

0 comments on commit ba81580

Please sign in to comment.