diff --git a/.gitignore b/.gitignore index e69de29..0b70728 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,8 @@ +/target +**/target +.gdb_history +**/.gdb_history +.DS_Store +**/.DS_Store +.gdbinit +**/.gdbinit \ No newline at end of file diff --git a/bootloader/.gitignore b/bootloader/.gitignore deleted file mode 100644 index 99626c4..0000000 --- a/bootloader/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/target -**/target -.gdb_history -.DS_Store -.gdbinit diff --git a/bootloader/Cargo.toml b/bootloader/Cargo.toml index 81342e2..389350d 100644 --- a/bootloader/Cargo.toml +++ b/bootloader/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -layout = { path = "src/bios/layout" } +layout = { path = "./src/bios/layout" } [build-dependencies] llvm-tools = "0.1.1" diff --git a/bootloader/src/bios/stage_1/Cargo.toml b/bootloader/src/bios/stage_1/Cargo.toml index f98c59c..57e141a 100644 --- a/bootloader/src/bios/stage_1/Cargo.toml +++ b/bootloader/src/bios/stage_1/Cargo.toml @@ -6,5 +6,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -i386 = { path = "../i386" } +i386 = { path = "../../../../i386" } layout = { path = "../layout" } diff --git a/bootloader/src/bios/stage_2/Cargo.toml b/bootloader/src/bios/stage_2/Cargo.toml index 69a8ab0..35c02c2 100644 --- a/bootloader/src/bios/stage_2/Cargo.toml +++ b/bootloader/src/bios/stage_2/Cargo.toml @@ -6,5 +6,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -i386 = { path = "../i386" } +i386 = { path = "../../../../i386" } layout = { path = "../layout" } diff --git a/bootloader/src/bios/stage_3/Cargo.toml b/bootloader/src/bios/stage_3/Cargo.toml index cb01874..88b922f 100644 --- a/bootloader/src/bios/stage_3/Cargo.toml +++ b/bootloader/src/bios/stage_3/Cargo.toml @@ -6,5 +6,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -i386 = { path = "../i386" } +i386 = { path = "../../../../i386" } layout = { path = "../layout" } diff --git a/bootloader/src/main.rs b/bootloader/src/main.rs index 8f45b65..ba719a0 100644 --- a/bootloader/src/main.rs +++ b/bootloader/src/main.rs @@ -1,7 +1,7 @@ use std::{fs::File, io::{Read, Write}, path::Path}; use layout::*; -static MINEFEST_PATH: &str = "/Users/ctsinon/Projects/Orangs/bootloader"; +static MINEFEST_PATH: &str = "/Users/ctsinon/Projects/Orangs/OrustS/bootloader"; static STAGES: [(&str, usize); 3] = [ (&"target/stage_1/target/release/stage_1.bin", STAGE1_SIZE), diff --git a/bootloader/src/bios/i386/Cargo.lock b/i386/Cargo.lock similarity index 100% rename from bootloader/src/bios/i386/Cargo.lock rename to i386/Cargo.lock diff --git a/i386/Cargo.toml b/i386/Cargo.toml new file mode 100644 index 0000000..8256ad8 --- /dev/null +++ b/i386/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "i386" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +layout = { path = "../bootloader/src/bios/layout" } + diff --git a/bootloader/src/bios/i386/src/addr.rs b/i386/src/addr.rs similarity index 100% rename from bootloader/src/bios/i386/src/addr.rs rename to i386/src/addr.rs diff --git a/bootloader/src/bios/i386/src/bitwise.rs b/i386/src/bitwise.rs similarity index 100% rename from bootloader/src/bios/i386/src/bitwise.rs rename to i386/src/bitwise.rs diff --git a/bootloader/src/bios/i386/src/disk.rs b/i386/src/disk.rs similarity index 100% rename from bootloader/src/bios/i386/src/disk.rs rename to i386/src/disk.rs diff --git a/bootloader/src/bios/i386/src/dt.rs b/i386/src/dt.rs similarity index 100% rename from bootloader/src/bios/i386/src/dt.rs rename to i386/src/dt.rs diff --git a/bootloader/src/bios/i386/src/dt/gdt.rs b/i386/src/dt/gdt.rs similarity index 100% rename from bootloader/src/bios/i386/src/dt/gdt.rs rename to i386/src/dt/gdt.rs diff --git a/bootloader/src/bios/i386/src/dt/ldt.rs b/i386/src/dt/ldt.rs similarity index 100% rename from bootloader/src/bios/i386/src/dt/ldt.rs rename to i386/src/dt/ldt.rs diff --git a/bootloader/src/bios/i386/src/dt/utils.rs b/i386/src/dt/utils.rs similarity index 100% rename from bootloader/src/bios/i386/src/dt/utils.rs rename to i386/src/dt/utils.rs diff --git a/bootloader/src/bios/i386/src/lib.rs b/i386/src/lib.rs similarity index 100% rename from bootloader/src/bios/i386/src/lib.rs rename to i386/src/lib.rs diff --git a/bootloader/src/bios/i386/src/ring.rs b/i386/src/ring.rs similarity index 100% rename from bootloader/src/bios/i386/src/ring.rs rename to i386/src/ring.rs diff --git a/bootloader/src/bios/i386/src/tss.rs b/i386/src/tss.rs similarity index 100% rename from bootloader/src/bios/i386/src/tss.rs rename to i386/src/tss.rs diff --git a/kernel/Cargo.lock b/kernel/Cargo.lock new file mode 100644 index 0000000..0dd1539 --- /dev/null +++ b/kernel/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "kernel" +version = "0.1.0" diff --git a/bootloader/src/bios/i386/Cargo.toml b/kernel/Cargo.toml similarity index 77% rename from bootloader/src/bios/i386/Cargo.toml rename to kernel/Cargo.toml index 14b03c2..1d9cd28 100644 --- a/bootloader/src/bios/i386/Cargo.toml +++ b/kernel/Cargo.toml @@ -1,10 +1,8 @@ [package] -name = "i386" +name = "kernel" version = "0.1.0" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -layout = { path = "../layout" } - diff --git a/kernel/src/main.rs b/kernel/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/kernel/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}