mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
fmu-v2: add bootloader binary and SYS_BL_UPDATE param for BL updates
This allows a simple-to-use bootloader update mechanism to switch from fmu-v2 to fmu-v3 target that has more flash.
This commit is contained in:
@@ -211,6 +211,27 @@ else
|
||||
param reset
|
||||
fi
|
||||
|
||||
#
|
||||
# Bootloader upgrade
|
||||
#
|
||||
if ver hwcmp PX4FMU_V2
|
||||
then
|
||||
set BL_FILE /etc/extras/px4fmuv3_bl.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
|
||||
fi
|
||||
|
||||
#
|
||||
# Start system state indicator.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user