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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user