From e43891ce9fd87559744622f2ef82616d48d4d102 Mon Sep 17 00:00:00 2001 From: Able Date: Sun, 2 Jan 2022 04:04:36 -0600 Subject: [PATCH] adding in disks --- ableos/Cargo.toml | 11 ++++++++++- ableos/disk.qcow2 | Bin 0 -> 196616 bytes ableos/src/experiments/clparse.rs | 3 +++ ableos/src/kmain.rs | 6 ++++-- ableos/src/relib/clparse/mod.rs | 8 ++++++-- 5 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 ableos/disk.qcow2 diff --git a/ableos/Cargo.toml b/ableos/Cargo.toml index 9b0bbb69..bbe83662 100644 --- a/ableos/Cargo.toml +++ b/ableos/Cargo.toml @@ -8,7 +8,16 @@ version = "0.1.0" panic = "abort" [package.metadata.bootimage] -run-args = ["-serial", "stdio", "-smp", "cores=2"] +run-args = [ + "-serial", + "stdio", + "-smp", + "cores=2", + "-device", + "virtio-blk-pci,drive=drive0,id=virtblk0,num-queues=4", + "-drive", + "file=disk.qcow2,if=none,id=drive0", +] test-args = [ "-device", "isa-debug-exit,iobase=0xf4,iosize=0x04", diff --git a/ableos/disk.qcow2 b/ableos/disk.qcow2 new file mode 100644 index 0000000000000000000000000000000000000000..2b9c37cfc434d7f46ef601ffdf3b6e7ad3add9d6 GIT binary patch literal 196616 zcmeIuJx;?g6aZi+t(ZB2&%gz4hHR;#9KW8U=R)gerG`?qzfo$*-?sqA}R%TiCzZQO-Sr$X}9DnpY@;6ch2oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5I7@Ho{0++AV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!Cvi5h%jp{y!b- zlmGz&1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly fK!5-N0t5&UAV7cs0RjXF5FkK+009C7Mg%?qB)Tx8 literal 0 HcmV?d00001 diff --git a/ableos/src/experiments/clparse.rs b/ableos/src/experiments/clparse.rs index 923b9f83..c4b12d4f 100644 --- a/ableos/src/experiments/clparse.rs +++ b/ableos/src/experiments/clparse.rs @@ -3,8 +3,11 @@ clparse * A simple command line parser for ableOS */ +use alloc::collections::HashMap; use std::collections::HashMap; + const CURRENT_PATH: &str = "file://test/"; + #[derive(Debug)] struct Command { root_command: String, diff --git a/ableos/src/kmain.rs b/ableos/src/kmain.rs index 3b3dab9e..eeec0938 100644 --- a/ableos/src/kmain.rs +++ b/ableos/src/kmain.rs @@ -1,6 +1,6 @@ #![allow(clippy::empty_loop)] -use crate::experiments::info::master; +use crate::{experiments::info::master, relib::clparse}; use { crate::{ @@ -52,9 +52,11 @@ pub fn kernel_main() -> ! { ); println!("$PINK$Hi$RED$ from$GREEN$ able!$RESET$"); - println!("$RED$hi$RESET$"); + { + clparse::test(); + } // stack_overflow(); // crate::arch::shutdown(); sloop() diff --git a/ableos/src/relib/clparse/mod.rs b/ableos/src/relib/clparse/mod.rs index c953fc22..a5969cfa 100644 --- a/ableos/src/relib/clparse/mod.rs +++ b/ableos/src/relib/clparse/mod.rs @@ -63,9 +63,13 @@ impl Command { } } } -fn test() { +pub fn test() { let x = Command::parse("hi?there=uwu&hi=abc".to_string()); let y = &x.arguments[0]; - println!("{:?}", y); + + trace!("{}", x.root_command); + trace!("{:?}", y); + trace!("{}", y.key); + trace!("{}", y.value); }