mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-22 14:19:57 +08:00
Boards started by MCUboot, such as the i.MX95 flash build, need the raw objcopy output wrapped in the MCUboot header and TLV trailer before it boots. Add CONFIG_BOARD_MCUBOOT_IMGTOOL_ARGS, a board option holding the imgtool sign arguments, and build <config>.signed.bin next to the plain .bin from the NuttX CMake, the way Zephyr's west sign does. The plain .bin and everything derived from it stay as they are. A signing key is passed through BOARD_MCUBOOT_KEY in the environment at configure time, so private keys stay out of the board files. imgtool comes from PyPI via Tools/setup/requirements.txt. When it is missing, CMake warns and skips the signed image instead of failing the configure. The .px4 package is only built when the board has a firmware.prototype, so a board that boots through MCUboot and has no PX4 bootloader needs no board_id. Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>