Skip to content

Commit

Permalink
Further improvements to README.md and flash-hdmi2usb.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
xfxf committed Aug 24, 2015
1 parent 9a8203a commit 58261a6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
11 changes: 7 additions & 4 deletions scripts/README.md
Expand Up @@ -78,10 +78,13 @@ Instructions:
```
make connect-lm32
```
Set a mode/capture - press 'h' and read instructions.
TODO: Expand on this
Set a mode/capture - type 'help' and read instructions.
You likely need to enable a video mode, framebuffer & encoder.
'status' helps to see what the firmware is doing.

9. Once everything has been built, get HDMI2USB running again after a power cycle by running this script (does non-build steps above):
---

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):
```
~/HDMI2USB-misoc-firmware/scripts/flash-hdmi2usb.sh
```
Expand All @@ -90,7 +93,7 @@ Instructions:

[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).

[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.
[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.

---

Expand Down
39 changes: 27 additions & 12 deletions scripts/flash-hdmi2usb.sh
@@ -1,24 +1,39 @@
#!/bin/sh
#!/bin/bash

set -x
set -e

if [ ! -e ~/HDMI2USB-misoc-firmware/build ]; then
SETUP_SRC=$(realpath ${BASH_SOURCE[@]})
SETUP_DIR=$(dirname $SETUP_SRC)
TOP_DIR=$(realpath $SETUP_DIR/..)
BUILD_DIR=$TOP_DIR/build

if [ ! -e $BUILD_DIR ]; then
echo "You need to build the firmware first. Please see README.md"
exit 1
fi

cd ~/HDMI2USB-misoc-firmware
source $TOP_DIR/scripts/setup-env.sh

(
cd $TOP_DIR
echo ""
echo "IF THIS FAILS:"
echo " * Run script again (can take 2-3 flash attempts)"
echo " * Ensure USB plugged into PROG port for programming"
echo " * Ensure USB also plugged into UART port for HDMI2USB capture"
echo " * If using a VM, ensure devices are passed through (will change during flash)"
echo " * Has HDMI2USB already been flashed since last power cycle?"

This comment has been minimized.

Copy link
@mithro

mithro Aug 25, 2015

Member

We should be able to detect all these problems.

echo ""
sleep 2

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

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

for loop in 1 2 3
do
PROG=fpgalink make load-gateware; sleep 2
done
echo "Attempting to load firmware..."
make load-fx2-firmware; sleep 1

make load-fx2-firmware; sleep 1
make connect-lm32
echo "Connecting to firmware. Type 'help' for commands..."
make connect-lm32
)

0 comments on commit 58261a6

Please sign in to comment.