px4-firmware/platforms/nuttx/init/rc.board_bootloader_upgrade.in

18 lines
307 B
Bash

#! /bin/sh
#
# Bootloader upgrade
#
if param compare -s SYS_BL_UPDATE 1
then
if [ -f "/etc/extras/@BOARD_FIRMWARE_BIN@" ]
then
param set SYS_BL_UPDATE 0
param save
echo "bootloader update..."
bl_update "/etc/extras/@BOARD_FIRMWARE_BIN@"
echo "bootloader update done, rebooting"
reboot
fi
fi