Skip to content

Commit 58261a6

Browse files
committedAug 24, 2015
Further improvements to README.md and flash-hdmi2usb.sh script
1 parent 9a8203a commit 58261a6

File tree

2 files changed

+34
-16
lines changed

2 files changed

+34
-16
lines changed
 

‎scripts/README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ Instructions:
7878
```
7979
make connect-lm32
8080
```
81-
Set a mode/capture - press 'h' and read instructions.
82-
TODO: Expand on this
81+
Set a mode/capture - type 'help' and read instructions.
82+
You likely need to enable a video mode, framebuffer & encoder.
83+
'status' helps to see what the firmware is doing.
8384

84-
9. Once everything has been built, get HDMI2USB running again after a power cycle by running this script (does non-build steps above):
85+
---
86+
87+
Once everything has been built, get HDMI2USB running again after a power cycle by running this script, possibly multiple times if errors first attempt (does non-build steps above):
8588
```
8689
~/HDMI2USB-misoc-firmware/scripts/flash-hdmi2usb.sh
8790
```
@@ -90,7 +93,7 @@ Instructions:
9093

9194
[1] If you are in a VM, during flashing the device will change USB UUID's up to 3 times. You can just run the command above again until you see "Programming successful!" (you may need to choose the new USB vendor/device ID in your hypervisor to pass through).
9295

93-
[2] Note firmware is only temporarily flashed to the device and is lost if HDMI2USB is power cycled, so has to be reflashed. You can use the 'go-hdmi2usb.sh' script metioned in step 9.
96+
[2] Note firmware is only temporarily flashed to the device and is lost if HDMI2USB is power cycled, so has to be reflashed. You can use the 'flash-hdmi2usb.sh' script metioned in step 9.
9497

9598
---
9699

‎scripts/flash-hdmi2usb.sh

+27-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,39 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

3-
set -x
43
set -e
54

6-
if [ ! -e ~/HDMI2USB-misoc-firmware/build ]; then
5+
SETUP_SRC=$(realpath ${BASH_SOURCE[@]})
6+
SETUP_DIR=$(dirname $SETUP_SRC)
7+
TOP_DIR=$(realpath $SETUP_DIR/..)
8+
BUILD_DIR=$TOP_DIR/build
9+
10+
if [ ! -e $BUILD_DIR ]; then
711
echo "You need to build the firmware first. Please see README.md"
812
exit 1
913
fi
1014

11-
cd ~/HDMI2USB-misoc-firmware
15+
source $TOP_DIR/scripts/setup-env.sh
16+
17+
(
18+
cd $TOP_DIR
19+
echo ""
20+
echo "IF THIS FAILS:"
21+
echo " * Run script again (can take 2-3 flash attempts)"
22+
echo " * Ensure USB plugged into PROG port for programming"
23+
echo " * Ensure USB also plugged into UART port for HDMI2USB capture"
24+
echo " * If using a VM, ensure devices are passed through (will change during flash)"
25+
echo " * Has HDMI2USB already been flashed since last power cycle?"
Has a conversation. Original line has a conversation.
26+
echo ""
27+
sleep 2
1228

13-
source ~/HDMI2USB-misoc-firmware/scripts/setup-env.sh
29+
echo "Attempting to load gateware.."
1430

15-
echo "Attempting to load gateware; will attempt 3 times, errors are normal"
31+
PROG=fpgalink make load-gateware; sleep 2
1632

17-
for loop in 1 2 3
18-
do
19-
PROG=fpgalink make load-gateware; sleep 2
20-
done
33+
echo "Attempting to load firmware..."
34+
make load-fx2-firmware; sleep 1
2135

22-
make load-fx2-firmware; sleep 1
23-
make connect-lm32
36+
echo "Connecting to firmware. Type 'help' for commands..."
37+
make connect-lm32
38+
)
2439

0 commit comments

Comments
 (0)
Please sign in to comment.