File size: 9,544 Bytes
d92aab9 e6fd548 9bfedc6 e6fd548 9bfedc6 e6fd548 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | ---
license: mit
tags:
- operating-system
- uefi
- rust
- bare-metal
- microkernel
---
# VyshOS - Bare-Metal UEFI Microkernel & Graphical OS in Rust
> ### πΏ [**DOWNLOAD BOOTABLE ISO: `Micro-OS.iso` (4.48 MB)**](https://huggingface.co/vyshnavi511/Micro-OS/resolve/main/Micro-OS.iso)
> **Direct Download from Hugging Face:** Click above to download the bootable ISO file directly to your laptop! Ready to run in Oracle VirtualBox, VMware, QEMU, or write to a USB drive with Rufus.
A standalone, bare-metal 64-bit UEFI graphical operating system written completely in Rust (`no_std`). VyshOS boots directly from UEFI firmware, initializes a 1080p high-resolution linear framebuffer via UEFI GOP, interacts directly with x86 hardware I/O ports, and provides a multi-tasking graphical desktop environment with interactive applications and smooth touchpad/mousepad integration.
---
## π Academic Information
- **Author:** Yeddula Vyshnavi
- **USN:** `25BTRCL294` (Section `E`)
- **Institution:** JAIN (Deemed-to-be University), Faculty of Engineering and Technology (FET Campus)
- **Course:** `25PCCS201: Operating Systems`
---
## π Key Features & Architecture
### 1. Bare-Metal UEFI Runtime (`x86_64-unknown-uefi`)
- Completely freestanding `#![no_std]` and `#![no_main]` Rust implementation.
- Directly invokes UEFI Boot Services and Runtime Services via native EFI ABI function pointers.
- Queries and sets the highest supported display mode (1920Γ1080 Full HD) via UEFI Graphics Output Protocol (GOP).
### 2. Native x86 Hardware PS/2 Mouse & Touchpad Driver
- Direct inline assembly communication (`in al, dx` and `out dx, al`) with the motherboard 8042 PS/2 controller at I/O ports `0x60` and `0x64`.
- Decodes 3-byte standard mouse packets for `(dx, dy)` movement and left/right clicks.
- Compatible with VirtualBox `--mouse ps2` and physical laptop touchpads.
### 3. Flicker-Free Dirty-Rect Hardware Cursor Buffer
- Employs a dedicated `MouseCursorBuffer` (saving/restoring 256 pixels) under a high-visibility 16Γ16 arrow pointer.
- Eliminates 100% of display tearing, smearing, and screen flicker by repainting only the cursor region during motion rather than redrawing the 2-million-pixel desktop background.
### 4. Real-Time Hardware Clock (RTC)
- Synchronizes time and date directly with the PC hardware CMOS / UEFI Runtime Services `GetTime`.
- Dynamically updates the taskbar clock every minute without UI freezing.
### 5. Built-in Desktop Applications
- **Interactive Shell (`vysh-sh`)**: An interactive command-line terminal supporting real keyboard typing, command history, and utilities:
- `help` - List available commands
- `wifi scan` & `wifi connect` - Wireless network discovery and hotspot tethering
- `wifi status` & `ping` - Network diagnostics
- `ipconfig` - Network adapter details
- `whoami` - Student and college credentials
- `ls` / `dir` - Virtual file directory
- `time` & `date` - Hardware RTC clock readout
- `uname -a` - Microkernel architecture info
- `clear` - Clear terminal screen
- **Scientific Calculator**: Full 4-function mathematical engine with interactive on-screen click buttons and physical number pad support.
- **Wi-Fi Hotspot Center**: 802.11 network management with one-click hotspot connection.
- **Laptop / This PC**: Hardware diagnostics and CPU/RAM resource overview.
- **Settings**: System configuration and workstation preferences.
- **Research Paper Viewer**: Operating system scheduling and microkernel architecture paper.
---
## πΏ Bootable ISO & Virtual Machine Images
You can download the bootable image directly from this repository to test or install Micro-OS:
- πΏ [**Download Bootable UEFI ISO (`Micro-OS.iso`)**](Micro-OS.iso) *(4.48 MB - Bootable on VirtualBox, VMware, QEMU, Rufus, or physical UEFI PCs)*
- π» **VirtualBox VDI:** Built automatically using `cargo run --bin builder` to output `kernel.vdi`.
---
## π Repository Structure
```
uefi_kernel/
βββ .gitignore # Ignores build artifacts and disk images
βββ Cargo.toml # Rust package manifest
βββ Cargo.lock # Dependency lockfile
βββ README.md # Project documentation
βββ Micro-OS.iso # Bootable UEFI Hybrid ISO (4.48 MB)
βββ ISO/ # Dedicated bootable ISO directory
β βββ Micro-OS.iso
βββ build_iso.py # Automated UEFI ISO builder (El Torito + FAT16)
βββ push_to_hf.py # One-click Hugging Face repository uploader
βββ 25BTRCL294_Y_Vyshnavi_Linux.pdf # Linux Systems Engineering Empirical Report
βββ 25BTRCL294_Y.VYSHNAVI_investigation_report.pdf # OS Investigation & CPU Scheduling Research
βββ 25BTRCL294_Y.VYSHNAVI_research_writeup.pdf # Workload-Aware Scheduling Research Paper
βββ 25BTRCL294_Y.VYSHNAVI_lab report.pdf # Comprehensive OS Laboratory Report
βββ docs/ # Academic reports folder
β βββ 25BTRCL294_Y_Vyshnavi_Linux.pdf
β βββ 25BTRCL294_Y.VYSHNAVI_investigation_report.pdf
β βββ 25BTRCL294_Y.VYSHNAVI_research_writeup.pdf
β βββ 25BTRCL294_Y.VYSHNAVI_lab report.pdf
βββ src/
βββ main.rs # Complete microkernel, GOP graphics, drivers, & apps
βββ bin/
βββ builder.rs # Disk builder: creates FAT16 EFI partition, VDI image, & ISO
```
---
## π Academic Research Papers & Continuous Assessment Reports
All reports submitted by the author (**Yeddula Vyshnavi**, USN: **25BTRCL294**, Section E, JAIN FET Campus) are included directly in the repository:
- π [**25BTRCL294_Y_Vyshnavi_Linux.pdf**](25BTRCL294_Y_Vyshnavi_Linux.pdf)
*Investigating the Impact of Workload Characteristics on CPU Scheduling Policy Selection: A Linux Systems Engineering Empirical Study* (CA-5 Report, 27 pages).
- π [**25BTRCL294_Y.VYSHNAVI_investigation_report.pdf**](25BTRCL294_Y.VYSHNAVI_investigation_report.pdf)
*Workload-Aware Scheduling: Can Workload Characteristics Be Used to Select a More Suitable CPU Scheduling Strategy?* (CA-4 Investigation Report).
- π [**25BTRCL294_Y.VYSHNAVI_research_writeup.pdf**](25BTRCL294_Y.VYSHNAVI_research_writeup.pdf)
*OS Continuous Assessment Extended Research Writeup: Empirical CPU Scheduling Simulation & Policy Selection.*
- π [**25BTRCL294_Y.VYSHNAVI_lab report.pdf**](<25BTRCL294_Y.VYSHNAVI_lab report.pdf>)
*Comprehensive Operating Systems Laboratory Report and Practical Implementations (12.4 MB).*
- π [**25BTRCL294_Yeddula_Vyshnavi Design_Debugging.pdf**](<25BTRCL294_Yeddula_Vyshnavi Design_Debugging.pdf>)
*Continuous Assessment CA-3: Design & Debugging Analysis Report (409 KB).*
---
## π οΈ How to Build and Run
### Prerequisites
1. **Rust Toolchain:**
```bash
rustup target add x86_64-unknown-uefi
```
2. **Oracle VM VirtualBox:**
Installed at default location (`C:\Program Files\Oracle\VirtualBox\VBoxManage.exe`).
### Step 1: Compile the UEFI Kernel
```bash
cargo build --target x86_64-unknown-uefi
```
This compiles the kernel binary to `target/x86_64-unknown-uefi/debug/uefi_kernel.efi`.
### Step 2: Build the VirtualBox Disk Image (`kernel.vdi`)
```bash
cargo run --bin builder
```
The builder tool:
1. Creates a 32 MB disk image (`disk.img`).
2. Formats an MBR partition table with an EFI System Partition (FAT16).
3. Copies `uefi_kernel.efi` to `\EFI\BOOT\BOOTX64.EFI`.
4. Automatically calls `VBoxManage convertfromraw` to produce `kernel.vdi`.
### Step 3: Run in Oracle VirtualBox (Using ISO or VDI)
#### Option A: Booting from `Micro-OS.iso`
1. Open **Oracle VM VirtualBox** and create a new VM:
- **Type:** Other
- **Version:** Other/Unknown (64-bit)
- **RAM:** 512 MB or 1024 MB
2. In **Settings -> System**:
- Check **Enable EFI (special OSes only)**
- Set **Pointing Device:** PS/2 Mouse (or USB Tablet)
3. In **Settings -> Storage**:
- Attach `Micro-OS.iso` to the Optical Drive (SATA / IDE Controller).
4. Click **Start** to boot Micro-OS directly from the ISO!
#### Option B: Booting from `kernel.vdi`
1. Follow the steps above, but attach `kernel.vdi` to the SATA Hard Disk controller.
2. Click **Start**.
---
## π€ Hugging Face Repository
Micro-OS and its bootable ISO image are also hosted on Hugging Face:
- π **Hugging Face Model Page:** [**https://huggingface.co/vyshnavi511/Micro-OS**](https://huggingface.co/vyshnavi511/Micro-OS)
- πΏ **Direct ISO Download from Hugging Face:** [https://huggingface.co/vyshnavi511/Micro-OS/resolve/main/Micro-OS.iso](https://huggingface.co/vyshnavi511/Micro-OS/resolve/main/Micro-OS.iso)
---
## β¨οΈ Desktop Shortcuts
- **`[T]`**: Open Terminal (`vysh-sh`)
- **`[C]`**: Open Calculator
- **`[W]`**: Open Wi-Fi Center
- **`[L]`**: Open Laptop / This PC
- **`[S]`**: Open Settings
- **`[R]`**: Open Research Paper
- **`[Esc]`**: Close active window
- **`[Tab]`**: Toggle Start Menu
- **`[Arrow Keys]`**: Move mouse pointer (backup to touchpad)
- **`[Space]`**: Click under cursor
|