Skip to content

Conversation

@nasahlpa
Copy link
Member

@nasahlpa nasahlpa commented Oct 23, 2025

This commit adds a versioning concept to the cryptolib. cryptolib_build_info_t contains:

  • released - is the CL version released or not?
  • version - pinned version of the CL
  • scm_revision_low/high - truncated commit hash of sw/device/lib/crypto

@nasahlpa
Copy link
Member Author

Thanks @pamaury for helping me with this. An optimization would be to get rid of the new cryptolib_build_info script and instead use the existing build_info script. However, it seems that this script uses quite some hardcoded values (e.g., the template for the .c file etc) and I am not sure how to best tackle this.

@nasahlpa nasahlpa marked this pull request as ready for review October 23, 2025 15:23
@nasahlpa nasahlpa requested review from a team and cfrantz as code owners October 23, 2025 15:23
@andreaskurth
Copy link
Contributor

Thx @nasahlpa and @pamaury. Do I understand correctly that the default and current behavior is that the version is a rolling / non-frozen / not pinned / not formally released one? Can we make that explicit somewhere, so that we can very clearly distinguish between in-development and released versions?

@nasahlpa
Copy link
Member Author

Thx @nasahlpa and @pamaury. Do I understand correctly that the default and current behavior is that the version is a rolling / non-frozen / not pinned / not formally released one? Can we make that explicit somewhere, so that we can very clearly distinguish between in-development and released versions?

Thanks for the remark, Andreas.

Yes, the CL is currently not released, this is also mentioned in the documentation. I've added a comment to the version field.

#include "sw/device/lib/crypto/include/datatypes.h"

/**
* A truncated commit hash from the sw/device/lib/crypto directory from
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to try exclude /data/crypto_testplan.hjson ? probably not possible I guess

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really sure how to do this TBH :/

Copy link
Contributor

@johannheyszl johannheyszl left a comment

Choose a reason for hiding this comment

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

Thanks @nasahlpa this is needed :)

This commit adds a versioning concept to the cryptolib.
cryptolib_build_info_t contains:
- released - is the CL version released or not?
- version - pinned version of the CL
- scm_revision_low/high - truncated commit hash of
  sw/device/lib/crypto

Signed-off-by: Pascal Nasahl <[email protected]>
Copy link
Contributor

@andreaskurth andreaskurth left a comment

Choose a reason for hiding this comment

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

Thanks for implementing my feedback, @nasahlpa. LGTM!

@andreaskurth andreaskurth merged commit 53f8d5a into lowRISC:earlgrey_1.0.0 Oct 27, 2025
34 checks passed
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