Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

Notifications You must be signed in to change notification settings

Han-Zihang/SimpleKernel

Repository files navigation

Build Status last-commit languages MIT License LICENSE 996.icu HitCount

English | 中文

SimpleKernel

关键词

  • Kernel

  • C/C++

  • UXIN-like

  • Multiboot2

简介

SimpleKernel,一个用来练手的简单内核。提供了各个阶段完成度不同的内核,你可以从自己喜欢的地方开始。

开发环境

  • Ubuntu Linux

    注意:未测试

    • bochs
    • i386-elf tool chain i386-elf-binutils, i386-elf-gcc, i386-elf-grub
    • xorriso
  • Mac

    • Homebrew

      https://brew.sh

    • bochs

    • x86_64-elf tool chain

      x86_64-elf-binutils, x86_64-elf-gcc, x86_64-elf-grub

    • xorriso

注:可以使用 setup.sh 自动安装环境

如何运行

git clone https://github.com/MRNIU/SimpleKernel.git
cd SimpleKernel/
sh setup.sh

运行截图

目录结构

  • 原则

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

目录设计

  • 原则

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

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

  • 示例

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

依赖关系

  • 原则

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

头文件

文件命名

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

Makefile

测试

自动集成

合并到 master 分支时需要通过 Travis CI 测试。编译没有错误即可。

代码风格

镜像文件

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

TODO

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

贡献者

MRNIU

贡献

请阅读 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)进程的诞生

捐助者

支持作者

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

版权信息

此项目使用 MIT 许可证

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 72.7%
  • Makefile 13.2%
  • C++ 6.3%
  • Assembly 4.5%
  • Shell 3.3%

AltStyle によって変換されたページ (->オリジナル) /