bl_update: build and include board bootloader if config available

This commit is contained in:
Daniel Agar
2019-11-14 14:47:42 -05:00
committed by Lorenz Meier
parent 850821f47f
commit a694f0bbdd
5 changed files with 80 additions and 9 deletions

View File

@@ -7,6 +7,7 @@ px4_add_board(
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
BUILD_BOOTLOADER
IO px4_io-v2_default
TESTING
# UAVCAN_INTERFACES 2 - No H7 or FD can support in UAVCAN

View File

@@ -4,6 +4,24 @@
#------------------------------------------------------------------------------
#
# Bootloader upgrade
#
set BL_FILE /etc/extras/holybro_durandal-v1_bootloader.bin
if [ -f $BL_FILE ]
then
if param compare SYS_BL_UPDATE 1
then
param set SYS_BL_UPDATE 0
param save
echo "BL update..." >> $LOG_FILE
bl_update $BL_FILE
echo "BL update done" >> $LOG_FILE
reboot
fi
fi
unset BL_FILE
if [ $AUTOCNF = yes ]
then
# Enable IMU thermal control