build(px4io): build IO firmware from source, drop committed binaries

Boards with a px4io took the IO firmware from a binary committed under
boards/<vendor>/io-v2/extras/. It had to be regenerated by hand with
"make px4io_update" whenever px4iofirmware, lib/rc, the IO board or
NuttX changed, and a CI job failed until it was.

Build it from source instead. A target with CONFIG_BOARD_IO set now
builds that IO target as part of its own build and puts the result in
its ROMFS. NuttX builds inside its source tree, so the IO build gets its
own copy of the NuttX sources in build/px4io/<BOARD_IO>/, shared by
every target built in the checkout. The IO build runs on every build of
the embedding target, so an IO source change reaches the ROMFS without
a clean.

PX4_NUTTX_TREE_DIR points a NuttX build at such a copy, and the
hardcoded platforms/nuttx/NuttX/{nuttx,apps} paths now go through
NUTTX_DIR and NUTTX_APPS_DIR.

Remove the two committed binaries, the px4io_update and check_px4io
make targets, and the CI job that compared them.

Assisted-by: Claude:claude-fable-5-2
This commit is contained in:
Ramon Roche committed 2026-11-23 14:49:27 -08:00
1 parent 53baa28a50
commit 170dfbbfe8
13 files changed
+217 -71

No files matched your search

+5 -1
View File
@@ -40,6 +40,10 @@ METADATA = ('parameters.xml', 'parameters.json', 'parameters.json.xz',
'actuators.json', 'actuators.json.xz')
EVENTS = 'all_events.json.xz'
GENERAL_SOURCE = 'px4_sitl_default'
# build/px4io holds the px4io firmware that targets with an IO build for their
# own ROMFS (platforms/nuttx/cmake/px4io_firmware_build.cmake). The published
# IO image comes from the *_io-v*_default targets.
NOT_TARGETS = ('px4io',)
def target_labels(boards=BOARDS):
@@ -142,7 +146,7 @@ def package(build=BUILD, artifacts=ARTIFACTS, labels=None, unpublished=None):
artifacts.mkdir(exist_ok=True)
for build_dir in sorted(build.iterdir()):
if not build_dir.is_dir() or build_dir.name.startswith('.'):
if not build_dir.is_dir() or build_dir.name.startswith('.') or build_dir.name in NOT_TARGETS:
continue
reason = unpublished_reason(build_dir.name, labels, unpublished)
if reason:
+2
View File
@@ -55,6 +55,8 @@ class PackageTest(unittest.TestCase):
self.add_target('modalai_voxl2-io_default', mavlink=False)
self.add_target('px4_sitl_default')
(self.build / 'px4_sitl_default' / 'boardconfig').unlink()
# build/px4io is the px4io firmware built for other targets, not a target
self.add_target('px4io')
def with_metadata(target):
return {f'{target}.px4', f'{target}.elf', f'{target}/{target}.sbom.spdx.json',