Git Product home page Git Product logo

raspvisor's Introduction

raspvisor

A simple type-1 hypervisor on Raspberry Pi 3 (aarch64)

Article about raspvisor is here (Japanese).

Warning: This is a hobby project and not for practical use.

Setup

First, write a Raspberry Pi OS (previously called Raspbian) image to your SD card to make partitions and install firmwares. Execute following commands to build. (GNU toolchain for aarch64-linux-gnu is required.)

$ export SD_BOOT_DIR=/path/to/bootpartiton/on/sdcard
$ export SD_ROOTFS_DIR=/path/to/rootfspartiton/on/sdcard
$ make install

Programs runs on a hypervisor startup are hard-coded in src/main.c. I confirmed that programs in example directory can be run on this hypervisor. In example directory, following programs are found.

  • test_binary : issues hypervisor call once.
  • echo : Mini-UART echo back (based on raspberry-pi-os/lesson02)
  • mini-os : a simple operating system which has a process scheduler, interrupt handling and virtual memory support (based on raspberry-pi-os/lesson06)

Enter each directory and make to build. Then copy *.bin file to SD_BOOT_DIR.

Usage

UART is assigned to the hypervisor's console. Connect your cable to the GPIO 14/15 pins.

  • ? + l : show the list of VMs
  • ? + 1-9 : switch to the console of VM 1-9

Features

  • Enabling stage 2 translation
  • Memory-mapped IO emulation
    • BCM2837 Interrupt Controller
    • BCM2837 System Timer (inacculate)
    • BCM2837 Mini-UART
  • IRQ virtualization by using virtual IRQs
  • Trapping access of some system register
  • Trapping WFI/WFE instruction

Links

License

This software is licensed under the MIT license.

raspvisor's People

Contributors

matsud224 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

raspvisor's Issues

Emulate raspvisor with inside QEMU

Thanks for the Nice work on Raspvisor :)
Have you tried emulating raspvisor inside QEMU with the echo.bin, test.bin, mini-os that you provided in the repo?

requested file "mini-os.bin" is not found

Hi @matsud224 ,
Thanks for your efforts.

I followed the steps, i.e flashed rpi OS, logged in successfully into rpi os,
Then pasted the kernel8.img, conf.txt, echo.bin, mini-os.bin into both the "/boot" & "/" dirs but i get the errors:
where exactly shall i place the files?
are there any other steps that i am missing ?

=== raspvisor ===
INFO[1]: loading...
WARN[1]: requested file "mini-os.bin" is not found.
!!! PANIC[1]: failed to load
INFO[2]: loading...
WARN[2]: requested file "echo.bin" is not found.
!!! PANIC[2]: failed to load
INFO[3]: loading...
WARN[3]: requested file "mini-os.bin" is not found.
!!! PANIC[3]: failed to load
INFO[4]: loading...
WARN[4]: requested file "echo.bin" is not found.
!!! PANIC[4]: failed to load
INFO[5]: loading...
WARN[5]: requested file "mini-os.bin" is not found.
!!! PANIC[5]: failed to load

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.