Include the agent and bootloader repos and reference them from blhost-unix.sh to make the firmware update script work out of the box.

This commit is contained in:
László Monda
2017-03-07 00:55:43 +01:00
parent 4676b85a19
commit c7aab821e9
4 changed files with 24 additions and 4 deletions

View File

@@ -1,7 +1,19 @@
#!/bin/sh
set -e # fail the script if a command fails
firmware_image=`pwd`/$1
usb_dir=../../../lib/agent/usb
usb_binding=$usb_dir/node_modules/usb/build/Release/usb_bindings.node
blhost=../../../lib/bootloader/bin/Tools/blhost/linux/amd64/blhost
set -x # echo on
jump-to-bootloader.js &&
blhost --usb 0x15a2,0x0073 flash-erase-all 0 &&
blhost --usb 0x15a2,0x0073 flash-image $1 &&
blhost --usb 0x15a2,0x0073 reset
if [ ! -f $usb_binding ]; then
cd $usb_dir
npm install
fi
$usb_dir/jump-to-bootloader.js
$blhost --usb 0x15a2,0x0073 flash-erase-all 0
$blhost --usb 0x15a2,0x0073 flash-image $firmware_image
$blhost --usb 0x15a2,0x0073 reset