-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to keyboard-driven Xilinx chip flasher
- Loading branch information
Showing
7 changed files
with
88 additions
and
87 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 was deleted.
Oops, something went wrong.
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,69 @@ | ||
#!/bin/bash | ||
|
||
cd "$(dirname "$(realpath "$0")")" | ||
|
||
while true; do | ||
clear | ||
echo "" | ||
echo "" | ||
echo "" | ||
echo " _ _ _ _ " | ||
echo " | | (_) | | | | " | ||
echo " | |_ _ _ __ __ _| |__ ___ | |_ " | ||
echo " | __| | '_ \ / _ | '_ \ / _ \| __| " | ||
echo " | |_| | | | | (_| | |_) | (_) | |_ " | ||
echo " \__|_|_| |_|\__, |_.__/ \___/ \__| " | ||
echo " __/ | " | ||
echo " |___/ " | ||
echo "" | ||
echo "" | ||
echo " Tingbot's Xilinx chip flashing program" | ||
echo "" | ||
echo " Version 1.0" | ||
echo "" | ||
echo " Press return to start flashing a Xilinx chip." | ||
echo "" | ||
echo "" | ||
echo "" | ||
echo "" | ||
|
||
read -s | ||
|
||
sudo gz_load /home/pi/Guzunty/Pi/src/gz_lcd/gz_lcd.xsvf | ||
|
||
return_code=$? | ||
|
||
if [[ $return_code -ne 0 ]]; then | ||
echo "" | ||
echo "" | ||
echo "" | ||
echo "" | ||
echo " XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX" | ||
echo "" | ||
echo " Failed to flash Xilinx chip." | ||
echo "" | ||
echo " XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX" | ||
echo "" | ||
echo " Please check the chip is correctly connected and try again." | ||
echo "" | ||
echo " Press return to continue." | ||
echo "" | ||
echo "" | ||
echo "" | ||
else | ||
echo "" | ||
echo "" | ||
echo "" | ||
echo "" | ||
echo " Success!" | ||
echo "" | ||
echo " Press return to continue." | ||
echo "" | ||
echo "" | ||
echo "" | ||
fi | ||
|
||
read -s | ||
done; | ||
|
||
sudo shutdown -r now |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
[Unit] | ||
Description=Tingbot flasher | ||
After=getty.target | ||
Conflicts=getty@tty1.service | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/bin/tbflash | ||
StandardInput=tty-force | ||
StandardOutput=inherit | ||
StandardError=inherit | ||
|
||
[Install] | ||
WantedBy=graphical.target |