PX4-Autopilot/platforms/nuttx/init/rc.board_bootloader_upgrade.in
Daniel Agar f5d9b01f5c
NuttX build in place
- cmake NuttX build wrapper compile in place instead of copying source tree to build directory
    - slightly faster skipping necessary copying (depending on system)
    - allows debugging in place
    - easier to work directly in NuttX following official documentation
    - simplifies overall build which should make it easier to resolve any remaining NuttX dependency issues in the build system
 - the downside is switching back and forth between different builds always require rebuilding NuttX, but I think this is worth the improved developer experience
 - also no longer builds px4io and bootloader in every single build, for most users these rarely change and we're wasting a lot of build time
2021-11-15 18:47:38 -05:00

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