mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-30 16:56:12 +08:00
The ROMFS / ROMFS_WILDCARD / ROMFS_DIRECTORY hwdef keywords were
previously only understood by the ChibiOS hwdef parser, which has
duplicated implementations of romfs_add / romfs_wildcard / romfs_add_dir
and a write_ROMFS step that publishes env_vars['ROMFS_FILES']. Lift
all of that into the base HWDef class so any HAL with a hwdef parser
(SITL, future HALs) gets ROMFS handling for free.
- Base hwdef.py owns self.romfs, the romfs_*() methods, the
ROMFS / ROMFS_WILDCARD / ROMFS_DIRECTORY process_line cases,
the undef ROMFS handler, and write_ROMFS(); base run() calls
write_ROMFS() at the end so subclasses that don't override run()
publish ROMFS automatically.
- ChibiOS keeps a thin romfs_add_dir() override solely for its
bootloader-build no-op guard; everything else is inherited.
No behaviour change for ChibiOS boards.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>