Giter Site home page Giter Site logo

pleasewhy / startos Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 0.0 13.85 MB

rewrite subset of linux 2.6 by OOP, C++ advanced topics

GDB 0.01% Makefile 0.03% C++ 2.05% Assembly 96.49% C 0.67% Rust 0.19% Python 0.56% Perl 0.01% Shell 0.01% Lua 0.01%
qemu risc

startos's Introduction

StartOS

StartOS是一个RISC-V 64位操作系统,它主要使用C++编写并包含一些必要的汇编代码

写StartOS的主要是为了学习

Features

  • 64位操作系统(RISC-V)

  • 运行ELF格式程序

  • VFS和FAT32文件系统

  • SD/RTC驱动

  • 虚拟内存和内存管理

  • 控制台IO

  • 进程管理

TODO

  • STL标准库
  • 使用C++特性
  • 设备管理
  • 线程安全的文件系统

开发工具

  • k210开发板或者qemu-system-riscv64

    sudo apt-get install qemu-system-misc=1:4.2-3ubuntu6 # 需要4.2版本
  • RISC-V 交叉编译工具包

    sudo apt-get install git build-essential gdb-multiarch gcc-riscv64-unknown-elf binutils-riscv64-linux-gnu 

    注意:最好使用Ubuntu20版本

下载

git clone [email protected]:pleasewhy/startos.git

运行

qemu

首先制作一个FAT32磁盘镜像

make fs.img

该命令会生成fs.img磁盘镜像,并将submit/riscv64/目录下的文件添加到fs.img中

然后修改platform.mk的platform修改为QEMU

image-20210526195907352

最后运行

make qemu

你会得到如下输出

退出:输入Ctrl+A,然后X退出QEMU

K210

startOS目前只支持在k210 Sipeed M1 DOCK开发板上运行。

首先需要制作一个FAT32格式的sd卡,sd卡默认路径为/dev/sdb,你需要将其替换为你的sd卡路径。

make sd

将sd插入k210开发板,并将其连接到电脑上,k210的默认连接路径为/dev/ttyUSB0,你需要将其替换为你的开发板路径。

然后你需要修改platform.mk的platform修改为K210

最后运行

make k210

startos's People

Contributors

pleasewhy avatar

Stargazers

 avatar  avatar  avatar  avatar  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.