1
0
Fork 0
forked from AbleOS/ableos

adding in disks

This commit is contained in:
Able 2022-01-02 04:04:36 -06:00
parent 7d563f8ad2
commit e43891ce9f
5 changed files with 23 additions and 5 deletions

View file

@ -8,7 +8,16 @@ version = "0.1.0"
panic = "abort" panic = "abort"
[package.metadata.bootimage] [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 = [ test-args = [
"-device", "-device",
"isa-debug-exit,iobase=0xf4,iosize=0x04", "isa-debug-exit,iobase=0xf4,iosize=0x04",

BIN
ableos/disk.qcow2 Normal file

Binary file not shown.

View file

@ -3,8 +3,11 @@ clparse
* A simple command line parser for ableOS * A simple command line parser for ableOS
*/ */
use alloc::collections::HashMap;
use std::collections::HashMap; use std::collections::HashMap;
const CURRENT_PATH: &str = "file://test/"; const CURRENT_PATH: &str = "file://test/";
#[derive(Debug)] #[derive(Debug)]
struct Command { struct Command {
root_command: String, root_command: String,

View file

@ -1,6 +1,6 @@
#![allow(clippy::empty_loop)] #![allow(clippy::empty_loop)]
use crate::experiments::info::master; use crate::{experiments::info::master, relib::clparse};
use { use {
crate::{ crate::{
@ -52,9 +52,11 @@ pub fn kernel_main() -> ! {
); );
println!("$PINK$Hi$RED$ from$GREEN$ able!$RESET$"); println!("$PINK$Hi$RED$ from$GREEN$ able!$RESET$");
println!("$RED$hi$RESET$"); println!("$RED$hi$RESET$");
{
clparse::test();
}
// stack_overflow(); // stack_overflow();
// crate::arch::shutdown(); // crate::arch::shutdown();
sloop() sloop()

View file

@ -63,9 +63,13 @@ impl Command {
} }
} }
} }
fn test() { pub fn test() {
let x = Command::parse("hi?there=uwu&hi=abc".to_string()); let x = Command::parse("hi?there=uwu&hi=abc".to_string());
let y = &x.arguments[0]; let y = &x.arguments[0];
println!("{:?}", y);
trace!("{}", x.root_command);
trace!("{:?}", y);
trace!("{}", y.key);
trace!("{}", y.value);
} }