Skip to content

Conversation

@joshanne
Copy link
Contributor

Generally improve bootloader and firmware signing process, allowing for bootloaders to be built without the ardupilot keys, specify multiple keys, fix consistency on built and signed firmware files.

@joshanne joshanne changed the title Improvements to the Bootloader and Firmware Signing Process signing: Improvements to the Bootloader and Firmware Signing Process Nov 30, 2025
@joshanne joshanne force-pushed the pr/improvements-to-bl-fw-signing branch from 4c72381 to 30cf056 Compare November 30, 2025 23:41
@joshanne
Copy link
Contributor Author

I'll have a follow up PR for these changes soon too.

@tridge
Copy link
Contributor

tridge commented Dec 2, 2025

@joshanne nice cleanups!

@peterbarker peterbarker force-pushed the pr/improvements-to-bl-fw-signing branch from 30cf056 to 2931f32 Compare December 2, 2025 01:17
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed the commit message

This fixes make_secure_bl writing to the incorrect file (sys.argv[1]). The resultant file was whatever argv[1] was passed in as, which could have been --omit-ardupilot-keys.

This fixes make_secure_fw not running at all because of a possible return outside of a function. Also improves argument passing so we can get ourselves a better help file.
Adds ability to pass --omit-ardupilot-keys to build_bootloaders.py

Adds ability to pass multiple public keys to the signing of the bootloader. This extends the functionality of the single key that was previously possible. All keys are prefixed with --signing-key and are appended to the args.signing_key array. All keys are checked for presense, and type before being used to sign the bootloader.

General tidy up of the argument parser, prints a proper description of the role of the file.
…d with the compact method of signing firmware

If the firmware file is built and signed using the compact method (ie. build and sign firmware at the same time) then the firmware file is not updated with the field signed_firmware.

If the firmware file is built using the long form method (ie. build the firmware first, then sign after) then the apj is updated with the field signed_firmware.

This ensures both signed firmware is consistent and contains the 'signed_firmware' field.
@joshanne joshanne force-pushed the pr/improvements-to-bl-fw-signing branch from 2931f32 to 5abc64e Compare December 3, 2025 01:26
Copy link
Contributor

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants