-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement CI for hifive unmatched (#456)
- Loading branch information
Showing
12 changed files
with
160 additions
and
31 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
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 |
---|---|---|
|
@@ -22,4 +22,3 @@ ifeq ($(EXTEND),1) | |
endif | ||
|
||
endif | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Verifying archive integrity... MD5 checksums are OK. All good. | ||
Uncompressing Keystone Enclave Package | ||
testing test-stack | ||
testing test-loop | ||
testing test-malloc | ||
testing test-long-nop | ||
testing test-fibonacci | ||
testing test-fib-bench | ||
testing test-attestation | ||
Attestation report SIGNATURE is valid | ||
testing test-untrusted | ||
Enclave said: hello world! | ||
Enclave said: 2nd hello world! | ||
Enclave said value: 13 | ||
Enclave said value: 20 | ||
testing test-data-sealing | ||
Enclave said: Sealing key derivation successful! |
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,43 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Source global test configuration file | ||
. scripts/ci/test-setup.sh | ||
|
||
OS_FILENAME="build-hifive_unmatched64/buildroot.build/images/sdcard.img" | ||
get_platform_var HOST_IP | ||
get_platform_var BOARD_IP | ||
|
||
########### | ||
## Flash ## | ||
########### | ||
set -x | ||
|
||
TTYDEV=$(find_tty 1) | ||
touch "$LOGFILE" | ||
start_record_tty "$TTYDEV" 115200 "$LOGFILE" hfu-tty | ||
|
||
power_on_btn | ||
wait_for "Hit any key to stop autoboot" | ||
echo 'a' > "$TTYDEV" | ||
|
||
rm -rf "$TFTP_DIR/sdcard.img" | ||
cp "$OS_FILENAME" "$TFTP_DIR/sdcard.img" | ||
|
||
# Configure TFTP | ||
echo "setenv serverip $HOST_IP" > "$TTYDEV" ; sleep 1 | ||
echo "setenv ipaddr $BOARD_IP" > "$TTYDEV" ; sleep 1 | ||
|
||
echo "tftp sdcard.img" > "$TTYDEV" | ||
wait_for "=>" | ||
echo "mmc write 80210000 0 100000" > "$TTYDEV" | ||
wait_for "=>" | ||
|
||
stop_record_tty hfu-tty | ||
power_off_btn | ||
|
||
# For some reason, the UART for this board does not like | ||
# being closed and then opened again quickly. This leads to | ||
# test failures later on, so we delay a bit extra. | ||
sleep 5 | ||
exit 0 |
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,43 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Source global test configuration file | ||
. scripts/ci/test-setup.sh | ||
|
||
if [[ -z "$CMD_LOGFILE" ]]; then | ||
echo "CMD_LOGFILE undefined" | ||
exit 1 | ||
fi | ||
|
||
get_platform_var BOARD_IP | ||
|
||
############### | ||
## Run tests ## | ||
############### | ||
set -x | ||
|
||
# Fix permissions on the key | ||
chmod 600 "build-hifive_unmatched64/buildroot.build/target/root/.ssh/id-rsa" | ||
|
||
# Start the board | ||
export KEYSTONE_PLATFORM="hifive_unmatched" | ||
export KEYSTONE_IP="$BOARD_IP" | ||
|
||
TTYDEV=$(find_tty 1) | ||
start_record_tty "$TTYDEV" 115200 "$LOGFILE" hfu-tty | ||
power_on_btn | ||
|
||
# TODO: check for connectivity instead of sleeping | ||
sleep 60 | ||
|
||
export CALL_LOGFILE="$CMD_LOGFILE" | ||
touch "$CALL_LOGFILE" | ||
|
||
KEYSTONE_COMMAND="modprobe keystone-driver" make call | ||
KEYSTONE_COMMAND="/usr/share/keystone/examples/tests.ke" make call | ||
# TODO: attestation does not yet work in unmatched | ||
#KEYSTONE_COMMAND="/usr/share/keystone/examples/attestor.ke" make call | ||
|
||
power_off_btn | ||
stop_record_tty hfu-tty | ||
exit 0 |
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