Skip to content

Commit

Permalink
Improve README and build server scripts.
Browse files Browse the repository at this point in the history
* Use the Theseus base directory for the evolutionary build server instead of a user's host machine home directory

* Update outdated dependencies in the `diff_crates` tool
  • Loading branch information
kevinaboos committed Sep 4, 2020
1 parent 655d29e commit efc6117
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ build/
# patched GDB directory
/rust-os-gdb/

# Theseus's local build server
.theseus_build_server/

# IDE files
*.idea/
*.vscode/
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ Currently, we support building and running Theseus on the following host OSes:

If you're on WSL, also do the following:
* Install an X Server for Windows; we suggest using [Xming](https://sourceforge.net/projects/xming/).
* Set an X display by running `export DISPLAY=:0`.
You'll need to do this each time you open up a new WSL terminal, so it's best to add it to your `.bashrc` file. You can do that with:
`echo "export DISPLAY=:0" >> ~/.bashrc`.
* Setup an X display as follows:
* on WSL (version 1), run:
`export DISPLAY=:0`.
* on WSL2, run:
`export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0`.

You'll need to do this each time you open up a new WSL terminal, so it's best to add it to the end of your `.bashrc` file.
* If you get this error:
`Could not initialize SDL(No available video device) - exiting`
then make sure that your X Server is running before running `make run`, and that you have set the `DISPLAY` environment variable above.
`Could not initialize SDL(No available video device) - exiting`
then make sure that your X Server is running and that you have set the `DISPLAY` environment variable above.
* Install a C compiler and linker toolchain, such as `gcc`.
* **NOTE**: WSL and WSL2 do not currently support using KVM.

### MacOS
* Install [MacPorts](https://www.macports.org/install.php) and [HomeBrew](https://brew.sh/).
Expand Down
5 changes: 3 additions & 2 deletions scripts/build_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ set -e

### the directory containing this script
SCRIPTS_DIR="$(dirname "$(readlink -f "$0")")"
TOOLS_DIR=$SCRIPTS_DIR/../tools
THESEUS_BASE_DIR=$SCRIPTS_DIR/..
TOOLS_DIR=$THESEUS_BASE_DIR/tools

### This script requires rhash and python
if ! command -v rhash > /dev/null ; then
Expand All @@ -27,7 +28,7 @@ NEW_MODULES_DIR=$(readlink -m $NEW_MODULES_DIR)

### optional argument: directory that is being exposed as the root of the HTTP web server
if [ -z $HTTP_ROOT ] ; then
HTTP_ROOT=$HOME/.theseus_build_server
HTTP_ROOT=$THESEUS_BASE_DIR/.theseus_build_server
echo "No HTTP_ROOT directory given, using the default directory \"$HTTP_ROOT\""
fi
HTTP_ROOT=$(readlink -m $HTTP_ROOT)
Expand Down
8 changes: 4 additions & 4 deletions tools/diff_crates/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions tools/diff_crates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ description = "A tool for differencing crates' object files across builds of The
authors = ["Kevin Boos <[email protected]>"]


[patch.crates-io]
### use our own no_std-compatible qp trie
qp-trie = { git = "https://github.com/messense/qp-trie-rs", branch = "fix-compilation" }


[dependencies]
getopts = "0.2"
walkdir = "2.2.7"
Expand Down

0 comments on commit efc6117

Please sign in to comment.