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

6
.gitmodules vendored
View File

@@ -4,3 +4,9 @@
[submodule "lib/KSDK_2.0_MK22FN512xxx12"]
path = lib/KSDK_2.0_MK22FN512xxx12
url = https://github.com/UltimateHackingKeyboard/KSDK_2.0_MK22FN512xxx12.git
[submodule "lib/bootloader"]
path = lib/bootloader
url = https://github.com/UltimateHackingKeyboard/bootloader.git
[submodule "lib/agent"]
path = lib/agent
url = https://github.com/UltimateHackingKeyboard/agent.git

1
lib/agent Submodule

Submodule lib/agent added at cae0d02dd2

1
lib/bootloader Submodule

Submodule lib/bootloader added at 74a37a8d9e

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