AP_HAL_ChibiOS: allow embedded bootloader to be excluded

Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
This commit is contained in:
bugobliterator 2021-06-09 14:16:39 +05:30 committed by Peter Barker
parent f3c96b438b
commit 7e8f11b749
1 changed files with 5 additions and 1 deletions

View File

@ -1686,8 +1686,12 @@ def bootloader_path():
def add_bootloader():
'''added bootloader to ROMFS'''
bp = bootloader_path()
if bp is not None:
if bp is not None and int(get_config('BOOTLOADER_EMBED', required=False, default='1')):
romfs["bootloader.bin"] = bp
env_vars['BOOTLOADER_EMBED'] = 1
else:
env_vars['BOOTLOADER_EMBED'] = 0
def write_ROMFS(outdir):