Skip to content

Commit

Permalink
feat: add build for x86 with ecc608
Browse files Browse the repository at this point in the history
- add build for x86_64 with ecc608
- mips-unknown-linux-musl was duplicated
- add more info to readme
- minor typo fixes
  • Loading branch information
shawaj committed Apr 11, 2023
1 parent a486a38 commit 7a00b1c
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
- armv7-unknown-linux-gnueabihf
- armv7-unknown-linux-musleabihf
- mips-unknown-linux-musl
- mips-unknown-linux-musl
- mipsel-unknown-linux-musl
- x86_64-unknown-linux-gnu
- x86_64-tpm-debian-gnu

steps:
Expand Down
3 changes: 3 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ FEATURES = "ecc608"
BUILD_COMMAND = "cross"
TAR = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "linux", mapping = {"macos" = "gtar", "linux" = "tar" } }

[env.x86_64-unknown-linux-gnu]
CROSS_BUILD_DOCKERFILE = "./.github/cross-docker/Dockerfile-cross-debian-11"

[env.x86_64-tpm-debian-gnu]
CROSS_TARGET = "x86_64-unknown-linux-gnu"
CROSS_BUILD_DOCKERFILE = "./.github/cross-docker/Dockerfile-cross-debian-11"
Expand Down
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ address the `/dev/i2c-1` linux device, using the bus address`96` and slot `0` on
the ECC device. This is also the default URL for the application, and must be
provided for ECC parts with a different bus address or slot.

If you are passing an additional command such as those decribed in the [usage section](#usage) below those commands need to come after the device address. For example:

```
gateway_mfr --device ecc://i2c-1:96?slot=0 key
```

Each security part will have it's own URL scheme and host/path arguments to
address the specific system and entry used for key material and provisioning.

Expand Down Expand Up @@ -123,3 +129,37 @@ The security part is now configured for production use. The production image,
including the Helium miner can be installed and started. If configured correctly
the miner software will use the configured key in slot 0 as the miner key and
use the security part for secured transaction signing.

The full suite of options can be found by running the help command:

```shell
gateway_mfr help
```

This will give you an output like the following where you can find all of the options listed:

```
gateway_mfr 0.3.2
Gateway Manufacturing
USAGE:
gateway_mfr [OPTIONS] <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--device <device> The security device to use [default: ecc://i2c-1]
SUBCOMMANDS:
bench Run a benchmark test
config Gets the zone, slot or key config for a given ecc slot
help Prints this message or the help of the given subcommand(s)
info Get ecc chip information
key Prints public key information for a given slot
provision Configures the ECC for gateway/miner use. This includes configuring slot and key configs for †he
given slot, locking the data and config zone and generating an ecc compact key in the configured
slot
test Read the slot configuration for a given slot
```
2 changes: 1 addition & 1 deletion src/device/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub enum Device {
pub struct DeviceArgs(HashMap<String, String>);

/// Represents the configuration state for the given security device. This
/// information should include enpugh detail to convey that the security device
/// information should include enough detail to convey that the security device
/// is "locked" so key material can be written to it.
#[derive(Debug, Serialize)]
#[serde(untagged)]
Expand Down
2 changes: 1 addition & 1 deletion src/device/tpm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct Device {
}

impl Device {
/// Parses an tpm device url of the form `tpm://tpm/<key_path>`,
/// Parses a tpm device url of the form `tpm://tpm/<key_path>`,
/// where <key_path> is the path to TPM KEY
pub fn from_url(url: &Uri) -> Result<Self> {
let path = url.path();
Expand Down

0 comments on commit 7a00b1c

Please sign in to comment.