Skip to content

Commit

Permalink
can't remove file if it doesnt exist
Browse files Browse the repository at this point in the history
  • Loading branch information
grg-haas committed Jun 17, 2024
1 parent 73fbac4 commit 1a0fc1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/ci/plat/cva6/flash-firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dd if="$FIRMWARE_FILENAME" of="$TTYDEV" bs=1 status=progress
./scripts/ci/utils/wait_for.py "$LOGFILE" "Hit any key to stop autoboot"
echo 'a' > "$TTYDEV"

rm "$TFTP_DIR/fw_payload.bin"
rm -f "$TFTP_DIR/fw_payload.bin"
cp "$FIRMWARE_FILENAME" "$TFTP_DIR/fw_payload.bin"
echo "setenv serverip $HOST_IP" > "$TTYDEV"
echo "setenv ipaddr $BOARD_IP" > "$TTYDEV"
Expand Down
5 changes: 4 additions & 1 deletion scripts/ci/utils/wait_for.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
exit(0)

n = os.read(file.fileno(), 1)
if n is not None and len(n) > 0:
if n is None:
exit(1)

if len(n) > 0:
print(n.decode('utf-8'), end='')
if n[0] == pattern[index]:
index += 1
Expand Down

0 comments on commit 1a0fc1a

Please sign in to comment.