[ottool] Import chip alert constants
1. Import chip alert constants.
2. Import hardened and multi-bit booleans.
3. Import earlgrey constants; construct ujson enums of the same
constants.
4. Update `with_unknown!` to support conversions to it's integer
representation.
Signed-off-by: Chris Frantz <cfrantz@google.com>
diff --git a/sw/host/opentitanlib/BUILD b/sw/host/opentitanlib/BUILD
index b446523..71730f4 100644
--- a/sw/host/opentitanlib/BUILD
+++ b/sw/host/opentitanlib/BUILD
@@ -37,6 +37,9 @@
"src/bootstrap/mod.rs",
"src/bootstrap/primitive.rs",
"src/bootstrap/rescue.rs",
+ "src/chip/alert.rs",
+ "src/chip/boolean.rs",
+ "src/chip/mod.rs",
"src/crypto/mod.rs",
"src/crypto/rsa.rs",
"src/crypto/sha256.rs",
@@ -123,11 +126,20 @@
"src/util/usb.rs",
"src/util/usr_access.rs",
"src/util/voltage.rs",
- ],
+ ] + select({
+ "//sw/device:is_english_breakfast": [],
+ "//conditions:default": [
+ "src/chip/earlgrey.rs",
+ ],
+ }),
compile_data = [
":config",
":e2e_command",
],
+ crate_features = select({
+ "//sw/device:is_english_breakfast": ["english_breakfast"],
+ "//conditions:default": [],
+ }),
proc_macro_deps = [
"//sw/host/opentitanlib/opentitantool_derive",
],
@@ -135,6 +147,7 @@
"e2e_command": "$(location :e2e_command)",
},
deps = [
+ "//sw/host/opentitanlib/bindgen",
"//third_party/rust/crates:anyhow",
"//third_party/rust/crates:bitflags",
"//third_party/rust/crates:bitvec",