1
0
Fork 0
forked from koniifer/ableos
This commit is contained in:
Able 2022-04-11 15:34:40 -05:00
parent 4fcde8bf41
commit 22cb0d71af
7 changed files with 57 additions and 8 deletions

1
.gitignore vendored
View file

@ -3,7 +3,6 @@ ableos/target
aos_wasm_stress_test/target aos_wasm_stress_test/target
facepalm/target facepalm/target
shadeable/target shadeable/target
qprofiler
userland/*/target userland/*/target
kernel/target kernel/target
userland/root_fs/mnt/* userland/root_fs/mnt/*

45
Cargo.lock generated
View file

@ -181,13 +181,28 @@ checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c"
dependencies = [ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
"clap_derive",
"indexmap", "indexmap",
"lazy_static",
"os_str_bytes", "os_str_bytes",
"strsim", "strsim",
"termcolor", "termcolor",
"textwrap", "textwrap",
] ]
[[package]]
name = "clap_derive"
version = "3.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "conquer-once" name = "conquer-once"
version = "0.3.2" version = "0.3.2"
@ -331,6 +346,12 @@ dependencies = [
"ahash 0.7.6", "ahash 0.7.6",
] ]
[[package]]
name = "heck"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
[[package]] [[package]]
name = "hermit-abi" name = "hermit-abi"
version = "0.1.19" version = "0.1.19"
@ -560,6 +581,30 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5c99d529f0d30937f6f4b8a86d988047327bb88d04d2c4afc356de74722131" checksum = "bc5c99d529f0d30937f6f4b8a86d988047327bb88d04d2c4afc356de74722131"
[[package]]
name = "proc-macro-error"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2",
"quote",
"syn",
"version_check",
]
[[package]]
name = "proc-macro-error-attr"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2",
"quote",
"version_check",
]
[[package]] [[package]]
name = "proc-macro-hack" name = "proc-macro-hack"
version = "0.5.19" version = "0.5.19"

View file

@ -6,5 +6,5 @@ members = [
"facepalm", "facepalm",
"shadeable", "shadeable",
"repbuild", "repbuild",
] ]

View file

@ -30,8 +30,8 @@ run-args = [
# "-device", # "-device",
# "virtio-rng", # "virtio-rng",
# "-qmp", "-qmp",
# "unix:../qmp-sock,server,nowait" "unix:../qmp-sock,server,nowait"
] ]
test-args = [ test-args = [

1
qprofiler Submodule

@ -0,0 +1 @@
Subproject commit 39f39068029fce6a94c7bd5cc960b07d9d1b2288

View file

@ -5,6 +5,9 @@ edition = "2021"
authors = ["Able", "NotAble"] authors = ["Able", "NotAble"]
[dependencies] [dependencies]
clap = "3.0.0-beta.5"
xshell = "0.1.9" xshell = "0.1.9"
anyhow = "*" anyhow = "*"
[dependencies.clap]
version = "3.1.8"
features = ["derive"]

View file

@ -1,7 +1,8 @@
use clap::Parser; use clap::Parser;
#[derive(clap::Parser, Debug)] #[derive(clap::Parser, Debug)]
#[clap(version = clap::crate_version!(), author = clap::crate_authors!("\n"))] // #[clap(version = clap::crate_version!(), author = clap::crate_authors!("\n"))]
/// Hello Remember this is a feature /// Hello Remember this is a feature
enum Command { enum Command {
Run { Run {
@ -103,12 +104,12 @@ fn main() -> anyhow::Result<()> {
Command::Mount { path } => { Command::Mount { path } => {
let path = path.unwrap_or("./userland/root_fs/mnt".to_string()); let path = path.unwrap_or("./userland/root_fs/mnt".to_string());
xshell::cmd!("sudo mount userland/root_fs/ext2.img {path}").run()?; xshell::cmd!("sudo mount userland/root_fs/ext2.img {path}").run()?;
}, }
Command::Unmount { path } => { Command::Unmount { path } => {
let path = path.unwrap_or("./userland/root_fs/mnt".to_string()); let path = path.unwrap_or("./userland/root_fs/mnt".to_string());
xshell::cmd!("sudo umount {path}").run()?; xshell::cmd!("sudo umount {path}").run()?;
}, }
} }
Ok(()) Ok(())