diff --git a/.gitignore b/.gitignore index 5311cc6..7fe889b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ shadeable/target qprofiler userland/*/target kernel/target +userland/root_fs/mnt/* +!*/.gitkeep diff --git a/ableos/src/filesystem/mod.rs b/ableos/src/filesystem/mod.rs index 9eceb51..00afa56 100644 --- a/ableos/src/filesystem/mod.rs +++ b/ableos/src/filesystem/mod.rs @@ -9,7 +9,7 @@ use ext2::{ fn load_fs() -> Synced>> { let mut volume = Vec::new(); - volume.extend_from_slice(include_bytes!("../../../userland/root_rs/ext2.img")); + volume.extend_from_slice(include_bytes!("../../../userland/root_fs/ext2.img")); let fs = Synced::>::new(volume).unwrap(); diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs index 25c1dd9..9dfd24b 100644 --- a/repbuild/src/main.rs +++ b/repbuild/src/main.rs @@ -16,6 +16,16 @@ enum Command { #[clap(long, short, arg_enum)] machine: Option, }, + + Mount { + #[clap(long, short)] + path: Option, + }, + + Unmount { + #[clap(long, short)] + path: Option, + }, } #[derive(clap::ArgEnum, Debug, Clone)] @@ -89,6 +99,16 @@ fn main() -> anyhow::Result<()> { } } } + + Command::Mount { path } => { + let path = path.unwrap_or("./userland/root_fs/mnt".to_string()); + xshell::cmd!("sudo mount userland/root_fs/ext2.img {path}").run()?; + }, + + Command::Unmount { path } => { + let path = path.unwrap_or("./userland/root_fs/mnt".to_string()); + xshell::cmd!("sudo umount {path}").run()?; + }, } Ok(()) diff --git a/userland/root_rs/ext2.img b/userland/root_fs/ext2.img similarity index 99% rename from userland/root_rs/ext2.img rename to userland/root_fs/ext2.img index 15b29de..bd5aa42 100644 Binary files a/userland/root_rs/ext2.img and b/userland/root_fs/ext2.img differ