Aero is a new modern, unix based operating system. It is being developed for educational purposes.

Overview

Areo

Aero is a new modern, unix based operating system written in Rust and is being developed for educational purposes. Aero follows the monolithic kernel design and it is inspired by the Linux Kernel and the Zircon Kernel.

Please make sure you use the latest nightly of rustc before building Aero.

workflow lines_of_code

Screenshots

Roadmap March - April 2021

  • Global Descriptor Table
  • Interrupt Descriptor Table
  • Programmable Interval Timer
  • Paging
  • Mouse Interrupts
  • Keyboard Interrupts
  • ACPI Tables
  • Syscalls Handler
  • PCI Driver
  • SATA Drive Detect

Building Aero

Prerequisites

  • The nightly rust compiler.
  • Any release of qemu (using the latest release is recommended).

Build

To build and run aero:

$ cargo run

Contributing

Contributions are absolutely, positively welcome and encouraged! Check out CONTRIBUTING.md for the contributing guidelines for aero.

Comments
  • Fast IPC

    Fast IPC

    Inter Process Communication should be fast and effective. The performance of IPC is vital for modern operating systems. Here is an overview of how we can accomplish this in Aero:

    1. Each task will have its own message queue that contains pending messages.
    2. The message will contain the sender's PID and TID with data (&[u8]). It will aswell contain a message ID (usize) used to identify the message without needing to parse the message itself.
    3. Using the sys_ipc_send and sys_ipc_get system calls the tasks can communicate with each other efficiently.

    Drawbacks

    This would require the kernel to clone the message 2 times (when you send the message the kernel keeps a copy of the message and for the task that we are sending to has to clone it again)

    enhancement C-kernel 
    opened by Andy-Python-Programmer 10
  • README: make it look look less sus

    README: make it look look less sus

    Some people may be sussed out by the amount of links to rick astley's wikipedia page and think its a rick roll. I removed a couple links so no one gets confused.

    opened by ghost 7
  • cpu '0' panicked at 'pmm: frame allocator not initialized'

    cpu '0' panicked at 'pmm: frame allocator not initialized'

    When running lua or tcc with a full sysroot it returns:

      ERROR        cpu '0' panicked at 'pmm: frame allocator not initialized'
      ERROR        aero_kernel/src/mem/paging/frame.rs:159:14
      ERROR        
      TRACE        ---------------------------------- BACKTRACE -----------------------------------
      TRACE         0: 0xffffffff8023e464 - rust_begin_unwind
      TRACE         1: 0xffffffff8025f5af - core::panicking::panic_fmt::h86713eebd88b31bf
      TRACE         2: 0xffffffff8026013b - core::panicking::panic_display::h705ec34ecff6e0dc
      TRACE         3: 0xffffffff802600ec - core::panicking::panic_str::hcce4f9aa570a143f
      TRACE         4: 0xffffffff802600c9 - core::option::expect_failed::h923bd113315aae1c
      TRACE         5: 0xffffffff80224102 - aero_kernel::mem::paging::frame::pmm_alloc::hd1efec97d53fb599
      TRACE         6: 0xffffffff8020ac7b - aero_kernel::userland::vm::Vm::handle_page_fault::habab6a5757c2c843
      TRACE         7: 0xffffffff8022dcb4 - __interrupt_page_fault
      TRACE         8: 0xffffffff80228d12 - page_fault
      TRACE         9: 0x0000750000001f75 - <unknown>
      TRACE        10: 0x0000750000001836 - <unknown>
      TRACE        11: 0x0000750000001250 - <unknown>
      TRACE        12: 0x000075000000ae8d - <unknown>
      TRACE        13: 0x0000750000008c4c - <unknown>
      TRACE        14: 0x00007500000140df - <unknown>
      TRACE        15: 0x0000000000000019 - <unknown>
      TRACE        16: <guard page>
    

    Is there a fix for this issue?

    bug C-kernel 
    opened by YusufKhan-gamedev 7
  • Implement and document dependency auto-install script

    Implement and document dependency auto-install script

    The script automatically detects package manager, reads aero's sysroot dependency list from a file for said package manager, and installs said dependencies from the list.

    opened by amada95 6
  • Page Fault: Accessed Address: 0x0

    Page Fault: Accessed Address: 0x0

    When trying to run bash(and other programs but I cant reproduce them consistently) it returns: ERROR EXCEPTION: Page Fault ERROR ERROR Accessed Address: 0x0 ERROR Error: USER_MODE | INSTRUCTION_FETCH ERROR ERROR Task Info: TID=6, PID=6 ERROR Stack: InterruptErrorStack { code: 0x14, stack: InterruptStack { preserved: PreservedRegisters { r15: 0x1, r14: 0x1, r13: 0x2d, r12: 0x7fffffffdffb, rbp: 0x7fffffffdcd0, rbx: 0x0, }, scratch: ScratchRegisters { r11: 0x216, r10: 0x9, r9: 0x0, r8: 0x1, rsi: 0x4ccc75, rdi: 0x4cd05c, rdx: 0x62, rcx: 0x469c50, rax: 0x0, }, iret: IretRegisters { rip: 0x0, cs: 0x33, rflags: 0x246, rsp: 0x7fffffffdc58, ss: 0x2b, }, }, } TRACE ---------------------------------- BACKTRACE ----------------------------------- TRACE 0: 0xffffffff8022e07e - __interrupt_page_fault TRACE 1: 0xffffffff80228d12 - page_fault TRACE 2: 0x000000000040643f - <unknown> TRACE 3: 0x0000000000404e69 - <unknown> TRACE 4: 0x0000000041430d67 - <unknown> TRACE 5: 0x0000000000405cc7 - <unknown> Also maybe a userland process shouldn't cause a kernel panic by accessing kernel memory....

    C-kernel 
    opened by YusufKhan-gamedev 6
  • Inter-process communication support

    Inter-process communication support

    This pull request aims to bring an easy way for processes to communicate with each other using dedicated system calls. There is still a lot of work to do, but it's something we can work upon.

    The current system works in following way, there are 2 system calls available:

    • sys_ipc_send(target_pid, *buffer, flags);
    • sys_ipc_recv(*buffer, *sender, *length, flags);

    The sys_ipc_send system call should always succeed, there aren't any planned error paths (for now at least). It will return the message ID assigned to the sent message.

    The sys_ipc_recv system call will return the received message ID, the sender's PID will be written to the *sender argument and the message payload length will be written to the *length argument. Possible flags include NO_WAIT which makes the system call return with an error code ENOMSG if there aren't any messages in the message queue instead of waiting, and TRUNCATE which will truncate the payload if it's too big to fit in the buffer. By default the system call will return E2BIG and put the message back into the queue if it won't fit in provided buffer.

    opened by czapek1337 5
  • drm: change the name of rawfb to simpledrm

    drm: change the name of rawfb to simpledrm

    In the case of a program or library that checks for the simpledrm driver from linux change the name of rawfb to simpledrm to accommodate it.

    Signed-off-by: Yusuf Khan [email protected]

    opened by ghost 4
  • Make /bin the main exec dir(Pull Request, (This title used to include a rant with crass language)

    Make /bin the main exec dir(Pull Request, (This title used to include a rant with crass language)

    https://github.com/YusufKhan-gamedev/uwux/commit/602904b5a602985db608753b4bd1364cc3895612

    HERE! I spent an hour finding how to pr in github and here it is! Also, maybe create gitlab mirror? Sorry for my crass language im extremely angry.

    opened by YusufKhan-gamedev 4
  • kernel: Implement a syscall proc macro

    kernel: Implement a syscall proc macro

    This patch introduces a procedural macro that takes care of validating input buffers and paths automagically for us :^) There is still a bit of clean up to do, but for the most part it does what it's supposed to be doing.

    opened by czapek1337 3
  • Refactor the build system

    Refactor the build system

    This pull request reimplements the existing build system, but as a Python script. This will allow us for more flexibility and faster clean builds, because we no longer have to compile dozen of Rust crates. This PR also changes the distribution format of aero to ISO images, rather than raw disk images. That allows a single image to be used for both legacy and UEFI targets, as well as support for all major storage medium: optical disks, hard disks and removable media.

    • [x] Build the kernel and userland
    • [x] Create an initramfs image (CPIO)
    • [x] Package the kernel and userland in an ISO image
    • [x] Run the OS in an emulator
    • [x] Support for running tests
    • [x] Continuous integration support
    opened by czapek1337 3
  • patch xf86-input-keyboard:Falling back to patching base and 3-way merge...

    patch xf86-input-keyboard:Falling back to patching base and 3-way merge...

    My OS is Debian 11, when i run ./aero.py --sysroot, I encountered the error:

    xbstrap: fetch xf86-input-keyboard [59/71]
    Initialized empty Git repository in /home/szx/Code/os/aero/bundled/xf86-input-keyboard/.git/
    remote: Enumerating objects: 28, done.
    remote: Counting objects: 100% (28/28), done.
    remote: Compressing objects: 100% (28/28), done.
    remote: Total 28 (delta 3), reused 9 (delta 0), pack-reused 0
    Unpacking objects: 100% (28/28), 51.90 KiB | 208.00 KiB/s, done.
    From https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard
     * [new tag]         xf86-input-keyboard-1.9.0 -> xf86-input-keyboard-1.9.0
    xbstrap: checkout xf86-input-keyboard [60/71]
    HEAD is now at 0c7f512 keyboard 1.9.0
    xbstrap: patch xf86-input-keyboard [61/71]
    Applying: keydev: aero specific changes
    Applying: keydev: aero specific changes
    Using index info to reconstruct a base tree...
    M       .gitignore
    M       configure.ac
    M       src/Makefile.am
    .git/rebase-apply/patch:100: trailing whitespace.
    static int KbdOn(InputInfoPtr pInfo, int what) { 
    .git/rebase-apply/patch:101: trailing whitespace.
        return Success;  
    .git/rebase-apply/patch:105: trailing whitespace.
        printf("aero::kbdOff: is a stub!\n"); 
    .git/rebase-apply/patch:167: trailing whitespace.
    Bool xf86OSKbdPreInit(InputInfoPtr pInfo) { 
    warning: 4 lines add whitespace errors.
    Falling back to patching base and 3-way merge...
    CONFLICT (add/add): Merge conflict in src/aero_kbd.c
    Auto-merging src/aero_kbd.c
    error: Failed to merge in the changes.
    Patch failed at 0001 keydev: aero specific changes
    hint: Use 'git am --show-current-patch=diff' to see the failed patch
    When you have resolved this problem, run "git am --continue".
    If you prefer to skip this patch, run "git am --skip" instead.
    To restore the original branch and stop patching, run "git am --abort".
    xbstrap: Action patch of source xf86-input-keyboard failed
    
    
    C-xbstrap 
    opened by shzhxh 2
  • host-cargo not built as a part of the sysroot

    host-cargo not built as a part of the sysroot

    My OS is Debian 11, when I run ./aero.py , I encountered the following error:

    error: host-cargo not built as a part of the sysroot, skipping compilation of `userland/`
    
    C-build 
    opened by shzhxh 5
  • Build script throwing subprocess

    Build script throwing subprocess "Exec format error"

    Hello! There's a bit of an issue with the build process, and the way the bundled cargo is called from aero.py seems to disagree with subprocess on my system for some reason.

    Results of ./aero.py --test:

    Traceback (most recent call last):
      File "/Users/<name>/Documents/Programming/aero/./aero.py", line 665, in <module>
        main()
      File "/Users/<name>/Documents/Programming/aero/./aero.py", line 644, in main
        user_bins = build_userland(args)
      File "/Users/<name>/Documents/Programming/aero/./aero.py", line 371, in build_userland
        return build_cargo_workspace('userland', 'build', ['--package', 'utest', *cmd_args], get_cargo())
      File "/Users/<name>/Documents/Programming/aero/./aero.py", line 261, in build_cargo_workspace
        code, _, _ = run_command([cargo, command, *args], cwd=cwd)
      File "/Users/cat/Documents/Programming/aero/./aero.py", line 223, in run_command
        output = subprocess.run(args, **kwargs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    OSError: [Errno 8] Exec format error: '../bundled/host-rust-prebuilt/aero/host-cargo/bin/cargo'
    
    • python3 --version: Python 3.9.6
    • Host Operating System: macOS Ventura 13.0
    • Host Architecture: aarch64-darwin

    note: I'm well aware aarch64-darwin isn't officially supported, but it's one of the few (if not the only) mainstream consumer platform using the aarch64 architecture, and at least the only aarch64-based device I have access to for testing.

    opened by amada95 5
  • replace aero.py with rusty build system

    replace aero.py with rusty build system

    this implementation will hopefully be faster and more maintainable

    important things:

    • [ ] building aero
    • [ ] running qemu
    • [ ] updating ci commands
    • [ ] updating env commands (gitpod & codespaces)
    • [ ] optimisation
    • [ ] rust documentation
    • [ ] implementing latest features in aero_build from aero.py

    note to self: don't forget to add a comment referencing this gist to the logging functions.

    opened by jwpjrdev 12
  • Add and enable several x86_64 security features

    Add and enable several x86_64 security features

    This PR aims to implement support for SMAP, SMEP and UMIP, and is provided as a draft so that my non existent rust skills can be reviewed already. It also enables bit 16 in CR0 for more write protection. As this is a draft, not everything is implemented or working yet, but on SMAP capable systems, aero_shell runs with SMAP and ls is working.

    opened by Dennisbonke 1
A hobby operating system written in Zig & C that reimagines classic UNIX ideas for modern technology

zorroOS is a hobby operating system written in Zig, currently targeting x86_64 PCs. Building Building zorroOS is simple. First, ensure that you have t

TalonFox 34 Jul 5, 2023
A lightweight microkernel/IPC based operating system built with Rust which is not a clone of any existing operating system

Noble Operating System Noble is a lightweight microkernel and IPC based operating system built with Rust which is not a clone of any existing operatin

Revolution Xenon 3 Jan 10, 2022
The Operating System built for modern humans!

What is QuantumOS? Quantum OS is a continuation project of my ever loving joy for operating system development. I started with a project called Fluxed

Main Menu 11 Dec 31, 2022
A new operating system kernel with Linux binary compatibility written in Rust.

Kerla Kerla is a monolithic operating system kernel from scratch in Rust which aims to be compatible with the Linux ABI, that is, runs Linux binaries

Seiya Nuta 3.1k Jan 1, 2023
Writing an OS in Rust, To Study Operating System and Computer System

Hun Os Writing an OS in Rust, To Study Operating System and Computer System Reference Os Written In Rust https://github.com/seonghun-dev/blog_os https

Jung Seonghun 2 Dec 15, 2022
A secure embedded operating system for microcontrollers

Tock is an embedded operating system designed for running multiple concurrent, mutually distrustful applications on Cortex-M and RISC-V based embedded

Tock Embedded OS 4.1k Jan 5, 2023
A secure embedded operating system for microcontrollers

Tock is an embedded operating system designed for running multiple concurrent, mutually distrustful applications on Cortex-M and RISC-V based embedded

Tock Embedded OS 4k Jan 2, 2023
A hobby operating system, in Rust

intermezzOS: kernel intermezzOS is a hobby operating system. This repository is for its kernel. See the website for more. License This project is dual

intermezzOS 1.3k Jan 1, 2023
The Stupid Operating System

Stupid Operating System SOS is a simple, tiny toy OS implemented in Rust. I'm writing this mostly for fun, to learn more about OS design and kernel ha

SOS 241 Dec 15, 2022
Operating system written in Rust for NumWorks calculator (model n0110)

RustWorks An OS (eventually) for the Numworks calculator (model n0110). Setup First install Rust by following these instuctions then: rustup target ad

null 30 Nov 10, 2022
The official kernel for Popcorn OS, and operating system designed for handheld devices.

About Popkern is the kernel for Popcorn OS, an operating system designed for handheld devices. As such, the kernel is (to be) optimised at all levels

Team Scena 3 Sep 19, 2021
Geng wanzheng ([a] more complete) asynchronous operating system

更完整系统(GWZOS) 更完整系统的目的是编写一个异步功能完整的异步操作系统。我们希望尽可能完整地实现异步内核的核心概念,提供相应的驱动、软件生态系统,为未来内核的设计探索可能的实现方案。对比不同解决方案的性能开销,得到较详细的内核验证结论。 感谢大家对项目的支持!接龙链接 设计文档请参考: 无相

Luo Jia 10 Aug 26, 2021
SteinsOS is an operating system written in Rust

SteinsOS is an operating system featuring non-preemptive kernel targeting on single-core armv8 architecture.

Sheng 84 Dec 15, 2022
Xrs is a POSIX-subset operating system kernel written in Rust.

XRS-OS ( ?? WIP) Xrs is a POSIX-subset operating system kernel written in Rust. Current project team members 0x5459 core developer (he/him) 0x5457 cor

null 7 Nov 16, 2022
A simples rust operating system that prints hello world.

rust-os-helloworld A simples rust operating system that prints hello world. Just run: cargo install bootimage and: cargo bootimage Install QEMU and: q

null 3 Nov 24, 2021
An attempt at an operating system written in Rust

Rust Operating System An attempt at a simple operating system in Rust and a semester project for the Operating Systems course at CS@UCU. Documentation

Andriy Sultanov 10 Jan 15, 2022
A small operating system, for my own learning

taos This project is the result of following Philipp Oppermann's series of tutorials in building a small operating system kernel targeting x86-64, alo

null 0 Nov 7, 2021
Cute tiny operating system for RISC-V. ฅ•ω•ฅ

MoeOS ⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄ ٩(^ᴗ^)۶欢迎参观MoeOS的仓库,MoeOS是一个小巧可爱(并不)的操作系统,目前全力支持RISC-V中。 (*≧▽≦)因为还只是一个玩具操作系统,就别要求她能做太多事情啦!现在功能还不完善,会慢慢加的! 编译 呐,你想给我找个家么? 目前MoeOS

Rui Li 30 Nov 11, 2022
Rux - An x86_64 toy operating system kernel written in Rust

Rux - An x86_64 toy operating system kernel written in Rust. Rux is a port of the Hux kernel, my x86 32-bit single-CPU toy kernel written in C, following the OSTEP book structure and terminology.

Guanzhou Jose Hu 6 Feb 26, 2022