-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from obsidiansystems/eac-test-hwm-rebase
Support test HWMs
- Loading branch information
Showing
34 changed files
with
664 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,38 @@ | ||
#!/bin/sh | ||
set -eux | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
rootdir="$(cd "$(dirname "$0")"/; pwd)" | ||
root="$(git rev-parse --show-toplevel)" | ||
|
||
app_name=Tezos | ||
if [ "${1:-}X" != X ]; then | ||
app_name="$1" | ||
fi | ||
|
||
app_file=$rootdir/bin/app.hex | ||
app_dir="$root" | ||
if [ "${2:-}X" != X ]; then | ||
app_file="$2" | ||
app_dir="$2" | ||
fi | ||
|
||
if [ "${3:-}X" = X ]; then | ||
version="$(git -C "$rootdir" describe --tags | cut -f1 -d- | cut -f2 -dv)" | ||
version="$(git -C "$root" describe --tags | cut -f1 -d- | cut -f2 -dv)" | ||
else | ||
version="$3" | ||
fi | ||
|
||
|
||
set -x | ||
python -m ledgerblue.loadApp \ | ||
--appFlags 0x00 \ | ||
--dataSize 0x80 \ | ||
--dataSize "$(grep _nvram_data_size "$app_dir/debug/app.map" | tr -s ' ' | cut -f2 -d' ')" \ | ||
--tlv \ | ||
--curve ed25519 \ | ||
--curve secp256k1 \ | ||
--curve prime256r1 \ | ||
--targetId "${TARGET_ID:-0x31100004}" \ | ||
--delete \ | ||
--path 44"'"/1729"'" \ | ||
--fileName "$app_file" \ | ||
--fileName "$app_dir/bin/app.hex" \ | ||
--appName "$app_name" \ | ||
--appVersion "$version" \ | ||
--icon "$(cat "$rootdir/dist/icon.hex")" \ | ||
--icon "$(cat "$root/dist/icon.hex")" \ | ||
--targetVersion "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
commit=$(git describe --abbrev=8 --always 2>/dev/null) | ||
echo >&2 "Git commit: $commit" | ||
shell_dir="$(nix-build -A env-shell --no-out-link --argstr commit "$commit" "${NIX_BUILD_ARGS:-}")" | ||
shell="$shell_dir/bin/env-shell" | ||
|
||
if [ $# -eq 0 ]; then | ||
echo >&2 "Entering via $shell" | ||
exec "$shell" | ||
else | ||
exec "$shell" <<EOF | ||
$@ | ||
EOF | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -uo pipefail | ||
|
||
root="$(git rev-parse --show-toplevel)" | ||
|
||
fail() { unset ___empty; : "${___empty:?$1}"; } | ||
|
||
[ -z "${1:-}" ] && fail "No command given; try running $0 make" | ||
|
||
watchdirs=("$root/default.nix" "$root/nix" "$root/Makefile" "$root/src") | ||
|
||
inotifywait="$(nix-build '<nixpkgs>' -A inotify-tools --no-out-link)/bin/inotifywait" | ||
while true; do | ||
"$root/nix/env.sh" <<EOF | ||
$@ | ||
EOF | ||
if ! "$inotifywait" -qre close_write "${watchdirs[@]}"; then | ||
fail "inotifywait failed" | ||
fi | ||
echo "----------------------" | ||
echo | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.