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

hil: initial commit #97

Merged
merged 4 commits into from
May 14, 2024
Merged

hil: initial commit #97

merged 4 commits into from
May 14, 2024

Conversation

TheButlah
Copy link
Collaborator

@TheButlah TheButlah commented May 8, 2024

Adds an orb-hil binary, to make flashing easy and automated. Its little more than a glorified bash script right now.

Currently it:

  • Assumes that it is on the hil and relies on some cli tools provided from the nix shell, like awscli and tar
  • Supports flashing from a s3 url or a local tarball

It does not yet support:

  • Automatically controlling CTS and RTS pins to reboot orb or trigger recovery mode
  • Connecting to serial
  • Retrieving s3 urls from a git tag
  • Automatically running in response to network events or github runners

.wrap_err("failed to create temporary extract dir")?;
let extract_dir = temp_dir.path();
let result = run_cmd! {
cd $extract_dir;
Copy link
Contributor

Choose a reason for hiding this comment

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

these bash snippets scare me.

Copy link
Collaborator Author

@TheButlah TheButlah May 8, 2024

Choose a reason for hiding this comment

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

its not actually bash. This is just a macro that calls std::process:Command. You can read more here: https://docs.rs/cmd_lib/latest/cmd_lib/#why-you-need-this.

I chose to use cli tools to keep it simpler, but nothing prevents us from replacing those runtime dependencies later.

Note that all dependencies are frozen anyway due to the nix config on the HIL.

@TheButlah TheButlah enabled auto-merge (squash) May 8, 2024 21:57
@TheButlah TheButlah disabled auto-merge May 8, 2024 22:22
@TheButlah TheButlah force-pushed the hil branch 2 times, most recently from 4aca5d7 to 3e17088 Compare May 9, 2024 18:21
@TheButlah TheButlah enabled auto-merge (squash) May 9, 2024 18:25
@TheButlah TheButlah disabled auto-merge May 9, 2024 18:25
@TheButlah TheButlah enabled auto-merge (squash) May 9, 2024 18:25
@TheButlah TheButlah merged commit d854318 into main May 14, 2024
9 checks passed
@TheButlah TheButlah deleted the hil branch May 14, 2024 10:29
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.

2 participants