Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootloader: Add Reading of Git SHA to bootloader #28492

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joshanne
Copy link
Contributor

Allows the bootloader build to be identified with uploader.py

@@ -128,6 +128,7 @@
#define PROTO_DEVICE_FW_SIZE 4 // size of flashable area
#define PROTO_DEVICE_VEC_AREA 5 // contents of reserved vectors 7-10
#define PROTO_DEVICE_EXTF_SIZE 6 // size of available external flash
#define PROTO_DEVICE_BL_GIT_HASH 7 // git hash of bootloader build
// all except PROTO_DEVICE_VEC_AREA and PROTO_DEVICE_BOARD_REV should be done
#define CHECK_GET_DEVICE_FINISHED(x) ((x & (0xB)) == 0xB)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm unsure if this line would need to be updated to 0x4B?

@joshanne
Copy link
Contributor Author

This is helpful for users building their own bootloaders, and allowing the user to identify what commit the build was built at.

Feedback welcome.

@@ -128,6 +128,7 @@
#define PROTO_DEVICE_FW_SIZE 4 // size of flashable area
#define PROTO_DEVICE_VEC_AREA 5 // contents of reserved vectors 7-10
#define PROTO_DEVICE_EXTF_SIZE 6 // size of available external flash
#define PROTO_DEVICE_BL_GIT_HASH 7 // git hash of bootloader build
Copy link
Contributor Author

@joshanne joshanne Oct 29, 2024

Choose a reason for hiding this comment

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

I've also got changes that add reading off the Application Git SHA if AP_CHECK_FIRMWARE_ENABLED is enabled in the bootloader (and application).

We certainly would find these handy, just a question of if this is desirable in the bootloader.

Copy link
Contributor

@khancyr khancyr left a comment

Choose a reason for hiding this comment

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

great idea, that would prevent to always have to update the bootloader when you do custom one's !

Allows for reading of the git sha from the bootloader to ascertain the sha the bootloader is built at
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants