Tools: embed default.param files for Linux boards

This commit is contained in:
Willian Galvani 2022-01-24 23:00:06 -03:00 committed by Peter Barker
parent 42d1fd984c
commit 2b9d56c252
1 changed files with 9 additions and 0 deletions

View File

@ -1000,6 +1000,15 @@ class linux(Board):
if cfg.options.apstatedir:
cfg.define('AP_STATEDIR', cfg.options.apstatedir)
defaults_file = 'libraries/AP_HAL_Linux/boards/%s/defaults.parm' % self.get_name()
if os.path.exists(defaults_file):
env.ROMFS_FILES += [('defaults.parm', defaults_file)]
env.DEFINES.update(
HAL_PARAM_DEFAULTS_PATH='"@ROMFS/defaults.parm"',
)
if len(env.ROMFS_FILES) > 0:
env.CXXFLAGS += ['-DHAL_HAVE_AP_ROMFS_EMBEDDED_H']
def build(self, bld):
super(linux, self).build(bld)
if bld.options.upload: