Add flash script (WIP)

This commit is contained in:
Jeremy Soller
2019-06-26 15:39:14 -06:00
parent a6c208da7f
commit a9f485db5f
2 changed files with 21 additions and 1 deletions

20
scripts/flash.sh Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e
if [ -z "$1" ]
then
echo "$0 [model]" >&2
exit 1
fi
MODEL="$1"
if [ ! -d "models/$1" ]
then
echo "model '$1' not found" >&2
exit 1
fi
MODEL_DIR="$(realpath "models/${MODEL}")"
cargo build --release --manifest-path libs/intel-spi/Cargo.toml
sudo libs/intel-spi/target/release/intel-spi "build/${MODEL}/coreboot.rom"