Coder Social home page Coder Social logo

zhengtong12 / simplekernel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simple-xx/simplekernel

0.0 1.0 0.0 93.15 MB

Simple kernel for learning operating systems. 用于学习操作系统的简单内核

License: Other

Assembly 5.12% Shell 3.29% C 9.04% C++ 73.56% CMake 8.98%

simplekernel's Introduction

github ci last-commit languages MIT License LICENSE 996.icu

English | 中文

SimpleKernel

关键词

  • Kernel

  • C/C++/AT&T ASM/cmake/shell

  • Linux-like

  • Multiboot2

简介

提供了各个阶段完成度不同的内核,你可以从自己喜欢的地方开始。

构建顺序:

  1. boot: 由 grub2 引导
  2. printf: 字符输出,方便调试
  3. pmm: 物理内存初始化
  4. vmm: 虚拟内存初始化
  5. heap: 堆管理
  6. lib: C++ 标准库与标准模版库
  7. intr: 中断管理
  8. 文件系统: TODO
  9. 系统调用: TODO
  10. 进程: TODO

开发环境

  • Ubuntu Linux

    • brew
    • x86_64-elf-binutils
    • x86_64-elf-gcc
    • xorriso
    • grub
    • bochs
    • bochs-x

    Ubuntu 20.04 测试通过

  • Arch Linux

    • brew
    • x86_64-elf-binutils
    • x86_64-elf-gcc
    • mtools
    • xorriso
    • grub
    • bochs

    Manjaro 5.6.15-1 测试通过

  • Mac

    • brew

    • x86_64-elf-binutils

  • x86_64-elf-gcc

    • xorriso
  • grub

    • bochs

    macOS 10.15.7 测试通过

如何运行

git clone https://github.com/Simple-XX/SimpleKernel.git
cd SimpleKernel/
bash ./run.sh

运行截图

目录结构

  • 原则

    整个工程按照功能模块划分子目录,每个子目录再划分头文件和源文件目录,以便架构清晰、易懂。

目录设计

  • 原则

    目录的命名能准确描述模块的基本功能,建议用小写字母且不含下划线、点等特殊符号;

    目录必须放于相包含的父目录之下,并需要明确与其他目录间的耦合性。

  • 示例

    kernel:系统内核部分; libs:依赖库;

依赖关系

  • 原则

    新添加组件往往依赖于系统原有组件,必须以最小耦合的方式明确所直接依赖的组件。

头文件

文件命名

头文件命名能准确描述文件所包含的模块内容,达到通俗、易懂的目的。

CMake

测试

自动集成

每次 push 会使用 Github Action 进行测试,可以通过编译即可。

代码风格

镜像文件

simplekernel.img 是 1.44 软盘,我们的内核就在这里。

TODO

  • 并发
  • 文件系统
  • 设备驱动

贡献者

MRNIU

cy295957410

rakino

xiaoerlaigeid

贡献

请阅读 CONTRIBUTING.md。

感谢

此项目参考了很多优秀的项目和资料

osdev

GRUB 在 Mac 上的安装

multiboot

《程序员的自我修养--链接、装载与库》(俞甲子 石凡 潘爱民)

JamesM's kernel development tutorials

xOS

hurlex

howerj/os

cfenollosa/os-tutorial

omarrx024/xos

PurpleBooth/project-title

0xAX weblong

How-to-Make-a-Computer-Operating-System

coding-style

DNKernel

c-algorithms

Linux内核中的中断栈与内核栈的补充说明

Linux进程管理 (1)进程的诞生

SynestiaOS

捐助者

支持作者

请我喝杯咖啡吧! (ps: 请注明 GitHub id 以便加入捐献者名单

版权信息

此项目使用 MIT 许可证

simplekernel's People

Contributors

mrniu avatar cy295957410 avatar rakino avatar xiaoerlaigeid avatar

Watchers

James Cloos 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.