A hobby operating system, in Rust

Overview

intermezzOS: kernel

Build Status Build status

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

License

This project is dual licensed under Apache2/MIT. See the two LICENSE-* files for details.

Code of conduct

The intermezzOS project has a Code of Conduct, please observe it.

Comments
  • Install all dependencies on macOS using Homebrew

    Install all dependencies on macOS using Homebrew

    Closes #53.

    This PR adds a Brewfile which, when used with Homebrew's brew bundle command, will install all the tools needed to build intermezzOS. I've also updated the documentation to match.

    opened by hawkw 22
  • `cargo test` doesn't work

    `cargo test` doesn't work

    error: linking with `cc` failed: exit code: 1
      |
      = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/intermezzos-f72332709373820b.0.o" "-o" "/home/steve/src/intermezzOS/kernel/target/debug/deps/intermezzos-f72332709373820b" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/steve/src/intermezzOS/kernel/target/debug/deps" "-L" "/home/steve/src/intermezzOS/kernel/target/debug/build/intermezzos-ae49b6d4bcb27c57/out" "-L" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-l" "boot" "-Wl,--no-whole-archive" "-Wl,-Bdynamic" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libconsole.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-411f48d3.rlib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libspin-d054d2d05cd86dc1.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_unicode-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-411f48d3.rlib" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util"
      = note: /usr/bin/ld: /home/steve/src/intermezzOS/kernel/target/debug/build/intermezzos-ae49b6d4bcb27c57/out/libboot.a(boot.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
    /home/steve/src/intermezzOS/kernel/target/debug/build/intermezzos-ae49b6d4bcb27c57/out/libboot.a(boot.o): error adding symbols: Bad value
    
    
    error: linking with `cc` failed: exit code: 1
      |
      = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/steve/src/intermezzOS/kernel/target/debug/intermezzos-b45e4ac16f1d637d.0.o" "-o" "/home/steve/src/intermezzOS/kernel/target/debug/intermezzos-b45e4ac16f1d637d" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/steve/src/intermezzOS/kernel/target/debug/deps" "-L" "/home/steve/src/intermezzOS/kernel/target/debug/build/intermezzos-ae49b6d4bcb27c57/out" "-L" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/home/steve/src/intermezzOS/kernel/target/debug/deps/librlibc-975886925ea7e4d8.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm-411f48d3.rlib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libintermezzos.rlib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libconsole.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_unicode-411f48d3.rlib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libspin-d054d2d05cd86dc1.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-411f48d3.rlib" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util"
      = note: /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
    (.text+0x20): undefined reference to `main'
    collect2: error: ld returned 1 exit status
    

    We don't currently have any unit tests here, so it's not a problem, but we should figure this out and fix it.

    Someone on IRC told me that the PIC stuff would be fixed if we used gcc to assemble rather than nasm. Unsure though.

    bug Help wanted! 
    opened by steveklabnik 17
  • Compiling is failing any time

    Compiling is failing any time

    So I was playing around with this stuff, and it didn't compiled once. I installed everything thats needed, but which libary do I miss when compiling it?

    The output:

    daniel@daniel-8o23dad:~/projects/os/kernel$ RUST_BACKTRACE=1 xargo build --release --target x86_64-unknown-intermezzos-gnu --verbose
    + "rustc" "--print" "sysroot"
    + "rustc" "--print" "target-list"
    + RUSTFLAGS="--sysroot /home/daniel/.xargo"
    + "cargo" "build" "--release" "--target" "x86_64-unknown-intermezzos-gnu" "--verbose"
           Fresh console v0.1.0 (file:///home/daniel/projects/os/kernel/console)
           Fresh byteorder v0.5.3
           Fresh raw-cpuid v2.0.1
           Fresh libc v0.2.16
           Fresh rustc-serialize v0.3.19
           Fresh bitflags v0.7.0
           Fresh rlibc v1.0.0
           Fresh phf_shared v0.7.16
           Fresh num-traits v0.1.36
           Fresh spin v0.4.4
           Fresh keyboard v0.1.0 (file:///home/daniel/projects/os/kernel/keyboard)
       Compiling intermezzos v0.1.0 (file:///home/daniel/projects/os/kernel)
           Fresh rand v0.3.14
           Fresh csv v0.14.7
           Fresh phf v0.7.16
         Running `/home/daniel/projects/os/kernel/target/release/build/intermezzos-9f5c58ede529b3e6/build-script-build`
           Fresh num-complex v0.1.35
           Fresh num-integer v0.1.32
           Fresh lazy_static v0.2.1
           Fresh phf_generator v0.7.16
           Fresh num-bigint v0.1.35
           Fresh num-iter v0.1.32
           Fresh phf_codegen v0.7.16
           Fresh num-rational v0.1.35
           Fresh num v0.1.36
           Fresh serde v0.6.15
           Fresh serde_json v0.6.1
           Fresh x86 v0.8.1
           Fresh pic v0.1.0 (file:///home/daniel/projects/os/kernel/pic)
           Fresh interrupts v0.1.0 (file:///home/daniel/projects/os/kernel/interrupts)
         Running `rustc --crate-name intermezzos src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C metadata=a5f8d0c159026232 -C extra-filename=-a5f8d0c159026232 --out-dir /home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps --target x86_64-unknown-intermezzos-gnu -L dependency=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps -L dependency=/home/daniel/projects/os/kernel/target/release/deps --extern spin=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libspin-2e95bf66a70d82f7.rlib --extern pic=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libpic-e52c5dc844b294ba.rlib --extern rlibc=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/librlibc-3d5ca23970e1763b.rlib --extern keyboard=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libkeyboard-eab5eb9c2612608d.rlib --extern console=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libconsole-898e9b38d65bf2a3.rlib --extern interrupts=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libinterrupts-472aab710c3d4eff.rlib --extern x86=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libx86-40e865de7e1eb5d8.rlib --extern lazy_static=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/liblazy_static-f2c83931040bd2fb.rlib --sysroot /home/daniel/.xargo -L native=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/build/intermezzos-664041d978565111/out -l static=boot`
         Running `rustc --crate-name intermezzos src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C metadata=73ba34d58d8c787f -C extra-filename=-73ba34d58d8c787f --out-dir /home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps --target x86_64-unknown-intermezzos-gnu -L dependency=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps -L dependency=/home/daniel/projects/os/kernel/target/release/deps --extern spin=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libspin-2e95bf66a70d82f7.rlib --extern pic=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libpic-e52c5dc844b294ba.rlib --extern rlibc=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/librlibc-3d5ca23970e1763b.rlib --extern keyboard=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libkeyboard-eab5eb9c2612608d.rlib --extern console=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libconsole-898e9b38d65bf2a3.rlib --extern interrupts=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libinterrupts-472aab710c3d4eff.rlib --extern x86=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libx86-40e865de7e1eb5d8.rlib --extern lazy_static=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/liblazy_static-f2c83931040bd2fb.rlib --extern intermezzos=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libintermezzos-a5f8d0c159026232.rlib --sysroot /home/daniel/.xargo -L native=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/build/intermezzos-664041d978565111/out`
    warning: unused extern crate
      --> src/main.rs:12:1
       |
    12 | extern crate rlibc;
       | ^^^^^^^^^^^^^^^^^^^
       |
       = note: #[warn(unused_extern_crates)] on by default
    
    warning: unused extern crate
      --> src/main.rs:13:1
       |
    13 | extern crate spin;
       | ^^^^^^^^^^^^^^^^^^
    
    warning: unused extern crate
      --> src/main.rs:15:1
       |
    15 | extern crate console;
       | ^^^^^^^^^^^^^^^^^^^^^
    
    error: linking with `gcc` failed: exit code: 1
      |
      = note: "gcc" "-Wl,--script=layout.ld" "-Wl,--nmagic" "-nostartfiles" "-L" "/home/daniel/.xargo/lib/rustlib/x86_64-unknown-intermezzos-gnu/lib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/intermezzos-73ba34d58d8c787f.0.o" "-o" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/intermezzos-73ba34d58d8c787f" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps" "-L" "/home/daniel/projects/os/kernel/target/release/deps" "-L" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/build/intermezzos-664041d978565111/out" "-L" "/home/daniel/.xargo/lib/rustlib/x86_64-unknown-intermezzos-gnu/lib" "-Wl,-Bstatic" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/librlibc-3d5ca23970e1763b.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libkeyboard-eab5eb9c2612608d.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/liblazy_static-f2c83931040bd2fb.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libintermezzos-a5f8d0c159026232.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libinterrupts-472aab710c3d4eff.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libspin-2e95bf66a70d82f7.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libpic-e52c5dc844b294ba.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libx86-40e865de7e1eb5d8.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libphf-59dad5c67dcb08ae.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libphf_shared-2f2f832e88cc18d1.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libraw_cpuid-836331a5adb599e3.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libbitflags-df92c0f529cb93d8.rlib" "/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libconsole-898e9b38d65bf2a3.rlib" "/home/daniel/.xargo/lib/rustlib/x86_64-unknown-intermezzos-gnu/lib/libcore-53a02f271ea0ee12.rlib" "-Wl,-Bdynamic"
      = note: /usr/bin/ld: /home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libintermezzos-a5f8d0c159026232.rlib(boot.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
              /usr/bin/ld: final link failed: Nonrepresentable section on output
              collect2: error: ld returned 1 exit status
              
    
    error: aborting due to previous error
    
    error: Could not compile `intermezzos`.
    
    Caused by:
      process didn't exit successfully: `rustc --crate-name intermezzos src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C metadata=73ba34d58d8c787f -C extra-filename=-73ba34d58d8c787f --out-dir /home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps --target x86_64-unknown-intermezzos-gnu -L dependency=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps -L dependency=/home/daniel/projects/os/kernel/target/release/deps --extern spin=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libspin-2e95bf66a70d82f7.rlib --extern pic=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libpic-e52c5dc844b294ba.rlib --extern rlibc=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/librlibc-3d5ca23970e1763b.rlib --extern keyboard=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libkeyboard-eab5eb9c2612608d.rlib --extern console=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libconsole-898e9b38d65bf2a3.rlib --extern interrupts=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libinterrupts-472aab710c3d4eff.rlib --extern x86=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libx86-40e865de7e1eb5d8.rlib --extern lazy_static=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/liblazy_static-f2c83931040bd2fb.rlib --extern intermezzos=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/deps/libintermezzos-a5f8d0c159026232.rlib --sysroot /home/daniel/.xargo -L native=/home/daniel/projects/os/kernel/target/x86_64-unknown-intermezzos-gnu/release/build/intermezzos-664041d978565111/out` (exit code: 101)
    
    opened by daniel-Q6wUOI 10
  • Provide cross-compile tools through Homebrew

    Provide cross-compile tools through Homebrew

    https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Custom-GCC-and-cross-compilers.md

    It would be super rad if we could provide a formula rather than just the install script.

    enhancement Help wanted! 
    opened by steveklabnik 10
  • Text mode enhancements!

    Text mode enhancements!

    Work in progress: Fixed scrolling a bit by allowing the scroll to happen if we're about to write to a position outside the buffer. Before it only scrolled on newlines. Also added a bit of code to update the cursors location!

    As stated above this is a WIP, I was just messing around a bit but it works well enough! I just copied the outb asm function from the interrupts lib, so that's something that might need to change.

    Let me know what you guys think!

    opened by WilsonGiese 10
  • Build on Windows without the WSL

    Build on Windows without the WSL

    One major thing holding back intermezzOS development is that I'm on Windows now. Getting a native windows build would be key.

    http://forum.osdev.org/viewtopic.php?f=1&t=27605 might be a part of the puzzle.

    enhancement Help wanted! 
    opened by steveklabnik 9
  • Stateful keyboard driver

    Stateful keyboard driver

    Builds off of #89 to start constructing a stateful keyboard driver capable of modeling the user's interaction with the keyboard and translating that into key codes for the OS and programs.

    • [x] Decode basic set of 1-byte PS/2 scan codes
    • [x] Managed internal state of pressed keys, clear state when keys released
    • [x] Return current printable character to OS (when possible) when inputting latest scan code
    • [x] Report backspace and other non-printables to the OS (send ASCII code?)
    • [x] Tests!
    • [ ] Decode 2-byte and 3-byte PS/2 scan codes (stretch goal); this will need more complex state management in the driver
    opened by dirk 9
  • OS X

    OS X

    Hi all, I decided to take a crack at getting this sucker working on os x. I went through and documented my steps in a script. @steveklabnik said an issue would be good to document this stuff so yay :tada:.

    Things the script does:

    1. brew install tools that it can like gmp, mpfr, libmpc, autoconf, and automake
    2. Download and compile tools in order to make a cross compiler: binutils, gcc, objconv
    3. Download and compile grub using the cross compiler

    This works or at least doesn't error out obviously. I'm going to run through this process again when I have more time to see if there are any silent errors.

    By changing the Makefile a little to point at the ld and grub-mkrescue that you just made you should be able to run make now. Nothing errors, but at this point nothing shows up after you have the kernel running.

    Also I'm a super newbie at all of this stuff so I apologize if something is wrong. Also just a disclaimer the script above downloads and compiles stuff into your home dir. I suggest you read it or edit it if you want to change the dirs that it puts stuff in. They should be made configurable at some point.

    I'll post here with any follow up I find.

    enhancement 
    opened by emkay 9
  • Closing qemu Cleanly

    Closing qemu Cleanly

    I can't seem to find a good way to cleanly shut down qemu. The docs I found here (http://wiki.qemu.org/download/qemu-doc.html) show a way to "Exit emulator", but this doesn't seem to work for me at least inside of the Vagrant VM. For now, I'm just using pgrep qemu | xargs kill -15

    bug 
    opened by rylev 8
  • Figure out why nasm 2.12 hates a macro

    Figure out why nasm 2.12 hates a macro

    The version of nasm packaged with debian stretch doesn't work, but the one with jessie does. It appears to be a change between nasm 2.11 and nasm 2.12, but working on both seems like a good idea.

    opened by steveklabnik 6
  • linker-flavor required

    linker-flavor required

    I noticed that intermezzOS doesn't compile anymore due to this commit that makes xargo require the "linker-flavor" argument in the x86_64-unknown-intermezzos-gnu.json file.

    Once added the line "linker-flavor": "ld", it started compiling, but I was still getting errors, that led me to add another line "linker": "ld",.

    Now it compiles just fine, but when I try to make run grub returns this error:

    error: no multiboot header found
    error: you need to load the kernel first
    

    Can anyone help me? :)

    opened by ghost 5
  • Bootimage install fails as per documentation

    Bootimage install fails as per documentation

    Bootimage install fails with nightly rust installed. Does not like the function "read_to_string". I was able to get it to work using the stable rust branch. Not sure what other problems that will cause down the line though.

    opened by JulianGindi 3
  • Multi-architecture support?

    Multi-architecture support?

    I view this one of the best features in an OS kernel, as it allows reusing anything above the hardware abstracting layer on more than one architecture. Is multi-architecture support something this project aims for?

    question 
    opened by steveeJ 2
  • Missing memory probing

    Missing memory probing

    In order to manage the memory, the OS should know how much it has. Extra information about reserved addresses and memory holes (maybe these are the same, I don't know yet), should also be taken into account.

    enhancement 
    opened by steveeJ 5
  • explore KVM API

    explore KVM API

    This is super off the wall, but intermezzOS through kvm would be amazing http://lwn.net/Articles/658511/

    marking as "question" because who knows if we even want to do this

    question 
    opened by steveklabnik 0
  • move to a higher-half kernel

    move to a higher-half kernel

    @ketsuban has an example here: https://github.com/Ketsuban/finisterre

    I think this would be a good idea before going to usermode, so cc https://github.com/intermezzOS/kernel/issues/82

    If anyone is interested in tackling this, please give it a try!

    enhancement Help wanted! 
    opened by steveklabnik 1
Owner
intermezzOS
A hobby operating system, in Rust. On hiatus; read Phil Opp's work instead!
intermezzOS
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
Hobby OS written in rust ( 🚀 blazingly fast 🚀 ).

pess-OS hobby OS written in rust ( ?? blazingly fast ?? ). Building from Source Prequsities QEMU Rust (nightly), preferably through rustup Step-by-Ste

blu 1 Dec 24, 2022
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 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
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
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
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
A Rust Operating System, written from the ground up

ThornOS A Rust Operating System, written from the ground up Build Dependencies Bootimage TODO: Document build process in more detail Acknowledgements

Stuart Reid 1 Mar 31, 2022
A Real Time Operating System in Rust for Cortex M3 embedded systems

A Real Time Operating System in Rust for Cortex M3 embedded systems

Manuel Forcén Muñoz 5 Jun 1, 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
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
Aero is a new modern, unix based operating system. It is being developed for educational purposes.

Areo Aero is a new modern, unix based operating system written in Rust and is being developed for educational purposes. Aero follows the monolithic ke

Anhad Singh 623 Dec 24, 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
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