mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 04:03:35 +08:00
feat(tools): ship metadata, IO and BL files on SD card
This pushes the metadata files as well as the IO firmware and the bootloader binary to the SD card. That way, the files are don't have to be added to the firmware binary or served via s3 for FLASH_CONSTRAINED targets. The files are pushed after upload and verified in commander as part of the preflight checks. If missing, a warning is displayed and arming is prevented. This means that an SD card can't be swapped out without reflashing (or copying over the contents).
This commit is contained in:
@@ -35,6 +35,10 @@ parser.add_argument('--rc-dir', type=str, action='store',
|
||||
help='ROMFS output directory', default=None)
|
||||
parser.add_argument('--params-file', type=str, action='store',
|
||||
help='Parameter output file', default=None)
|
||||
parser.add_argument('--iofw-path', type=str, action='store',
|
||||
help='IO firmware binary path', default=None)
|
||||
parser.add_argument('--bootloader-path', type=str, action='store',
|
||||
help='Bootloader binary path', default=None)
|
||||
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
|
||||
help='Verbose Output')
|
||||
|
||||
@@ -56,6 +60,6 @@ if rc_filepaths_output_dir is not None:
|
||||
if verbose: print("Generating {:}".format(rc_filepath_output_file))
|
||||
template = jinja_env.get_template(rc_filepaths_template)
|
||||
with open(rc_filepath_output_file, 'w') as fid:
|
||||
fid.write(template.render(constrained_flash=constrained_flash, params_file=args.params_file))
|
||||
fid.write(template.render(constrained_flash=constrained_flash, params_file=args.params_file, iofw_path=args.iofw_path, bootloader_path=args.bootloader_path))
|
||||
else:
|
||||
raise Exception("--rc-dir needs to be specified")
|
||||
|
||||
@@ -4,3 +4,6 @@
|
||||
|
||||
|
||||
set PARAM_FILE {{ params_file }}
|
||||
{% if iofw_path %}
|
||||
set IOFW "{{ iofw_path }}"
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user