Commit 7b914863 authored by Nicolas "Norswap" Laurent's avatar Nicolas "Norswap" Laurent Committed by norswap

separate out the build commands in a specific makefile

parent d362e29f
build: unicorn minigeth_mips minigeth_default_arch mipsevm contracts
yarn
unicorn:
./build_unicorn.sh
minigeth_mips:
(cd mipigo && ./build.sh)
minigeth_default_arch:
(cd minigeth && go build)
mipsevm:
(cd mipsevm && go build)
contracts:
yarn
npx hardhat compile
clean:
rm minigeth/go-ethereum
rm mipigo/minigeth
rm mipigo/minigeth.bin
rm mipsevm/mipsevm
rm -rf artifacts
mrproper: clean
rm -rf cache
rm -rf node_modules
rm -rf mipigo/venv
.PHONY: build unicorn minigeth_mips minigeth_default_arch mipsevm contracts \
clean mrproper
......@@ -26,27 +26,24 @@ mipsevm -- A MIPS runtime in the EVM (works with contracts)
contracts -- A Merkleized MIPS processor on chain + the challenge logic
```
## Usage
The following commands should be run from the root directory unless otherwise specified:
## Building
```
./build_unicorn.sh
make build
```
# build minigeth for MIPS
(cd mipigo && ./build.sh)
## Usage
# build minigeth for PC
(cd minigeth/ && go build)
The following commands should be run from the root directory unless otherwise specified:
```
# compute the transition from 13284469 -> 13284470 on PC
TRANSITION_BLOCK=13284469
mkdir -p /tmp/cannon
minigeth/go-ethereum $TRANSITION_BLOCK
# write out the golden MIPS minigeth start state
yarn
(cd mipsevm && ./evm.sh)
mipsevm/mipsevm
# if you run into "digital envelope routines::unsupported", rerun after this:
# export NODE_OPTIONS=--openssl-legacy-provider
......
......@@ -3,10 +3,9 @@ cd ../minigeth
export GOOS=linux
export GOARCH=mips
export GOMIPS=softfloat
go build
cd ../mipigo
go build -o ../mipigo/minigeth
cp ../minigeth/go-ethereum minigeth
cd ../mipigo
file minigeth
if [[ ! -d venv ]]; then
......
#!/bin/bash -e
(cd ../ && npx hardhat compile > /dev/null)
go build && (cd .. && ./mipsevm/mipsevm $@)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment