Skip to content

Commit

Permalink
Convert to keyboard-driven Xilinx chip flasher
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick committed Jul 14, 2016
1 parent 755bab7 commit f84b669
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 87 deletions.
7 changes: 4 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

set -o errexit
set -o xtrace

Expand Down Expand Up @@ -31,8 +33,7 @@ mkdir Guzunty
sudo make install
)

# update tingbot-python to get backlight support
sudo pip install tingbot-python==0.5.0
sudo cp tingbot-flasher.service /lib/systemd/system
sudo systemctl enable tingbot-flasher.service

sudo raspi-config --expand-rootfs
sudo shutdown -r now
13 changes: 0 additions & 13 deletions install2.sh

This file was deleted.

5 changes: 0 additions & 5 deletions restart

This file was deleted.

24 changes: 0 additions & 24 deletions startup

This file was deleted.

69 changes: 69 additions & 0 deletions tbflash
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
42 changes: 0 additions & 42 deletions test_routine.tingapp/main.py

This file was deleted.

15 changes: 15 additions & 0 deletions tingbot-flasher.service
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

0 comments on commit f84b669

Please sign in to comment.