Giter Site home page Giter Site logo

rust_os's Introduction

D7 operating system build status

Operating system for modern x86-64 computers, written in Rust.

Current features:

  • Multitasking: tickless event-driven round-robin scheduler
  • Executable programs, in ELF format
  • IPC: PubSub messaging and named pipes
  • Keyboard input
  • Virtual TTYs
  • Disk IO:
    • ATA PIO
    • VirtIO-blk (Read only)
  • Networking:
    • Drivers for NE2000 and RTL8139
    • IPv4 stack, supporting TCP, UDP, DNS, DHCP, ARP
  • Services
    • Serviced - startup and service status queries
    • Netd - Manages network interfaces and sockets

Roadmap items:

  • Shell
  • Virtual filesystem
  • Automated test suite
  • Porting software
    • Shell utilities
    • Text editor
    • Compilers
    • Self-hosting
  • (Better) support for...
    • Filesystems:
      • ramfs
      • ext2
      • some network filesystem, possibly a custom one
    • NICs:
      • Intel E1000 driver
      • VirtIO-net driver
    • USB and Audio devices

Development

This is a learning project. Currently code contributions are not accepted, as I'd like to learn to fix the problems myself. Forking the project is of course possible, if you'd like to develop something based on this. Feel free to submit issues on GitHub if you find any bugs.

Compiling and Running

The project is using Vagrant to virtualize the building environment. While being a little slower, this means that building the system on any supported platform should Just Work™. If you have a Unix-like system, install Qemu and

git clone https://github.com/Dentosal/rust_os.git && cd rust_os && ./autobuild.sh -ug

Sometimes shared folder feature will not work, and you get an error message about missing /vagrant etc. In that case installing vbguest plugin should help:

vagrant plugin install vagrant-vbguest

If you don't have a Unix-like system, then you should probably get one, they are pretty awesome compared to old DOS systems or Dentosal/rust_os. However, building on WSL is also possible. Just install the required tools (see Vagrantfile), and the run ./autobuild.sh -n

Dependencies

Building with default automated build system required that Vagrant is installed. I use VirtualBox as my Vagrant provider, but other providers should work as well.

Vagrant isn't actually required: on systems with apt, like Debian or Ubuntu, it should be reasonably easy to just install the dependencies by hand. The install script can be found from Vagrantfile.

You will also need a virtual machine. Qemu is suggested, but Bochs should work as well. VirtualBox can also be used, but the project isn't actively tested with it. Moreover, you must run it yourself.

Actually running

With Qemu and Vagrant installed, run ./autobuild.sh -ug. With Bochs: ./autobuild.sh -ugb. To use VirtualBox, run ./autobuild.sh -ugv.

Local development without Vagrant

cargo fmt && ./autobuild.sh

License

This project is licensed under the MIT license, which can be found in the file called LICENSE.

rust_os's People

Contributors

dentosal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rust_os's Issues

Process from queue not running

Relevant log lines:

d7os::syscall                            TRACE  [pid=       2] exit
d7os::syscall                            TRACE  [pid=       2] => Terminate(Completed(1))
d7os::multitasking::scheduler            INFO   Stopping pid 2 with status Completed(1)
d7os::multitasking::queues               TRACE  on_process_over ProcessId(2)
d7os::multitasking::queues               TRACE  wakeup ProcessId(1)
d7os::multitasking::fd_wait_flag         TRACE  set_available trigger ExplicitEventId(6)
d7os::syscall                            TRACE  [pid=       1] fd_select
d7os::syscall                            TRACE  fd_select n=3 blocking=true
d7os::syscall                            TRACE  [pid=       1] => Continue(Err(9))
d7os::syscall                            TRACE  [pid=       1] debug_print
d7os::syscall::PROCESS_OUTPUT            INFO   [pid=       1] Error: file 'src/lib.rs', line 191
d7os::syscall                            TRACE  [pid=       1] => Continue(Ok(0))
d7os::syscall                            TRACE  [pid=       1] debug_print
d7os::syscall::PROCESS_OUTPUT            INFO   [pid=       1]   Unhandled error in select!: fs_file_destroyed
d7os::syscall                            TRACE  [pid=       1] => Continue(Ok(0))
d7os::syscall                            TRACE  [pid=       1] exit
d7os::syscall                            TRACE  [pid=       1] => Terminate(Completed(1))
d7os::multitasking::scheduler            INFO   Stopping pid 1 with status Completed(1)
d7os::multitasking::queues               TRACE  on_process_over ProcessId(1)
d7os::multitasking::scheduler            INFO   Stopping pid 3 with status Failed(ChainedTermination)
d7os::multitasking::scheduler            INFO    [system call was pending]
d7os::multitasking::queues               TRACE  on_process_over ProcessId(3)
d7os::interrupt::handler                 TRACE  Setting processor to idle state
d7os::interrupt::handler                 TRACE  Triggering free IRQ int=2b
d7os::driver::nic::rtl8139               INFO   IRQ status=RXOK
d7os::driver::nic::rtl8139               INFO   rx ready
d7os::driver::nic::rtl8139               DEBUG  receive status: PHYSICAL_MATCH | OK
d7os::interrupt::handler                 TRACE  Triggering free IRQ int=2b
d7os::driver::nic::rtl8139               INFO   IRQ status=RXOK
d7os::driver::nic::rtl8139               INFO   rx ready
d7os::driver::nic::rtl8139               DEBUG  receive status: PHYSICAL_MATCH | OK
d7os::interrupt::handler                 TRACE  Triggering free IRQ int=2b
d7os::driver::nic::rtl8139               INFO   IRQ status=RXOK
d7os::driver::nic::rtl8139               INFO   rx ready
d7os::driver::nic::rtl8139               DEBUG  receive status: PHYSICAL_MATCH | OK
d7os::driver::keyboard                   TRACE  KeyboardEvent { release: false, keycode: 6, timestamp: TimeSpec { sec: 44, nsec: 404205117 } }
d7os::multitasking::queues               TRACE  on_explicit_event ExplicitEventId(8)
d7os::multitasking::queues               TRACE  wakeup ProcessId(3)
d7os                                     ERROR
Kernel Panic: file: 'src/multitasking/scheduler.rs', line: 168
d7os                                     ERROR    Process from queue not running

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.