mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 03:51:36 +08:00
bl_update: Allow booting from SD card (without forced BL copy to ROMFS)
This commit is contained in:
@@ -613,7 +613,9 @@ else
|
||||
. ${R}etc/init.d/rc.autostart.post
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Bootloader upgrade (ROMFS)
|
||||
#
|
||||
set BOARD_BOOTLOADER_UPGRADE ${R}etc/init.d/rc.board_bootloader_upgrade
|
||||
if [ -f $BOARD_BOOTLOADER_UPGRADE ]
|
||||
then
|
||||
@@ -621,6 +623,22 @@ else
|
||||
fi
|
||||
unset BOARD_BOOTLOADER_UPGRADE
|
||||
|
||||
#
|
||||
# Bootloader upgrade (SD card)
|
||||
#
|
||||
if param compare -s SYS_BL_UPDATE 2
|
||||
then
|
||||
if [ -f "/fs/microsd/bl/bl.bin" ]
|
||||
then
|
||||
param set SYS_BL_UPDATE 0
|
||||
param save
|
||||
echo "bootloader update..."
|
||||
bl_update "/fs/microsd/bl/bl.bin"
|
||||
echo "bootloader update done, rebooting"
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Check if UAVCAN is enabled, default to it for ESCs.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user