Code Monkey home page Code Monkey logo

liumos's Introduction

liumOS

CircleCI License: MIT

Screenshot

A toy operating system which supports NVDIMM natively.

Requirements

Common

Install Rust toolchain

Check the installation (below is an example output):

$ cargo --version
cargo 1.46.0 (149022b1d 2020-07-17)

Then, install nightly toolchain and cargo-xbuild for cross compiling.

rustup toolchain install nightly-x86_64-unknown-linux-gnu
rustup component add rust-src

macOS

brew install wget cmake qemu llvm dosfstools

Ubuntu 20.04

sudo apt install wget cmake qemu-system-x86 clang-8 lld-8 libc++-8-dev libc++abi-8-dev clang-format

Prepare tools and libraries

Move to the root of this source tree. Then:

make tools
make prebuilt

How to build

make

Run on QEMU

This repository contains OVMF binary for UEFI emulation.

make run

You can connect serial console using telnet

telnet localhost 1235

Run flags

Flags can be specified for make run command. Please check qemu.mk for more details.

Example:

make run GUI=n GDB=nosuspend
  • GUI
    • =y: Enable GUI
    • =n: Disable GUI (enable VNC server)
  • GDB
    • =n: Disable gdb server in QEMU
    • =suspend_on_boot: Enable gdb server and wait for a connection on startup
    • =nosuspend: Enable gdb server and startup the machine normally without waiting for a gdb connection

Setup tap interface (for linux)

make run boots liumOS on QEMU with a tap interface on Linux host. To avoid running QEMU with sudo, you need to setup a tap interface in advance.

sudo ip tuntap add dev tap0 mode tap user $USER
sudo ip link set dev tap0 master br0
sudo ip link set dev tap0 up

example output with bridge br0 connected to eno1

$ ip a | grep -e br0 -e tap0
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 10.10.10.93/24 brd 10.10.10.255 scope global dynamic br0
6: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000

Setup bridge interface

global, persistent

network:
  ethernets:
    eno1:
      dhcp4: false
      dhcp6: false
  bridges:
    br0:
      interfaces: [ eno1 ]
      dhcp4: true
  version: 2

How to contribute

Contributions are welcome! Please create a pull request to this repository.

Before submitting a PR, please check the test results with make test.

make commit does all the presubmit checks and creates a commit automatically (recommended!)

If you found any problems or questions, please let us know through Issues on GitHub.

References

Author

hikalium

liumos's People

Contributors

atrn0 avatar d0iasm avatar hikalium 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liumos's Issues

Enable app test on CI

Since app test requires c/c++ libraries, app tests will fail on CI. Update CI image to include prebuilt libs and enable app test on CI.

ProLiant DL380 Gen10

HPE ProLiant DL380 Gen10

  • Intel(R) Xeon(R) Silver 4112 CPU @ 2.60GHz x 2 sockets
  • DRAM: 16GB for each sockets
  • NVDIMM-N: 16GB for each sockets

Impl v2p which uses kernel direct map

current v2p implementation expects to have an access to physical addresses. It works in the kernel processes but it causes page fault in user process. v2p can be implemented with kernel direct map which can be accessible from supervisor mode of user process (e.g. syscall) so implement it.

Support ELF with RO segments

Currently, our loader expects only segments with RW or RX but most linux binaries have RO segments for .rodata . So let's fix this!

GPD Micro PC

UEFI 2.6: PI 1.4
8192MB Memory
Celeron N4100 CPU @ 1.10GHz

Fix HPET failed on DL380 Machine

[hikalium@dl380 ~]$ dmesg | grep hpet
[ 0.347581] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635855245 ns
[ 0.347599] hpet clockevent registered
[ 0.527878] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[ 0.527878] hpet0: 8 comparators, 64-bit 24.000000 MHz counter
[ 1.761155] rtc_cmos 00:00: alarms up to one month, y3k, 114 bytes nvram, hpet irqs

QEMU

QEMU 3.1.50 (on t03.hikalium.com)

4834714

  • boot: OK
  • context switch: OK
  • keyboard: OK

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.