add an example system.toml

This commit is contained in:
Able 2023-04-26 14:33:40 -05:00
parent 01cdd68b28
commit 174b621acd
8 changed files with 64 additions and 47 deletions

View file

@ -1,26 +1,2 @@
# ableOS TODO:
![Discord](https://img.shields.io/discord/831368967385120810) ![Code Size](https://img.shields.io/github/languages/code-size/abletheabove/ableos) Support cache drives
## Set up
Install [Qemu](https://www.qemu.org/)
> On Windows be sure to add `C:\Program Files\qemu` to your `PATH` variable
`rustup component add rust-src`
`rustup component add llvm-tools-preview`
`cargo install bootimage`
## Running
repbuild can be used to run and build docs for able os
`cargo repbuild doc`
`cargo repbuild run`
## Testing on real hardware
I recommend using an old x86_64 computer
* `cargo run --release` to generate a binary image that is bootable
* flash it to a USB device via `dd` or balenaEtcher
* Remove said USB device and plug into test machine
* assure test machine boots from USB devices

View file

@ -1,17 +1,21 @@
use spin::Lazy; use {
use x86_64::{ spin::Lazy,
x86_64::{
structures::{ structures::{
gdt::{Descriptor, GlobalDescriptorTable, SegmentSelector}, gdt::{Descriptor, GlobalDescriptorTable, SegmentSelector},
tss::TaskStateSegment, tss::TaskStateSegment,
}, },
VirtAddr, VirtAddr,
},
}; };
pub const DOUBLE_FAULT_IX: u16 = 0; pub const DOUBLE_FAULT_IX: u16 = 0;
pub unsafe fn init() { pub unsafe fn init() {
use x86_64::instructions::segmentation::{Segment, CS, SS}; use x86_64::instructions::{
use x86_64::instructions::tables::load_tss; segmentation::{Segment, CS, SS},
tables::load_tss,
};
log::info!("Initialising GDT"); log::info!("Initialising GDT");
GDT.0.load(); GDT.0.load();

View file

@ -1,6 +1,8 @@
use crate::arch::hardware_random_u64; use {
use alloc::vec::Vec; crate::arch::hardware_random_u64,
use core::fmt::{self, Formatter}; alloc::vec::Vec,
core::fmt::{self, Formatter},
};
#[derive(Debug, Eq, Hash, PartialEq, Clone, Copy)] #[derive(Debug, Eq, Hash, PartialEq, Clone, Copy)]
pub struct OSHandle { pub struct OSHandle {
pub id: u64, pub id: u64,

View file

@ -1,7 +1,10 @@
use alloc::vec; use {
use alloc::vec::Vec; alloc::vec::Vec,
spin::{Lazy, Mutex},
};
use spin::{Lazy, Mutex}; // Seperate use statement
use alloc::vec;
pub type HostObjects = Vec<Option<xml::XMLElement>>; pub type HostObjects = Vec<Option<xml::XMLElement>>;

View file

@ -2,7 +2,7 @@ ${ABLEOS_KERNEL}=boot:///kernel
# TODO: Make a boot background image for ableOS # TODO: Make a boot background image for ableOS
DEFAULT_ENTRY=1 DEFAULT_ENTRY=1
TIMEOUT=0 TIMEOUT=50
VERBOSE=yes VERBOSE=yes
INTERFACE_RESOLUTION=1024x768 INTERFACE_RESOLUTION=1024x768
# Terminal related settings # Terminal related settings

View file

@ -1,2 +1,3 @@
hex_literal_case = "Upper" hex_literal_case = "Upper"
imports_granularity = "One" imports_granularity = "One"
struct_field_align_threshold = 5

31
system.toml Normal file
View file

@ -0,0 +1,31 @@
[boot]
[boot.limine]
default_entry = 1
timeout = 0
verbose = true
interface_resolution = "1024x768x24"
# Terminal related settings
term_wallpaper = "boot:///background.bmp"
term_background = "008080"
[boot.limine.ableos]
comment = "Default AbleOS boot entry."
protocol = "limine"
kernel_path = "boot:///kernel"
kernel_cmdline = "baka=false foobles=true"
resolution = "1024x768x24"
[repositories]
core = "https://git.ablecorp.us/AbleOS/core"
userspace = "https://git.ablecorp.us/AbleOS/ableos_userland"
nya = "https://git.ablecorp.us/AbleOS/nya"
[packages]
[packages.list_files]
version = "0.1.1"
hash = ""
repo = "userspace"
authors = []
[packages.list_files.configuration]

BIN
test.wasm

Binary file not shown.