From 2054be0ce1d9e563115cb50982c71f75cdace7cf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 7 Oct 2018 16:47:05 +1100 Subject: [PATCH] waf: omit bootloader for px4-v2 build This saves 8k of flash, and allows the plane stable release for older Pixhawk1 boards to build --- Tools/ardupilotwaf/px4.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Tools/ardupilotwaf/px4.py b/Tools/ardupilotwaf/px4.py index 5125114d9d..2b7199eaf5 100644 --- a/Tools/ardupilotwaf/px4.py +++ b/Tools/ardupilotwaf/px4.py @@ -211,13 +211,18 @@ def _px4_taskgen(bld, **kw): @feature('_px4_romfs') def _process_romfs(self): bld = self.bld + + board_name = bld.env.get_flat('PX4_BOARD_NAME') + file_list = [ 'init.d/rc.APM', 'init.d/rc.error', (bld.env.PX4_RC_S_SCRIPT, 'init.d/rcS'), - 'tones/startup', - (bld.env.PX4_BOOTLOADER, 'bootloader/fmu_bl.bin'), + 'tones/startup' ] + if board_name != "px4fmu-v2": + # we omit the bootloader on px4-v2 to save flash space + file_list.append((bld.env.PX4_BOOTLOADER, 'bootloader/fmu_bl.bin')) if bld.env.PX4_BOARD_RC: board_rc = 'init.d/rc.%s' % bld.env.get_flat('PX4_BOARD_NAME')