Coder Social home page Coder Social logo

ljp-tw / sos Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 3.75 MB

Small Operating System runs on Raspberry Pi 3 Model B+. NYCU OSDI Spring 2022 Project

License: MIT License

Python 0.38% Makefile 2.02% C 93.20% Assembly 3.66% Shell 0.73%
arm operating-system rpi3b-plus

sos's Introduction

SOS

Small Operating System runs on Raspberry Pi 3 Model B+.

NYCU OSDI Spring 2022 Project.

How to build

  • Download dependencies:
sudo apt-get install gcc-aarch64-linux-gnu qemu-system-arm
  • Build kernel8.img:
make
  • Build kernel8.img with some debug information:
# Options:
#   MM_DEBUG
#   DEMANDING_PAGE_DEBUG
make MM_DEBUG=1
make DEMANDING_PAGE_DEBUG=1
  • Build myos.img (which you can dd to SD card):
make image

How to run

  • Qemu emulation:
make qemu
  • You should either attach gdb to qemu, or just remove the arugments -s -S passed to qemu in the Makefile

  • Qemu will emulate the bootloader and you can then attach to the bootloader shell with:

sudo screen /dev/pts/<pts_idx>
  • In the bootloader shell, you can use the command load to ask the bootloader to load the kernel image. After entering the load command, you can send the kernel image to the bootloader with the following command:
sudo ./tools/loadkernel.py /dev/pts/<pts_id> build/kernel8.img

How to burn it into pi3

sudo dd if=./build/myos.img of=/dev/<your SD card device>

Directory

Dir Comment
build The compiled object files, images of bootloader, kernel, the initramfs.cpio and the fat32 image
img The files that will be stored to the fat32 image
include Header files
initramfs The files that will be stored to the initramfs.cpio (initramfs.cpio will be stored to the fat32 image)
mnt The tool scripts will use it to create the fat32 image
src Source code files
tools Some helper scripts

sos's People

Contributors

ljp-tw avatar s094392 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.