Openblt scripts (#3801)

* Add sh script to flash OpenBLT over DFU

* Add sample script to update RusEFI over can using OpenBLT
This commit is contained in:
Andrey G 2022-01-18 00:56:06 +03:00 committed by GitHub
parent 9a2c9d7d67
commit d246b688d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 0 deletions

20
firmware/flash_can.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# This script will try to flash/update RusEFI part of firmware over can0 interface.
#
# You may want to bring can0 interface up first:
# sudo ip link set can0 type can bitrate 500000 ; sudo ifconfig can0 up
# Sometimes (after communication errors) you may like to restart interface with:
# sudo ifconfig can0 down; sudo ip link set can0 type can bitrate 500000 ; sudo ifconfig can0 up
echo This script assumes that you are using can0 interface and it is ready, otherwise read comments inside
echo This script assumes that you have BootCommander somewhere in your PATH, otherwise read comments inside
BootCommander -t=xcp_can -d=can0 deliver/rusefi_update.srec
# OR
# You can build it from sources with:
# (cd ext/openblt/Host/Source/LibOpenBLT/ ; mkdir build ; cd build ; cmake .. ; make -j )
# and
# (cd ext/openblt/Host/Source/BootCommander/ ; mkdir build ; cd build ; cmake .. ; make -j )
# And run:
# ext/openblt/Host/BootCommander -t=xcp_can -d=can0 deliver/rusefi_update.srec

View File

@ -0,0 +1,7 @@
#!/bin/bash
# This script will flash OpenBLT bootloader only.
# User should prefer to flash composite image,
# see flash_dfu.sh/flash_dfu.bat
dfu-util --alt 0 --download deliver/openblt.dfu --reset