Skip to content

Commit 70e02ff

Browse files
committed
Include portio code directly instead of crate dependency
It's very little code that we can jsut maintain here directly instead of depending on a crate. Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 5a45784 commit 70e02ff

7 files changed

Lines changed: 294 additions & 51 deletions

File tree

Cargo.lock

Lines changed: 6 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585

8686
# Git dependency output hashes
8787
gitDependencyHashes = {
88-
"redox_hwio-0.1.6" = "sha256-knLIZ7yp42SQYk32NGq3SUGvJFVumFhD64Njr5TRdFs=";
8988
"smbios-lib-0.9.1" = "sha256-3L8JaA75j9Aaqg1z9lVs61m6CvXDeQprEFRq+UDCHQo=";
9089
};
9190

framework_lib/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ guid-create = { version = "0.5.0", default-features = false }
4040
uefi = { version = "0.36.1", features = ["alloc", "global_allocator", "panic_handler", "logger"] }
4141
uefi-raw = "0.13"
4242
plain = "0.2.3"
43-
redox_hwio = { git = "https://github.com/FrameworkComputer/rust-hwio", branch = "freebsd", default-features = false }
4443
smbios-lib = { git = "https://github.com/FrameworkComputer/smbios-lib.git", branch = "no-std", default-features = false }
4544

4645
[target.'cfg(windows)'.dependencies]
@@ -58,7 +57,6 @@ nvml-wrapper = { version = "0.11.0", optional = true }
5857
[target.'cfg(unix)'.dependencies]
5958
libc = "0.2.155"
6059
nix = { version = "0.30", features = ["ioctl", "user"] }
61-
redox_hwio = { git = "https://github.com/FrameworkComputer/rust-hwio", branch = "freebsd" }
6260
smbios-lib = { git = "https://github.com/FrameworkComputer/smbios-lib.git", branch = "no-std" }
6361
env_logger = "0.11"
6462
clap = { version = "4.5", features = ["derive", "cargo"] }

framework_lib/src/chromium_ec/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ pub mod input_deck;
3030
#[cfg(not(windows))]
3131
mod portio;
3232
#[cfg(not(windows))]
33+
mod portio_hwio;
34+
#[cfg(not(windows))]
3335
mod portio_mec;
3436
#[allow(dead_code)]
3537
mod protocol;

framework_lib/src/chromium_ec/portio.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1+
use super::portio_hwio::{Io, Pio};
12
use crate::chromium_ec::{EcError, EcResponseStatus, EcResult};
23
use alloc::format;
34
use alloc::string::ToString;
45
use alloc::vec;
56
use alloc::vec::Vec;
67
use core::convert::TryInto;
7-
#[cfg(not(windows))]
8-
use hwio::{Io, Pio};
98
#[cfg(target_os = "linux")]
109
use libc::ioperm;
1110
use log::Level;

0 commit comments

Comments
 (0)