Skip to content

[bazel] Add OTP alert_handler digest generation #15890

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

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

jon-flatley
Copy link
Contributor

This PR builds on #14013.

This adds a rule, otp_alert_digest, that creates an additional OTP image overlay containing the OWNER_SW_CFG_ROM_ALERT_DIGEST_<LC_STATE> values.

Right now this is only done for RMA.

Leaving this as draft status as #14013 currently doesn't produce a JSON format that is accepted by the python tools. From what I can tell, this is because the python tools expect the items to be in the form of quoted hex values, and right now opentitantool is outputting these fields as regular JSON numbers in decimal.

@jon-flatley
Copy link
Contributor Author

Moving this out of draft stage. Just like #15872, this PR is also blocked on lowRISC/serde-annotate#10 to get hex serialization working in opentitantool. With that change the bazel rules added here seem to work as intended.

@jon-flatley jon-flatley marked this pull request as ready for review November 2, 2022 20:41
@jon-flatley jon-flatley requested review from cfrantz, drewmacrae and a team as code owners November 2, 2022 20:41
@jon-flatley
Copy link
Contributor Author

Moving this out of draft stage. Just like #15872, this PR is also blocked on lowRISC/serde-annotate#10 to get hex serialization working in opentitantool. With that change the bazel rules added here seem to work as intended.

Copy link
Contributor

@alphan alphan left a comment

Choose a reason for hiding this comment

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

Thanks @jon-flatley! (I reviewed only the last commit since the first three are included in the other PR).

Copy link
Contributor

@milesdai milesdai left a comment

Choose a reason for hiding this comment

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

Similarly, the last commit LGTM with one suggestion

@jon-flatley jon-flatley force-pushed the otp_alert_bazel branch 4 times, most recently from d15734f to daffcfe Compare November 4, 2022 19:50
@jon-flatley jon-flatley merged commit b0e0bf8 into lowRISC:master Nov 7, 2022
),
"_opentitantool": attr.label(
default = "//sw/host/opentitantool:opentitantool",
allow_single_file = True,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should have cfg = "exec" to avoid an implicit transition from the host platform to riscv32. https://bazel.build/rules/lib/attr#label

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll make a PR :)

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.

4 participants