├── rust-toolchain ├── .cargo └── config.toml ├── README.md ├── .gitignore ├── src ├── setup.rs └── main.rs ├── Makefile ├── Cargo.toml └── x86_64-novusk.json /rust-toolchain: -------------------------------------------------------------------------------- 1 | nightly -------------------------------------------------------------------------------- /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [unstable] 2 | build-std = ["alloc", "core", "compiler_builtins"] 3 | build-std-features = ["compiler-builtins-mem"] 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FOMOSv2-CL v2.4 | Novusk v3 2 | 3 | A Command line version of FOMOS, based off Novusk 4 | 5 | Build: 6 | ```commandline 7 | make all 8 | ``` 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignored file formats 2 | *.a 3 | *.cpio 4 | *.gz 5 | *.o 6 | *.out 7 | 8 | # Ignored files 9 | Cargo.lock 10 | init 11 | 12 | # Ignored directories 13 | .idea/ 14 | builtin_commands/ 15 | initramfs/ 16 | target/ -------------------------------------------------------------------------------- /src/setup.rs: -------------------------------------------------------------------------------- 1 | use crate::printk; 2 | 3 | fn update_boot_count() { 4 | // For now until fs is supported 5 | let mut boot_count = 0; 6 | 7 | boot_count += 1; 8 | printk!("Starting {}th boot", boot_count); 9 | } 10 | 11 | pub fn setup() { 12 | update_boot_count(); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | @ curl https://raw.githubusercontent.com/NathanMcMillan54/novusk/master/targets/x86_64-novusk.json > x86_64-novusk.json 3 | @ cargo install bootimage 4 | 5 | all: 6 | @ cargo build --target x86_64-novusk.json 7 | @ cargo bootimage --target x86_64-novusk.json 8 | 9 | clean: 10 | @ cargo clean 11 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "FOMOSv2_CL" 3 | version = "2.3.5" 4 | authors = ["Nathan McMillan "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | bootloader = "0.9.18" 9 | 10 | [dependencies.novusk] 11 | git = "https://github.com/NathanMcMillan54/novusk" 12 | tag = "v3-beta-k2" 13 | features = ["bios_boot"] 14 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![no_std] 2 | #![no_main] 3 | 4 | #[macro_use] extern crate novusk; 5 | 6 | use novusk::kernel::printk::printk; 7 | 8 | pub(crate) mod setup; 9 | 10 | async fn main_loop() { 11 | 12 | } 13 | 14 | #[no_mangle] 15 | pub extern "C" fn kernel_main() -> ! { 16 | printk!("Setting up {} {}...", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION")); 17 | setup::setup(); 18 | 19 | main_loop(); 20 | 21 | panic!("Nothing to run"); 22 | } 23 | -------------------------------------------------------------------------------- /x86_64-novusk.json: -------------------------------------------------------------------------------- 1 | { 2 | "llvm-target": "x86_64-unknown-none", 3 | "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", 4 | "arch": "x86_64", 5 | "target-endian": "little", 6 | "target-pointer-width": "64", 7 | "target-c-int-width": "32", 8 | "os": "none", 9 | "executables": true, 10 | "linker-flavor": "ld.lld", 11 | "linker": "rust-lld", 12 | "panic-strategy": "abort", 13 | "disable-redzone": true, 14 | "features": "-mmx,-sse,+soft-float" 15 | } 16 | --------------------------------------------------------------------------------