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:
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -4,3 +4,9 @@
|
|||||||
[submodule "lib/KSDK_2.0_MK22FN512xxx12"]
|
[submodule "lib/KSDK_2.0_MK22FN512xxx12"]
|
||||||
path = lib/KSDK_2.0_MK22FN512xxx12
|
path = lib/KSDK_2.0_MK22FN512xxx12
|
||||||
url = https://github.com/UltimateHackingKeyboard/KSDK_2.0_MK22FN512xxx12.git
|
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
1
lib/agent
Submodule
Submodule lib/agent added at cae0d02dd2
1
lib/bootloader
Submodule
1
lib/bootloader
Submodule
Submodule lib/bootloader added at 74a37a8d9e
@@ -1,7 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/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
|
set -x # echo on
|
||||||
|
|
||||||
jump-to-bootloader.js &&
|
if [ ! -f $usb_binding ]; then
|
||||||
blhost --usb 0x15a2,0x0073 flash-erase-all 0 &&
|
cd $usb_dir
|
||||||
blhost --usb 0x15a2,0x0073 flash-image $1 &&
|
npm install
|
||||||
blhost --usb 0x15a2,0x0073 reset
|
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