Compare commits

...

2 Commits

Author SHA1 Message Date
Faynot
ceedd21aee merge: resolve conflict in README.md 2026-06-23 22:52:59 +03:00
Faynot
8a195462e5 fix: rename RINA to LISA 2026-06-23 22:48:46 +03:00
3 changed files with 83 additions and 73 deletions

112
README.md
View File

@@ -6,38 +6,42 @@
<b>H2O</b>
</p>
Elyz is a microkernel operating system written in Rust. The project uses the Limine bootloader and supports multiple architectures. The current implementation includes basic kernel initialization, physical memory management, paging, and graphical output via framebuffer.
**Elyz is a microkernel OS** that radically rejects the technological deadwood of the past. While traditional systems are hamstrung by decades of legacy code, Elyz is built on a foundation of uncompromising modernity.
We implement technologies that others can't afford. This isn't an attempt to fix the old, but to create a flexible and secure environment, building a proper OS from scratch, capable of instantly adapting to the challenges of tomorrow.
## Project Structure
| Directory/File | Description |
|----------------|-------------|
| `kernel/` | Kernel source code (Rust) |
| `limine/` | Limine bootloader |
| `ovmf/` | UEFI firmware for emulation |
| `limine.conf` | Boot menu configuration |
| `GNUmakefile` | Main Makefile for building and running |
| Directory/File | Description |
| -------------- | -------------------------------------- |
| `kernel/` | Kernel source code |
| `limine/` | Limine bootloader |
| `ovmf/` | UEFI firmware for emulation |
| `limine.conf` | Boot menu configuration |
| `GNUmakefile` | Main Makefile for building and running |
## System Requirements
| Tool | Version/Requirements | Purpose |
|------|---------------------|---------|
| GNU Make | ≥ 4.0 | Project building |
| Rust | Nightly with `rust-src` | Kernel compilation |
| xorriso | Any | ISO image creation |
| sgdisk | Any | Disk image creation |
| mtools | Any | Disk image handling |
| QEMU | ≥ 6.0 | Emulation |
| Tool | Version/Requirements | Purpose |
| -------- | ----------------------- | ------------------- |
| GNU Make | ≥ 4.0 | Project building |
| Rust | Nightly with `rust-src` | Kernel compilation |
| xorriso | Any | ISO image creation |
| sgdisk | Any | Disk image creation |
| mtools | Any | Disk image handling |
| QEMU | ≥ 6.0 | Emulation |
**Installing dependencies:**
**Ubuntu/Debian:**
```bash
sudo apt install make rustc xorriso gdisk mtools qemu-system-x86
rustup toolchain install nightly --component rust-src
```
**Arch Linux:**
```bash
sudo pacman -S make rust xorriso gdisk mtools qemu-desktop
rustup toolchain install nightly --component rust-src
@@ -46,6 +50,7 @@ rustup toolchain install nightly --component rust-src
## Building and Running
### Preparation
```bash
git clone https://git.inotfail.com/INotFail/Elyz.git
cd Elyz
@@ -54,17 +59,18 @@ rustup override set nightly
### Main Makefile Targets
| Target | Description | Result |
|--------|-------------|--------|
| `make all` | Kernel compilation + ISO creation | `Elyz.iso` |
| `make run` | Full build + QEMU launch (BIOS) | UEFI emulation |
| `make run-bios` | Run existing image (BIOS) | BIOS emulation |
| `make run-uefi` | Full build + QEMU launch (UEFI) | UEFI emulation |
| `make all-hdd` | Compilation + HDD/USB image | `Elyz.hdd` |
| `make run-hdd` | Build HDD + QEMU launch | HDD emulation |
| `make clean` | Clean build artifacts | — |
| Target | Description | Result |
| --------------- | --------------------------------- | -------------- |
| `make all` | Kernel compilation + ISO creation | `Elyz.iso` |
| `make run` | Full build + QEMU launch (BIOS) | UEFI emulation |
| `make run-bios` | Run existing image (BIOS) | BIOS emulation |
| `make run-uefi` | Full build + QEMU launch (UEFI) | UEFI emulation |
| `make all-hdd` | Compilation + HDD/USB image | `Elyz.hdd` |
| `make run-hdd` | Build HDD + QEMU launch | HDD emulation |
| `make clean` | Clean build artifacts | — |
**Run examples:**
```bash
# BIOS with auto-build
make run
@@ -80,14 +86,15 @@ make all-hdd
The `KARCH` environment variable sets the target architecture (default: `x86_64`).
| Architecture | `KARCH` value | Status |
|--------------|---------------|--------|
| x86_64 | `x86_64` | Full support |
| AArch64 | `aarch64` | Experimental |
| RISC-V 64 | `riscv64` | Experimental |
| Architecture | `KARCH` value | Status |
| ------------ | ------------- | ------------ |
| x86_64 | `x86_64` | Full support |
| AArch64 | `aarch64` | Experimental |
| RISC-V 64 | `riscv64` | Experimental |
| LoongArch 64 | `loongarch64` | Experimental |
**Running other architecture:**
```bash
make run KARCH=aarch64
```
@@ -96,28 +103,28 @@ make run KARCH=aarch64
## Current Functionality
| Component | Status | Description |
|-----------|--------|-------------|
| Limine Bootloader | ✅ Done | BIOS/UEFI support |
| Physical MM (Bitmap) | ✅ Done | Page bitmap |
| Page Tables (x86_64) | ✅ Done | 4-level addressing |
| Global Allocator | ✅ Done | Bump allocator (8MB) |
| Framebuffer | ✅ Done | Graphical output |
| Console | ✅ Done | Text output with scrolling |
| Component | Status | Description |
| -------------------- | ------- | -------------------------- |
| Limine Bootloader | ✅ Done | BIOS/UEFI support |
| Physical MM (Bitmap) | ✅ Done | Page bitmap |
| Page Tables (x86_64) | ✅ Done | 4-level addressing |
| Global Allocator | ✅ Done | Bump allocator (8MB) |
| Framebuffer | ✅ Done | Graphical output |
| Console | ✅ Done | Text output with scrolling |
## Memory System Development Status
| Task | Status | Note |
|------|--------|------|
| **Basic initialization** | ✅ Ready | Limine, MMU, PMM |
| **Physical allocator** | ✅ Ready | BitmapPMM working |
| **Paging** | ✅ Ready | P4->P1 mapping |
| **Global heap** | ✅ Ready | 8MB bump allocator |
| **Descriptor memory model** | ⏳ Not Started | Planned |
| **Processes and spaces** | ⏳ Not Started | No IPC |
| **Memory syscalls** | ⏳ Not Started | allocate/clone/transfer |
| **Weak references** | ⏳ Not Started | borrow/release |
| **Process auto-cleanup** | ⏳ Not Started | On exit |
| Task | Status | Note |
| --------------------------- | -------------- | ----------------------- |
| **Basic initialization** | ✅ Ready | Limine, MMU, PMM |
| **Physical allocator** | ✅ Ready | BitmapPMM working |
| **Paging** | ✅ Ready | P4->P1 mapping |
| **Global heap** | ✅ Ready | 8MB bump allocator |
| **Descriptor memory model** | ⏳ Not Started | Planned |
| **Processes and spaces** | ⏳ Not Started | No IPC |
| **Memory syscalls** | ⏳ Not Started | allocate/clone/transfer |
| **Weak references** | ⏳ Not Started | borrow/release |
| **Process auto-cleanup** | ⏳ Not Started | On exit |
## Development Plan (TODO)
@@ -147,6 +154,7 @@ make run KARCH=aarch64
**Logs are output to QEMU console.** Panic output via serial port (COM1).
**Useful QEMU options:**
```bash
# Serial port for logs
make run QEMU_FLAGS="-serial stdio"
@@ -156,15 +164,17 @@ make run QEMU_FLAGS="-s -S"
```
**Cleanup:**
```bash
make clean # Remove all artifacts
make distclean # + git clean
```
## Links
## Links
- Original Repository: https://git.inotfail.com/INotFail/Elyz
- Related projects:
- Original template with bootloader: https://github.com/jasondyoungberg/limine-rust-template
- Original template with bootloader: https://github.com/jasondyoungberg/limine-rust-template

View File

@@ -1,5 +1,5 @@
[package]
name = "RINA"
name = "LISA"
version = "0.1.0"
edition = "2024"

View File

@@ -45,9 +45,9 @@ impl DrawTarget for FramebufferDisplay<'_> {
for Pixel(coord, color) in pixels {
if coord.x >= 0 && coord.x < self.framebuffer.width() as i32 &&
coord.y >= 0 && coord.y < self.framebuffer.height() as i32 {
let offset = (coord.y as usize * self.framebuffer.pitch() as usize) + (coord.x as usize * 4);
unsafe {
self.framebuffer.addr().add(offset).cast::<u32>().write(color.into_storage());
}
@@ -76,7 +76,7 @@ impl<'a> Console<'a> {
Self { display, x: 10, y: 20, current_color: Rgb888::WHITE }
}
pub fn set_color(&mut self, color: Rgb888) {
pub fn set_color(&mut self, color: Rgb888) {
self.current_color = color;
}
@@ -94,7 +94,7 @@ impl<'a> Console<'a> {
let fb = self.display.framebuffer;
let pitch = fb.pitch() as usize;
let height = fb.height() as usize;
let font_height = 10;
let font_height = 10;
let shift = font_height * pitch;
unsafe {
@@ -123,7 +123,7 @@ impl fmt::Write for Console<'_> {
let mut buf = [0u8; 4];
let s_char = c.encode_utf8(&mut buf);
let _ = Text::new(s_char, Point::new(self.x, self.y), style).draw(&mut self.display);
self.x += 6;
}
@@ -172,7 +172,7 @@ unsafe extern "C" fn kmain() -> ! {
let mut console = Console::new(FramebufferDisplay { framebuffer: &fb });
console.clear();
info!(console, "BOOT", "RINA Kernel Starting...");
info!(console, "BOOT", "LISA Kernel Starting...");
unsafe { mem::pmm::BitmapPMM::init(&mmap_res, hhdm_offset); }
info!(console, "MEM", "Physical Memory Manager initialized.");
@@ -210,7 +210,7 @@ unsafe extern "C" fn kmain() -> ! {
}
info!(console, "HEAP", "Global Allocator is online.");
let root_cnode = cap::CNode::new(256);
if let Some(frame) = mem::pmm::alloc_frame() {
@@ -220,13 +220,13 @@ unsafe extern "C" fn kmain() -> ! {
relation: Relation::Strong,
token_sig: 0x1,
};
root_cnode.insert(0, mem_cap).unwrap();
info!(console, "CAP", "Root capability created at slot 0");
}
root_cnode.mint(0, 10, Relation::Borrow, CapRights::READ | CapRights::WRITE).unwrap();
if let Some(c) = root_cnode.get_cap(10) {
info!(console, "CAP", "Slot 10 (Borrowed): {:?}", c.relation);
}
@@ -238,23 +238,23 @@ unsafe extern "C" fn kmain() -> ! {
}
}
let logo = r#"
###########
##################
###### ######
##### #####
#### ##### ####
#### ### ###### ####
###########
##################
###### ######
##### #####
#### ##### ####
#### ### ###### ####
#### #### #### ####
#### #### ### ####
#### ### ## ### ####
#### ######## #### ####
#### #### #### ####
#### ###### ### ####
#### ####### ####
##### #####
###### ######
##################
############
#### ###### ### ####
#### ####### ####
##### #####
###### ######
##################
############
"#;
let _ = writeln!(console, "{}", logo);